Template talk:Linktext: Difference between revisions
→top: include Permanently protected notifier |
Tags: Reverted 2017 wikitext editor |
||
Line 45: | Line 45: | ||
:: For future improvements, we could add a test to see if '''pref''' is a lang code, and change the target language for '''#language''' to match that. |
:: For future improvements, we could add a test to see if '''pref''' is a lang code, and change the target language for '''#language''' to match that. |
||
:: ‑‑ [[User:Eirikr|Eiríkr Útlendi]] │<sup>''[[User talk:Eirikr|Tala við mig]]''</sup> 19:46, 1 March 2022 (UTC) |
:: ‑‑ [[User:Eirikr|Eiríkr Útlendi]] │<sup>''[[User talk:Eirikr|Tala við mig]]''</sup> 19:46, 1 March 2022 (UTC) |
||
:::Pinging {{ping|Xaosflux}} per the above since it appears the notification template was not used. [[User:HapHaxion|<b style="font-family: Tw Cen MT; color: FireBrick">HapHaxion</b>]] <sub>([[User talk:HapHaxion|talk]] / [[Special:Contribs/HapHaxion|contribs]])</sub> 21:50, 2 March 2022 (UTC) |
Revision as of 21:50, 2 March 2022
Template:Linktext is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Link to corresponding language section in Wiktionary
Can someone modify the Wiktionary links to become wikt:新#Chinese or wikt:新#Japanese rather than just wikt:新 when the language codes lang=zh
or lang=ja
are specified? There are significant differences between Chinese and Japanese entries on Wiktionary. KevinUp (talk) 15:44, 31 May 2019 (UTC)
Template-protected edit request on 25 February 2022
It is requested that an edit be made to the template-protected template at Template:Linktext. (edit · history · last · links · sandbox · edit sandbox · sandbox history · sandbox last edit · sandbox diff · test cases · transclusion count · protection log) This template must be followed by a complete and specific description of the request, so that an editor unfamiliar with the subject matter could complete the requested edit immediately.
Edit requests to template-protected pages should only be used for edits that are either uncontroversial or supported by consensus. If the proposed edit might be controversial, discuss it on the protected page's talk page before using this template. Consider making changes first to the template's sandbox and test them thoroughly here before submitting an edit request. To request that a page be protected or unprotected, make a protection request. When the request has been completed or denied, please add the |
Per the almost-three-year-old comment on the Template talk:Linktext page, please update the template to include the indicated language in the target link.
Current template output for {{linktext|命|lang=ja}}
:
- 命
<span lang="ja"><a href="https://en.wiktionary.org/wiki/%E5%91%BD" class="extiw" title="wikt:命">命</a></span>
- Functionally almost equivalent to
{{lang|ja|[[:wikt:命|命]]}}
Desired template output for {{linktext|命|lang=ja}}
:
- 命
<span title="Japanese-language text"><span lang="ja"><a href="https://en.wiktionary.org/wiki/%E5%91%BD#Japanese" class="extiw" title="wikt:命">命</a></span></span>
- Functionally equivalent to
{{lang|ja|[[:wikt:命#Japanese|命]]}}
Rationale
{{linktext}} currently only links to the top of a Wiktionary page.
Some pages have entries in multiple languages, sometimes very long entries.
If an editor supplies a language code to the template, the editor presumably expects the link to take the reader not just to that Wiktionary page, but more specifically to the entry on that page for the indicated language code.
Wikicode changes
For every instance of:
[[{{{pref|wikt}}}:{{{1}}}|{{{1}}}]]
Replace with:
[[{{{pref|wikt}}}:{{{1}}}{{if#:{{{lang|}}}|{{!}}lang={{{lang}}}}}|{{{1}}}]]
... and so on and so forth for each of the 20 possible input parameters.
My template coding skills are a bit rusty, so please double-check the bit about the {{!}}
in particular. ‑‑ Eiríkr Útlendi │Tala við mig 00:14, 26 February 2022 (UTC)
- Not done (yet) Please make all your requested changed in the sandbox, test them, then reactivate when ready. — xaosflux Talk 01:01, 26 February 2022 (UTC)
- @Xaosflux, whomever else, please see what appears to be working code at Template:Linktext/sandbox, and some simple tests at Template talk:Linktext/Sandbox.
- For future improvements, we could add a test to see if pref is a lang code, and change the target language for #language to match that.
- ‑‑ Eiríkr Útlendi │Tala við mig 19:46, 1 March 2022 (UTC)