Revision as of 10:01, 27 August 2020 editGonnym (talk | contribs)Autopatrolled, Extended confirmed users, Template editors222,889 edits add archive template so old discussions can be archived← Previous edit | Latest revision as of 19:00, 26 December 2024 edit undoNardog (talk | contribs)Edit filter helpers, Autopatrolled, Extended confirmed users, New page reviewers, Pending changes reviewers, Rollbackers, Template editors80,785 edits →Mono language issue: ReplyTag: Reply | ||
(39 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{Permanently protected}} | |||
{{WikiProject Languages}} | |||
{{WikiProject Writing systems}} | |||
{{User:MiszaBot/config | {{User:MiszaBot/config | ||
| algo = old(180d) | | algo = old(180d) | ||
Line 9: | Line 8: | ||
| minthreadstoarchive = 1 | | minthreadstoarchive = 1 | ||
| minthreadsleft = 3 | | minthreadsleft = 3 | ||
}} | |||
}}{{archives}}{{Auto archiving notice|age=180|small=no|bot=Lowercase sigmabot III}} | |||
{{WikiProject banner shell| | |||
{{WikiProject Languages}} | |||
==Ready to implement?== | |||
{{WikiProject Writing systems}} | |||
I've made a few changes today to ensure that '''ISO 639 name|XXX''' is producing exactly the same as '''ISO 639 name XXX'''. See ] for a comparison. | |||
}} | |||
* Are we sure that all templates of the form <nowiki>{{tl|ISO 639 name XXX}}</nowiki> are not incorporated into this one? | |||
{{archives|age=180|bot=Lowercase sigmabot III}} | |||
* Which templates use these? I know about {{tl|lang}}; are there any others? | |||
* What should we do with the <nowiki>{{tl|ISO 639 name XXX}}</nowiki> templates? | |||
*#Ignore them | |||
*#Point them to this template | |||
*#Tag them as depreciated and eventually delete them | |||
— Martin <small>(] · ])</small> 12:38, 29 April 2009 (UTC) | |||
:You could do what I did with the interwiki translation templates: replace the code with the appropriate code of this template to output the data, and then I could have my bot subst the new code onto the articles after a little while when we ensure it works properly, assuming no objections. –<font face="verdana" color="black">]</font> ] 12:44, 29 April 2009 (UTC) | |||
::I believe the situation is that not many articles call those templates directly. Most calls come via {{tl|lang}} and so the switchover could be quite easy. About substitution, I would advise against it. Okay, the name of a language might not be about to change, but as soon as you do that you've lost the ability to add extra functionality. And the benefits of substituting are, I think, tiny. — Martin <small>(] · ])</small> 13:19, 29 April 2009 (UTC) | |||
:::It's a bit difficult to see what's going to be left until {{tl|lang}} has been changed, so why not get that part done, wait a little while, and then check the "What links here" on all the templates to see what is left to do then. If there's not much then it could be worth deleting the old templates. -- ] (]) 22:26, 29 April 2009 (UTC) | |||
:::What I meant by subst, is that since you've replaced "ISO 639 pl" with<nowiki> "{{ISO 639 name|pl}}"</nowiki>, when I subst ISO 639 pl, it ends up putting the ISO 639 name template in. Not substing the ISO 630 name template itself. Erm, I guess I should've just said replace, it's just easier this way =) –<font face="verdana" color="black">]</font> ] 23:28, 29 April 2009 (UTC) | |||
== Duplicate of Template:Language == | |||
This templage has the same functionality as {{tl|Language}} and should be redirected and deprecated. This would ensure that only one list of ISO 639 codes is used within English Misplaced Pages. Please give your comments before I ask for {{tl|editprotected}}. ] <sup><font size="-2">]</font></sup> 20:13, 13 July 2009 (UTC) | |||
: Hmm. This template seems to cover ], while {{tl|language}} seems to only understand IDO 639-1, e.g. it only knows "de" for German, not "ger" or "deu".<br>However, they could still be merged, and should probably. I wonder why Martin created this one, let's wait what he says.<br>Cheers, ] 20:36, 13 July 2009 (UTC) | |||
::I created this to replace the hundreds of template of the form <nowiki>{{tl|ISO 639 name de}}</nowiki>, <nowiki>{{tl|ISO 639 name ja}}</nowiki>, etc. etc. In fact, this template is not in use anymore as it was found that such a large switch was detrimental to performance. See ] for the discussion. So unfortunately, the neat solution was not the best solution in this case, although I hope that someday this will change and we can use this template and deprecate all the separate ones. I would definitely support merging this functionality, if it is indeed duplicated. I believe there may be several other templates out there which do something similar to this as well. — Martin <small>(] · ])</small> 14:18, 14 July 2009 (UTC) | |||
:::Oh, I didn't even notice. –<font face="verdana" color="black">]</font>] 14:25, 14 July 2009 (UTC) | |||
This template and <nowiki>]</nowiki> are being used. If the performance is better with sub-templates rather than a switch, should we change this template to be "<nowiki>{{ISO 639 name {{{code}}}}}</nowiki>" with some checking to ensure that "ISO 639 name <x>" exists? <span style="font-variant:small-caps">] <sup>'''(])'''</sup></span> 10:31, 11 November 2011 (UTC) | |||
:Yes we should, this template also does not support anything like as many codes as the systemic solution, although I aded a bunch in some time ago, and the systemic solution has the advantage that anyone can add a new code, while the high use templates remain protected. I will make it so. ''] ]'', <small>01:58, 22 March 2012 (UTC).</small><br /> | |||
Another option is to start using <nowiki>{{#language:..|..}}</nowiki> (documented at ]), however there are still some differences between the language names supported by enwp templates, commons templates and mediawiki software. See ]. <span style="font-variant:small-caps">] <sup>'''(])'''</sup></span> 04:54, 26 November 2011 (UTC) | |||
== Edit request on 6 May 2012 == | |||
{{edit protected|answered=yes}} | |||
<!-- Begin request --> | |||
I have nominated this template for deletion, so please add {{tlx|tfd|inline{{=}}yes}} to it. | |||
<!-- End request --> | |||
] 16:11, 6 May 2012 (UTC) | |||
: {{done}}, though I used <code>type=tiny</code>. ] (]) 09:47, 9 May 2012 (UTC) | |||
== Switch to module == | |||
I've converted this tpl to Lua; there are two obvious benefits to this: | |||
* the list of languages is much more easily manageable (see <nowiki>]</nowiki>; I've imported all the codes from live except a few that were improper, and added a few more) | |||
* we can fuzzy string match, i.e. as long as the base ISO code is defined, compounded codes will find a match, e.g.: | |||
** {{tlf|ISO 639 name|ar-x-nastaliq}} → <nowiki>{{ISO 639 name|ar-x-nastaliq}}</nowiki> | |||
** {{tlf|ISO 639 name/sandbox|ar-x-nastaliq}} → <nowiki>{{ISO 639 name/sandbox|ar-x-nastaliq}}</nowiki> | |||
:etc. | |||
It otherwise behaves the same it does now on live. | |||
I suppose I'll make a protected edit request in a few days if no one's against this change and if I've not goofed something up. Templates that circumvent the parent tpl will have to be edited (to change the space to a vertical bar). — ] (]) 18:31, 8 September 2013 (UTC) | |||
* Which existing codes did you find "improper"? | |||
* I hope you don't mind that I've edited the data template to remove all the redundancies and nil lines. I don't think this will make it harder to maintain, the data page is 90% smaller, and a (single) invocation is now significantly faster. | |||
* It'll always be slower than the dependent template transclusion but maintainability clearly trumps the current hack. :) | |||
* At the moment an undefined code shows an {{tl|error}} that can be caught -- I think this behavior should be retained. | |||
* What's the intention of the obfuscated <code>code</code> parameter name in ]? Only to handle an empty parameter and control display on the template page? | |||
* Once this is deployed, all those old helper templates needs to be deleted. I can do that semi-automatically while verifying that there are no remaining transclusions, if you want. | |||
* A somewhat broader question, independent from a move to a module: I'm wondering whether it wouldn't be better to have specialized templates for the ISO-639 lists. In a meta template you usually want more narrowly defined input and throw an error if the input is incorrect. For example, {{tl|Infobox language}} has explicitly defined inputs for the various ISO 639 codes and uses one/some of them as parameters for this template, but the fuzziness of this template will hide input errors instead of point them out to the editor.<br />This template doesn't have /that/ many transclusions with 5000 (and its odd cousin {{tl|language}} has less) so it would certainly be doable to take this opportunity and split it into more specialized templates. | |||
: ] 21:11, 8 September 2013 (UTC) | |||
:* Some nonexistent ones like cz for Czech or lowercase country codes like in zh-cn (should be zh-CN). See the test cases ]. | |||
:* Well, I think we should keep the "redundancies" and nil entries. There weren't redundancies in the output 'cos the tables were combined at the bottom and the same key would overwrite the previous one; nil entries are discarded. Also, we'll probably want to define many of the nils. | |||
:* Not noticeably slower anyway. | |||
:* I'll add that back, thanks. <small>{{done}} — ] (]) 22:18, 8 September 2013 (UTC)</small> | |||
:* Yeah, that's what it's for. It'll only pass {{para|code}} on to the script if it's set or blank, but not if it's left out altogether. | |||
:* That'd be good, thanks. | |||
:* The module has two modes: simple (strict) or fuzzy. Infobox lang could invoke the module directly with ''simple''. Other templates like {{tl|lang}} will definitely want fuzzy. What would the more specialised templates be for? These two things? Or do you have something else in mind? | |||
::Thanks for the feedback! — ] (]) 21:40, 8 September 2013 (UTC) | |||
Improved the fuzzy logic, it'll now try to match derivative compounded codes before falling back to the base code. — ] (]) 11:07, 9 September 2013 (UTC) | |||
*{{tlf|ISO 639 name/sandbox|zh-Hant-CN}} → <nowiki>{{ISO 639 name/sandbox|zh-Hant-CN}}</nowiki> | |||
*{{tlf|ISO 639 name/sandbox|zh-Hant}} → <nowiki>{{ISO 639 name/sandbox|zh-Hant}}</nowiki> | |||
*{{tlf|ISO 639 name/sandbox|zh}} → <nowiki>{{ISO 639 name/sandbox|zh}}</nowiki> | |||
All <nowiki>{{#ifexist:{{ISO 639 name {{{1}}}}}| ... }}</nowiki> tests will need to be changed to use #if and a vertical bar. They'll still work after importing sandbox 'cos they don't interact with this template, so this can be done after deploying the module -- but before deleting all the ISO 639 name templates. — ] (]) 08:16, 12 September 2013 (UTC) | |||
<!--{{edit protected}}--> | |||
<s>Import the sandbox to go live with the module. — ] (]) 11:26, 13 September 2013 (UTC)</s> | |||
:Thanks for taking the time to write this! I was just thinking that the language name templates were overly complex as I was fulfilling your edit requests - and now I see that's what you had in mind from the start. By the way, I've made some tweaks to the whitespace and to the comma placement. There are a few different styles out there that I've seen in use, but indentation in the module namespace is always done with four spaces, as far as I've seen. The same goes for the comma placement - in the module namespace, I've only ever seen them at the end of the relevant line, not at the start of the next one. <p>Also, I agree with Amalthea about the nil values, and I've removed them all again. It seems like getting Lua to process a lot of table entries for not much reason. I know Lua is very fast when compared to templates, but why make it do the work when it doesn't have to? If you want to include the keys for maintenance purposes, probably commenting them out would be a better idea. Or, my preferred solution, you could make a subpage somewhere listing all of them that wouldn't actually be used in the live template.</p> <p>And finally, is there any chance you could create ] and <nowiki>]</nowiki>? It would be useful to have some documentation specific to the modules, even if only to say that all it does is implement the old ISO 639 name template. Best — ''''']''''' <sup>]</sup> 12:31, 13 September 2013 (UTC)</p> | |||
::Re. the nils, they're only processed once (and discarded) when the data is imported. It should have no impact on performance. (I think.) | |||
::I've added documentation for ], will do the same for data in a bit. Thanks, — ] (]) 13:42, 13 September 2013 (UTC) | |||
I've replaced all the language names with their ISO names (used to be a mix of Misplaced Pages page titles and the names that were in all the ISO 639 name tpl's), which means that if this goes live now, it'll break category sorting for {{tl|lang}} and others, so I've pulled the edit request. I've also added another mode to the script (explained in module doc). Would appreciate feedback. — ] (]) 17:00, 14 September 2013 (UTC) | |||
== Loop error with blank parameter == | |||
<nowiki>{{ISO 639 name|}} (with a blank parameter)</nowiki> creates a template loop error. This is only affecting 2 pages, that I know of, {{Tl|User x}} and {{Tl|User x/doc}}. <tt>]]]</tt> 06:45, 31 March 2014 (UTC) | |||
:I put a fix in the sandbox, but I also fixed the User x templates, so I'm not sure it really needs to be applied. <tt>]]]</tt> 06:33, 5 April 2014 (UTC) | |||
== Add Hopi language == | |||
{{edit template-protected|ans=yes}}Could someone add the ] code, "'''hop'''"? I noticed it's not showing up on the <code><nowiki>{{rd from language}}</nowiki></code> template with that language code given. --] (]) 07:57, 15 November 2014 (UTC) | |||
:This can't be changed within this template; all it does is transcluding different language-specific templates. {{tnull|ISO 639 name|hop}} results in a transclusion of {{tl|ISO 639 name hop}}, which contains the language name. This works as intended: {{ISO 639 name|hop}}. | |||
:Looking at the source code of {{tl|r from alternative language}}, it displays the language only if a category for the language exists. Therefore all that is needed for the redirect template to work for Hopi redirects is creating ] and/or ]. <span style="font-family:serif;">] (])</span> 12:59, 15 November 2014 (UTC) | |||
::Just noting for future changes (once Hopi is active): test adding Hopi to the main documentation led to the aforementioned "loop error" (see previous section). We'll probably need to implement the sandbox fix, when Hopi should get included in the documentation. ] (]) 13:28, 15 November 2014 (UTC) | |||
== Help with Tuvan/Tyvan? == | |||
For <nowiki>{{ISO 639 name tyv}}</nowiki> gives <nowiki>{{ISO 639 name|tyv}}</nowiki><!-- Tuvan -->. However Tyvan is actually a redirect to Tuvan. Some of the pages that use it seem to be set to see it as Tyvan, others, like ] use Tuvan. I don't want to change the value of the template from Tyvan to Tuvan without being sure that it won't screw something up.] (]) 21:45, 18 January 2015 (UTC) | |||
== Template-protected edit request on 11 February 2015 == | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}} | |||
<!-- Begin request --> | |||
<!-- End request --> | |||
~ait″ | |||
Brayn not ait″ | |||
:] '''Not done:''' it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format.<!-- Template:ETp --> — <code class="nowrap">{{U|]}} <sup>(] • ] • ])</sup></code> 15:06, 11 February 2015 (UTC) | |||
== Describing the template == | |||
Can a description be added to explain the criteria for being in the table? I could not find ], though its page says that it has ISO 639-2 and ISO 639-3 codes. Also, a description of "Code1" through "Code4" should also be included, or the column headings should be made more descriptive in the table; the current description mentions that the template resolves three standards, but there are four codes and the relationship to the standards is not stated. —] (]) 20:47, 2 June 2015 (UTC) | |||
== Return empty string for codes not on the list == | |||
{{edit protected|Template:ISO 639 name|answered=y}} | |||
When provided with a language code that is not on the list, the template should ideally return an error message, or better yet, an empty string. However, it returns a link(?) to a nonexistent page! Can this be fixed, please? For example {{tlx|Language|xyzzy}} returns a link to <nowiki>]</nowiki>, but it should instead verify for the existence of that page and, if not found, return something else (error message, empty string... anything that can be tested with an #if). Thanks, —] (]) 15:16, 20 June 2015 (UTC) | |||
:That would require a test to see if the corresponding template exists or not. This parser function (''ifexist'') is considered "expensive" in terms of server resources, so I'm not sure if there would be any performance concerns for putting this in. Suggest we leave this for a few days to see if anyone else comments. Regards — Martin <small>(] · ])</small> 19:56, 20 June 2015 (UTC) | |||
::Just one or even half a dozen ''ifexist'' tests on a page shouldn't be a problem. Issues would arise if you tried to create a "meta page" that made ''ifexist'' checks for dozens of languages. I think this is a good idea. We have ], with over 500 pages, and it's difficult to find these without a bold red error message pointing to the offending template. I investigated ], which is in that category, and found the problem was caused by {{tlp|Leonese|Llión}}, which I found redirects to ], which is in ]. Well, doh. We need to sort this out so that nobody wastes time chasing spurious errors. – ] (]) 18:22, 4 April 2017 (UTC) | |||
::] is in ]: {{tq|dialects and other varieties of languages which do have ISO 639-3 codes; unless the variety is reclassified as a separate language, it cannot be expected to ever have an ISO code, so there is no point in listing it in the main ISO maintenance category, which is intended to capture articles where the ISO code was overlooked.}} – ] (]) 23:02, 4 April 2017 (UTC) | |||
:::That is why I left ] for later as I was working through the alphabet. You'll notice that with the exception of the (pain in the neck) linguistics articles and a few sorted under "0-9", everything from A to E has been fixed. I have been fixing errors in that category for the last month or so by creating missing templates and fixing typos, but it is a real pain with the current template. A call to {lang|foo|text in language foo} does not generate a visible error message, does not generate a call to a nonexistent template in the list of transcluded templates, and does not generate a red category. | |||
:::If you can manage to figure out which invocation of the lang template is causing the error, then you have to create a new template and a new category for that language. In short, the errors are hard to fix, and the whole system is mostly opaque. It would be wonderful if someone could fix at least one of these shortcomings, either by showing an error message or showing a red template transclusion in the "Templates used in this page". It would be even better if a bot or bored AWB user could be permitted to create "ISO 639 name xxx" templates and matching categories for every ISO 639 language code. I have and their matching categories by hand, and it's tedious. | |||
:::It has occurred to me that some Lua magic might be in order here, but I don't know the first thing about how it works. I will award bonus points for a template or module that automatically redirects all calls to "Template:ISO 639 name xxx-YYYY", where YYYY is a valid ] script, to "Template:ISO 639 name xxx". That would be amazing. – ] (]) 23:26, 4 April 2017 (UTC) | |||
::::This whole setup is looking a little crazy to me. ] is transcluded in just two articles: ] and ]. What is the template really accomplishing for the encyclopedia? This is a near-extinct language dialect. My inclination is to just substitute the template, clean up any junk left behind, and put it up for deletion. It was a mistake to create a template for something that doesn't have an ISO code in the first place. ] (]) 23:37, 4 April 2017 (UTC) | |||
::::Substituting templates one-by-one will be too tedious. Plan B. See if there can be a centralized fix to accommodate "dialect languages" without needing to create a boatload of new files with "fake-ISO" support. ] (]) 00:46, 5 April 2017 (UTC) | |||
::::Speaking of Lua magic, there is a ] – it's actually a pseudo-redirect to ], which is used by ], a module meant for replacing {{tlx|lang}} and all ]. The modules are ]. ] is invoked by ] to draw the pie chart shown in ] and {{section link|Misplaced Pages|Language editions}}. Those are the only two articles currently transcluding the module. As I said, the efficiency of modules is most leveraged in "meta pages" like that which link to a lot of different languages. – ] (]) 16:44, 5 April 2017 (UTC) | |||
* I have a fix that returns an empty string as requested. – ] (]) 16:44, 5 April 2017 (UTC) | |||
** I also patched ] to check for {{{1}}} to prevent false-positive {{tl|error}}s. Sorry it took . In the process of that, I discovered that it is standard practice for ] to call {{tl|lang}} without passing a parameter {{{1}}}. See ]; I'm wondering about that too. So as {{tl|lang}} transcludes <code><nowiki>{{ ISO 639 name {{{1}}} }}</nowiki></code> we need to accomodate {{tl|Language with name/for}}'s unconventional usage (maybe). My current fix has created ] transclusions. That's better than having template loops or transcluding ], as the ISO 639 code has ''intentionally'' not been supplied by {{tl|Language with name/for}}. So I think if we continue to tolerate and accommodate this time-consuming convoluted logic, then implementing the sandbox patch will make the undesirable ] transclusions go away. I still need to look into how to ensure that the errors {{U|Jonesey95}} wants to make easier to find are actually reported so they can get fixed more promptly. – ] (]) 17:21, 5 April 2017 (UTC) | |||
:::Thanks for doing this. I am seeing the red-linked categories, which help track down the problem transclusions. | |||
:::I wonder if it would be acceptable to use something like <code><nowiki><span style="display:none;font-size:100%" class="error">unknown ISO 639 language code</span></nowiki></code> to display an error message. Editors who want to see the error message can choose to put custom css in their .css file that displays class=error. I think there is a more elegant way to do it, though: ] calls a module that shows an error only in Preview mode, which is user-friendly, because it doesn't put red text in front of casual readers, but it shows an error to the tiny percentage of en.WP visitors who edit pages to improve them. That said, I don't know how to make an error message appear in preview mode as this ISBN Template/Module does. – ] (]) 05:16, 6 April 2017 (UTC) | |||
As a result of the categorization changes, I am seeing redirects as categories, for example in ]. Is this showing up for others? I don't know why this would happen; I would expect the "ifexist" test to pass, since there is a page at Template:ISO 639 name {1}, even if it's a redirect. – ] (]) 14:31, 8 April 2017 (UTC) | |||
:I see those redirects too. This isn't the easiest template to work on, but per that and ], we need to come up with a better solution. ] (]) 20:43, 9 April 2017 (UTC) | |||
== Where is ]?? == | |||
Was Old French this deliberately left out of this list for some reason? We have Old English, Old Irish, and Old Church Slavonic (for crissake!) but no Old ''French''? If I had more confidence with modifying the relevant code/ template I would take a stab at inserting it myself, ''mais zut alors, je ne l'ai pas! (bien que je puisse essayer!).'' Is there a story? If so, lay it on me. <font face="Verdana">]]</font> 05:43, 14 March 2016 (UTC) | |||
:The list in the documentation does not cover all the possibilities, but the template does accept Old French as an argument: {{tlx|Language|fro}}. Cordialement, —] (]) 07:15, 14 March 2016 (UTC) | |||
::Sweet! Thank you! <font face="Verdana">]]</font> 08:42, 14 March 2016 (UTC) | |||
== Template-protected edit request on 1 February 2017 == | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}} | |||
Please change ] (which doesn't exist, it's a redirect to the language family) to ]. ] (]) 05:13, 1 February 2017 (UTC) | |||
:See ] for more information. I think this editor may be looking for "sme" to represent "Northern Sami", but I'm not sure. The code "se" should probably not be used to code written language, since it is a language family. Someone with some domain expertise may be able to help more. – ] (]) 05:38, 1 February 2017 (UTC) | |||
::It looks like "Northern Sami" is correct based on the , so I've changed it with ] to ]. There are also some related categories which need to be moved - I'll do that now. — ''''']''''' <sup>]</sup> 06:42, 1 February 2017 (UTC) | |||
:::Actually, it turns out that "se" refers specifically to Northern Sami as well. "se" is the ISO 639-1 code for Northern Sami, and "sme" is the ISO 639-3 code for Northern Sami. The other Sami variants don't have an ISO 639-1 code. — ''''']''''' <sup>]</sup> 07:03, 1 February 2017 (UTC) | |||
::::Thank you, {{u|Mr. Stradivarius}}! --] (]) 11:20, 1 February 2017 (UTC) | |||
== Template-protected edit request on 28 September 2017 == | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}} | |||
Could someone please make this template substitute cleanly by wrapping the three template calls in <code><nowiki>{{{|safesubst:}}}</nowiki></code>, because it is substituted in {{tl|internetquelle}}. ]] 23:37, 28 September 2017 (UTC) | |||
:] '''Done'''<!-- Template:ETp --> — ] <small>(]'''·'''])</small> 00:13, 29 September 2017 (UTC) | |||
== Hawaiian == | |||
Could someone please add ] to the list (Code: ''haw''). I tried to do the edit myself but was quickly bogged down with vermicelli. Thank you in advance. '''<span style="font-family:Trebuchet MS; font-size:1.3em; letter-spacing:-0.07em; line-height:1em;">]]</span>''' 04:46, 24 November 2017 (UTC) | |||
: {{ISO 639 name|haw}} has already been supported by this template since 2010. ] (]) 21:15, 5 June 2018 (UTC) | |||
== Template-protected edit request on 20 September 2018 == | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}}<!-- there is an ongoing conversation; no need to reactivate this unless the conversation fades away --> | |||
Replace with <nowiki>{{#invoke:ISO 639|name|{{{1}}}}}<noinclude>{{doc|content={{ISO 639 templates|lua=yes}}}}</noinclude></nowiki> as ISO 639 has been luafied. Using ] allows for | |||
1) More types of inputs (different types of codes and names) | |||
2) The output of ISO 639-5 names (which should be supported as the name implies) | |||
3) The output of all names officially in ISO 639 (as the names are directly from ) | |||
4) Better organization | |||
– ] ] 03:05, 20 September 2018 (UTC) | |||
:Where are the test cases that show that this change won't break anything? | |||
: | |||
:As it stands right now, {{tlx|lang}} has a similar database. I had intended to modify this template to use {{tld|lang}}'s data but hadn't yet got round to it. I don't think that en.wiki should have two (or more) databases that hold more-or-less the same thing. | |||
:—] (]) 08:18, 20 September 2018 (UTC) | |||
:: {{ping|Trappist the monk}} ] allows for more inputs then lang. I'll make a test case. I feel as if ISO 639's database and ] databases combined are more complete then lang's. – ] ] 12:28, 20 September 2018 (UTC) | |||
:: Test-cases at ] – ] ] 12:34, 20 September 2018 (UTC) | |||
:::{{tlx|lang}} has a specific purpose which is to correctly label text using the <code>lang=</code> html attribute. The value assigned to that attribute must be listed in the IANA so that browsers and screen readers understand the meaning of the attribute value. The IANA registry derives from the various ISO 639, 15924, 3166 standards so for the purposes of {{tlx|ISO 639 name}}, the {{tld|lang}} data is sufficient. For the enhancements that you propose, {{tld|ISO 639 name}} can get 639-1 names from ]; can get 639-3 names from ]. {{tld|lang}} has no use for explicit 639-2 and 639-5 nor for the non-IANA codes from 15924. I would advocate for the creation of separate ] and ] in the same format as Module:Language/data/ISO 639-3. This lends some amount of efficiency because for the typical case of <code><nowiki>{{</nowiki>ISO 639 name|<{{var|code}}>}}</code> you search the tables by indexing into them rather than by the cumbersome, time-consuming, brute-force search as is done in ]. For the name-to-code reverse lookup, a separate table could be created by automation that would combine the separate 639-1 data from ], and the 639-2, -3, -5 tables to make a table of tables: <code> = {639_1code, 639_2code, 639_3code, 639_5code},</code>. | |||
:: | |||
:::There is a bug: <code><nowiki>{{ISO 639 name/sandbox|ang}}</nowiki></code> → {{ISO 639 name/sandbox|ang}} | |||
:::—] (]) 13:56, 20 September 2018 (UTC) | |||
:::: {{ping|Trappist the monk}} Bug fixed, If you want I can move ], ], ] and ] to module language replacing the current ones as they have more data, let me know waht you wan, all I really want is a tempalte that does what the name implies (that includes returning ] names. The current sub template is a mess and is very confusing, so it needs to converted to lua one way of another. Also, how is ] related to language? – ] ] 19:51, 20 September 2018 (UTC) | |||
::::::] '''Not done:''' please make your requested changes to the template's sandbox first; see ].<!-- Template:ETp --> {{u|BrandonXLF}}, given that one bug has been uncovered so far the testcases need to show that '''all''' the existing uses work, which means all 1678 of the languages used by the existing template in ], not the languages in the module's code. | |||
{{cot|1678 languages in Special:PrefixIndex/Template:ISO 639 name, stripped to the bare language}} | |||
<poem> | |||
1bd | |||
AR | |||
Arab | |||
Arabic | |||
Bengali | |||
Bn | |||
Cherokee | |||
DE | |||
De | |||
En | |||
FR | |||
Fa | |||
Fr | |||
French | |||
Hluw | |||
IS | |||
IT | |||
It | |||
JA | |||
Ja-Latn | |||
Knn | |||
LA | |||
La | |||
Lat | |||
Latein | |||
Old Catalan | |||
Pa | |||
Persian | |||
RU | |||
Scots | |||
Si | |||
Sinhala | |||
Urdu | |||
XYZ | |||
Zh | |||
aa | |||
aae | |||
aar | |||
aat | |||
aat-Latn | |||
ab | |||
ab-Cyrl | |||
abe | |||
abk | |||
abq | |||
ace | |||
ach | |||
acm | |||
acm-Arab | |||
acw | |||
acy | |||
ada | |||
ady | |||
ady-Cyrl | |||
ady-Latn | |||
ae | |||
ae-Latn | |||
aeb | |||
aec | |||
af | |||
afa | |||
afb | |||
afh | |||
afr | |||
afr-Latn | |||
agg | |||
agg-Latn | |||
ags | |||
agx | |||
aho | |||
aii | |||
aii-Latn | |||
aii-Syrc | |||
aii-syrc | |||
ain | |||
ain-Kana | |||
ain-Latn | |||
ajp | |||
ajt | |||
ak | |||
aka | |||
akk | |||
akk-Latn | |||
akl | |||
akz | |||
alb | |||
ale | |||
ale-Latn | |||
aln | |||
alq | |||
als | |||
alt | |||
am | |||
am-Ethi | |||
am-Latn | |||
amh | |||
ami | |||
an | |||
ang | |||
ank | |||
anm | |||
anp | |||
any | |||
aoi | |||
aoi-Latn | |||
apa | |||
apc | |||
apj | |||
apm | |||
apw | |||
aqc | |||
aqc-Cyrl | |||
ar | |||
ar-DZ | |||
ar-Latn | |||
arLatn | |||
ara | |||
arb | |||
arc | |||
arc-Hebr | |||
arc-Latn | |||
arg | |||
arg-Latn | |||
arm | |||
arm-Latn | |||
arn | |||
arp | |||
arq | |||
arq-Latn | |||
art | |||
arw | |||
ary | |||
arz | |||
arz-Latn | |||
as | |||
as-Latn | |||
asb | |||
ase | |||
asf | |||
asm | |||
ast | |||
ast-Latn | |||
atb | |||
ath | |||
ath-Latn | |||
atv | |||
auc | |||
av | |||
av-Cyrl | |||
av-Latn | |||
ava | |||
ave | |||
avk | |||
avl | |||
awa | |||
awc | |||
axm | |||
ay | |||
ayh | |||
ayl | |||
ayl-Arab | |||
aym | |||
aym-Latn | |||
ayn | |||
ayp | |||
az | |||
az-Arab | |||
az-Cyrl | |||
az-Latn | |||
azb | |||
aze | |||
azj | |||
ba | |||
ba-Cyrl | |||
bak | |||
bal | |||
bam | |||
ban | |||
baq | |||
bar | |||
bas | |||
bat-smg | |||
bbc | |||
bca | |||
bcc | |||
bci | |||
bcl | |||
be | |||
be-Latn | |||
be-tarask | |||
be-x-old | |||
bej | |||
bel | |||
bem | |||
ben | |||
ber | |||
ber-Arab | |||
ber-Latn | |||
ber-Tfng | |||
bew | |||
bfa | |||
bfi | |||
bfq | |||
bft | |||
bg | |||
bg-Cyrl | |||
bg-Latin | |||
bg-Latn | |||
bg-latn | |||
bgc | |||
bgn | |||
bgp | |||
bgq | |||
bh | |||
bho | |||
bi | |||
bih | |||
bik | |||
bik-Latn | |||
bin | |||
bis | |||
bjn | |||
bla | |||
bm | |||
bn | |||
bn-Beng | |||
bn-Latn | |||
bnn | |||
bnn-Latn | |||
bns | |||
bns-Latn | |||
bnt | |||
bo | |||
bo-Hani | |||
bo-Latn | |||
bo-Tibt | |||
bod | |||
bos | |||
bpy | |||
bqi | |||
br | |||
bra | |||
bra-Latn | |||
bre | |||
brh | |||
brx | |||
bs | |||
bs-Arab | |||
bsk | |||
btg | |||
btx | |||
bua | |||
bug | |||
bug-Latn | |||
bul | |||
bur | |||
bxr | |||
bxr-Cyrl | |||
byq | |||
byq-Latn | |||
ca | |||
ca-valencia | |||
cab | |||
cak | |||
cal | |||
car | |||
cat | |||
cay | |||
cba | |||
cbk | |||
cbk-zam | |||
cbv | |||
ccp | |||
cdo | |||
cdo-Hani | |||
cdo-Latn | |||
ce | |||
ce-Cyrl | |||
ce-Latn | |||
cea | |||
ceb | |||
ceb-Latn | |||
cel | |||
cel-Grek | |||
cel-Latn | |||
ces | |||
cg | |||
cgc | |||
ch | |||
ch-Latn | |||
cha | |||
chb | |||
che | |||
che-Cyrl | |||
che-Latn | |||
chg | |||
chg-Latn | |||
chi | |||
chm | |||
chn | |||
cho | |||
chp | |||
chp-Latn | |||
chr | |||
chr-Latn | |||
chu | |||
chv | |||
chy | |||
cic | |||
cic-Latn | |||
cim | |||
ciw | |||
cjs | |||
ckb | |||
ckb-Latn | |||
ckt | |||
cku | |||
ckv | |||
clc | |||
clc-Latn | |||
clm | |||
clw | |||
cmg | |||
cmn | |||
cmn-Hani | |||
cmn-Hans | |||
cmn-Hant | |||
cmn-Latn | |||
cng | |||
cnh | |||
cnr | |||
cnx | |||
co | |||
coa | |||
coc | |||
com | |||
com-Latn | |||
cop | |||
cop-Latn | |||
cor | |||
cos | |||
cpx | |||
cqd | |||
cr | |||
cr-Cans | |||
cr-Latn | |||
crb | |||
cre | |||
crh | |||
crh-Arab | |||
crh-Latn | |||
crk | |||
crk-Cans | |||
crk-Latn | |||
cro | |||
crs | |||
crx | |||
cs | |||
csb | |||
css | |||
cst | |||
csz | |||
ctm | |||
cu | |||
cu-Glag | |||
cu-Latn | |||
cv | |||
cwd | |||
cwd-Latn | |||
cy | |||
cym | |||
cz | |||
cze | |||
czo | |||
da | |||
dag | |||
dak | |||
dak-Latn | |||
dan | |||
dar | |||
ddo | |||
ddo-Cyrl | |||
de | |||
de-AT | |||
de-CH | |||
del | |||
deu | |||
dev | |||
dga | |||
dgo | |||
dgr | |||
dik | |||
din | |||
diq | |||
div | |||
dlm | |||
dng | |||
dsb | |||
dua | |||
dum | |||
dut | |||
dv | |||
dv-Latn | |||
dyu | |||
dyy | |||
dz | |||
dz-Latn | |||
dzo | |||
ee | |||
ee-Latn | |||
efi | |||
egl | |||
egy | |||
egy-Latn | |||
eko | |||
el | |||
el-Latn | |||
ell | |||
elx | |||
elx-Latn | |||
eml | |||
eml-Latn | |||
en | |||
en-AU | |||
en-CA | |||
en-GB | |||
en-IE | |||
en-Latn | |||
en-Shaw | |||
en-US | |||
en-au | |||
en-gb | |||
eng | |||
enm | |||
enq | |||
enq-Latn | |||
eo | |||
epo | |||
es | |||
es-MX | |||
es-PH | |||
ess | |||
est | |||
esu | |||
et | |||
et-Latn | |||
ett | |||
ett-Latn | |||
eu | |||
eus | |||
evn | |||
ewe | |||
ext | |||
eya | |||
eya-Latn | |||
fa | |||
fa-Arab | |||
fa-Latn | |||
fan | |||
fao | |||
fas | |||
fax | |||
ff | |||
fi | |||
fij | |||
fil | |||
fin | |||
fit | |||
fiu-vro | |||
fj | |||
fj-Latn | |||
fkv | |||
fla | |||
fo | |||
fo-Latn | |||
fon | |||
fr | |||
fr-Brai | |||
fra | |||
frc | |||
fre | |||
french | |||
frk | |||
frm | |||
fro | |||
frp | |||
frr | |||
fry | |||
fuc | |||
fuf | |||
ful | |||
fur | |||
fy | |||
ga | |||
gaa | |||
gag | |||
gah | |||
gah-Latn | |||
gal | |||
gan | |||
gay | |||
gbm | |||
gbz | |||
gcf | |||
gct | |||
gd | |||
gej | |||
gem | |||
gem-Latn | |||
gem-pro | |||
geo | |||
ger | |||
gez | |||
gez-Ethi | |||
ghc | |||
gil | |||
gju | |||
gkm | |||
gkn | |||
gl | |||
gl-Latn | |||
gla | |||
gle | |||
glg | |||
glk | |||
glv | |||
gmh | |||
gml | |||
gmo | |||
gmq | |||
gmw | |||
gmy | |||
gmy-Latn | |||
gn | |||
goh | |||
gom | |||
gos | |||
got | |||
got-Latn | |||
goyu | |||
grc | |||
grc-Grek | |||
grc-Latn | |||
grc-Linb | |||
grc-att | |||
grc-dor | |||
grc-gre | |||
gre | |||
greek | |||
gri | |||
grn | |||
grt | |||
gsw | |||
gu | |||
guc | |||
guj | |||
gul | |||
gup | |||
gv | |||
gwi | |||
gwi-Latn | |||
ha | |||
ha-Latn | |||
haa | |||
haa-Latn | |||
hai | |||
hai-Latn | |||
hak | |||
hak-Hani | |||
hat | |||
hau | |||
haw | |||
haz | |||
hbo | |||
hbo-Latn | |||
hbs | |||
hbs-Cyrl | |||
hbs-Latn | |||
he | |||
he-Latn | |||
he-n | |||
heb | |||
her | |||
hi | |||
hi-Deva | |||
hi-Latn | |||
hid | |||
hif | |||
hil | |||
hin | |||
hin-Deva | |||
hit | |||
hit-Latn | |||
hiw | |||
hk | |||
hlu | |||
hmn | |||
hmo | |||
hms | |||
hmv | |||
hnd | |||
hne | |||
hni | |||
ho | |||
hoc | |||
hop | |||
hr | |||
hr-Cyrl | |||
hrv | |||
hsb | |||
hsn | |||
hsn-Hani | |||
ht | |||
ht/doc | |||
hts | |||
hu | |||
hun | |||
hur | |||
hwc | |||
hy | |||
hy-Armn | |||
hy-Latn | |||
hye | |||
hz | |||
ia | |||
iba | |||
ibb | |||
ibd | |||
ibl | |||
ibo | |||
ice | |||
id | |||
id-Latn | |||
ido | |||
ie | |||
ig | |||
ig-Latn | |||
igl | |||
ii | |||
ii-Latn | |||
ii-Yiii | |||
iii | |||
iir | |||
ijn | |||
ik | |||
ike | |||
ikt | |||
iku | |||
iku-Latn | |||
ile | |||
ilo | |||
ina | |||
inc | |||
inc-Latn | |||
ind | |||
ine | |||
inh | |||
inh-Cyrl | |||
inh-Latn | |||
io | |||
ipk | |||
irk | |||
iro | |||
is | |||
isl | |||
isl-Latn | |||
iso | |||
it | |||
ita | |||
itc | |||
itl | |||
itl-Cyrl | |||
its | |||
iu | |||
iu-Cans | |||
iu-Latn | |||
ium | |||
ium-Latn | |||
ivv | |||
izh | |||
ja | |||
ja-Hani | |||
ja-Hant | |||
ja-Hira | |||
ja-Hrkt | |||
ja-Jpan | |||
ja-Kana | |||
ja-Latn | |||
jac | |||
jam | |||
jav | |||
jbo | |||
jct | |||
jje | |||
jp | |||
jpa | |||
jpn | |||
jrb | |||
jur | |||
jv | |||
jv-Java | |||
jv-Latn | |||
ka | |||
ka-Kanl | |||
ka-Latn | |||
kaa | |||
kab | |||
kab-Arab | |||
kab-Latn | |||
kab-Tfng | |||
kac | |||
kal | |||
kam | |||
kan | |||
kar | |||
kas | |||
kat | |||
kau | |||
kaw | |||
kaz | |||
kbd | |||
kbd-Cyrl | |||
kbp | |||
kca | |||
kck | |||
kdd | |||
kdr | |||
kdr-Cyrl | |||
kdr-Latn | |||
kea | |||
kek | |||
ket | |||
ket-Cyrl | |||
kex | |||
kg | |||
kgp | |||
kgp-latn | |||
kha | |||
khb | |||
khb-Talu | |||
khk | |||
khk-Cyrl | |||
khk-Latn | |||
khm | |||
khw | |||
ki | |||
kik | |||
kin | |||
kio | |||
kir | |||
kj | |||
kjh | |||
kjp | |||
kjz | |||
kk | |||
kk-Arab | |||
kk-Cyrl | |||
kk-Latn | |||
kkc | |||
kkc-Latn | |||
kl | |||
kl-Latn | |||
kla | |||
kls | |||
km | |||
km-Khmr | |||
km-Latn | |||
kmb | |||
kmr | |||
kn | |||
kn-Knda | |||
kn-Latn | |||
kne | |||
knn | |||
knn-Latn | |||
ko | |||
ko-Hang | |||
ko-Hani | |||
ko-Hant | |||
ko-Kang | |||
ko-Kore | |||
ko-Latn | |||
koi | |||
kok | |||
kom | |||
kon | |||
kor | |||
kpj | |||
kpj-Latn | |||
kpo | |||
kpv | |||
kpy | |||
kqn | |||
kr | |||
krb | |||
krc | |||
krc-Latn | |||
krj | |||
krl | |||
ks | |||
ks-Arab | |||
ks-Deva | |||
ksh | |||
ksk | |||
ksw | |||
ksw-Latn | |||
kto | |||
ktz | |||
ku | |||
ku-Arab | |||
ku-Latn | |||
kua | |||
kum | |||
kum-Latn | |||
kur | |||
kur-Latn | |||
kut | |||
kut-Latn | |||
kv | |||
kw | |||
kw-Latn | |||
kwk | |||
kwn | |||
kxd | |||
kxm | |||
ky | |||
ky-Arab | |||
ky-Cyrl | |||
ky-Latn | |||
kyw | |||
kzg | |||
la | |||
la-FR | |||
la-Latn | |||
lab | |||
lab-Lina | |||
lad | |||
lad-Hebr | |||
lad-Latn | |||
lao | |||
lat | |||
lav | |||
lb | |||
lbe | |||
lbj | |||
lep | |||
lez | |||
lez-Cyrl | |||
lez-Latn | |||
lfn | |||
lg | |||
lgg | |||
lht | |||
lhu | |||
li | |||
lij | |||
lil | |||
lim | |||
lin | |||
link | |||
lis | |||
lit | |||
liv | |||
ljp | |||
lki | |||
lkn | |||
lkt | |||
lld | |||
lmn | |||
lmo | |||
ln | |||
lng | |||
lo | |||
lo-Latn | |||
lol | |||
lou | |||
loz | |||
lrc | |||
lre | |||
lrz | |||
lt | |||
lt-Latn | |||
ltg | |||
ltz | |||
lu | |||
lua | |||
lub | |||
lug | |||
lun | |||
luo | |||
lus | |||
lut | |||
luy | |||
luz | |||
lv | |||
lzh | |||
lzz | |||
lzz-Latn | |||
mac | |||
mad | |||
mag | |||
mah | |||
mai | |||
mal | |||
mam | |||
mao | |||
mao-Latn | |||
map-bms | |||
mar | |||
mas | |||
may | |||
mcf | |||
mdf | |||
mfe | |||
mg | |||
mga | |||
mh | |||
mhd | |||
mhi | |||
mhn | |||
mhr | |||
mi | |||
mi-Latn | |||
mic | |||
mid | |||
mik | |||
min | |||
miq | |||
mis | |||
mis-Cyrl | |||
mis-Latn | |||
mix | |||
mk | |||
mk-Latn | |||
mkd | |||
ml | |||
ml-Arab | |||
ml-Latn | |||
mla | |||
mlg | |||
mlt | |||
mlw | |||
mn | |||
mn-Cyrl | |||
mn-Latn | |||
mn-Mong | |||
mn-latn | |||
mnc | |||
mnh | |||
mni | |||
mnp | |||
mns | |||
mnw | |||
mo | |||
moe | |||
moh | |||
mol | |||
mon | |||
mop | |||
mos | |||
mov | |||
mpq | |||
mqm | |||
mr | |||
mr-Deva | |||
mr-Latn | |||
mrc | |||
mri | |||
mrj | |||
mrq | |||
mrw | |||
ms | |||
ms-Arab | |||
ms-Latn | |||
msa | |||
mt | |||
mt-Latn | |||
mtq | |||
mus | |||
mvf | |||
mvf-Latn | |||
mvi | |||
mwl | |||
mwp | |||
mwp-Latn | |||
mwr | |||
mwr-Deva | |||
mwv | |||
mww | |||
mxi | |||
my | |||
my-Latn | |||
my-Mymr | |||
mya | |||
myi | |||
myi-Latn | |||
myn | |||
myn-Latn | |||
myp | |||
myp-Latn | |||
myv | |||
mzn | |||
na | |||
nah | |||
nah-Latn | |||
nal | |||
nan | |||
nan-Hani | |||
nan-Hant | |||
nan-Latn | |||
nap | |||
naq | |||
nau | |||
nav | |||
nb | |||
nbl | |||
ncg | |||
nci | |||
nd | |||
ndc | |||
nde | |||
ndo | |||
nds | |||
nds-nl | |||
ne | |||
ne-Latn | |||
nep | |||
nep-Deva | |||
new | |||
nez | |||
ng | |||
ngo | |||
nhn | |||
niu | |||
niv | |||
nl | |||
nl-BE | |||
nl-Latn | |||
nld | |||
nmn | |||
nmn-Latn | |||
nn | |||
nno | |||
no | |||
no-Latn | |||
nob | |||
nod | |||
nog | |||
nok | |||
non | |||
non-Runr | |||
nor | |||
nov | |||
nr | |||
nrf | |||
nrm | |||
nrn | |||
nse | |||
nsm | |||
nso | |||
ntj | |||
nv | |||
nv-Latn | |||
nwc | |||
ny | |||
nya | |||
nym | |||
nyn | |||
nys | |||
nyu | |||
nzi | |||
oar | |||
obt | |||
oc | |||
och | |||
oci | |||
oci-Latn | |||
oco | |||
odt | |||
ofs | |||
ohu | |||
oj | |||
oj-Cans | |||
oj-Latn | |||
ojb | |||
ojc | |||
ojg | |||
oji | |||
ojp | |||
ojs | |||
ojw | |||
ojw-Cans | |||
ojw-Latn | |||
okm | |||
olo | |||
om | |||
omc | |||
omn | |||
one | |||
ono | |||
onw | |||
ood | |||
opt | |||
or | |||
or-Latn | |||
ori | |||
orm | |||
orv | |||
os | |||
osp | |||
oss | |||
osx | |||
ota | |||
ota-Arab | |||
ota-Latn | |||
otk | |||
oto | |||
otw | |||
oty | |||
oui | |||
ovd | |||
owl | |||
pa | |||
pa-Guru | |||
pa-Latn | |||
pa-PK | |||
pag | |||
pal | |||
pal-Avst | |||
pal-Latn | |||
pam | |||
pan | |||
pao | |||
pap | |||
pau | |||
pcd | |||
pdc | |||
pdt | |||
pdt-Latn | |||
peo | |||
peo-Latn | |||
per | |||
pfl | |||
pgl | |||
phl | |||
phn | |||
phn-Latn | |||
phr | |||
pi | |||
pi-Latn | |||
pih | |||
pis | |||
pit | |||
pjt | |||
pka | |||
pl | |||
pld | |||
pli | |||
pms | |||
pnb | |||
pnb-Arab | |||
pnt | |||
pny | |||
pol | |||
por | |||
poz | |||
ppk | |||
ppl | |||
pqm | |||
prg | |||
prk | |||
prl | |||
pro | |||
pro-gem | |||
prs | |||
ps | |||
ps-Latn | |||
psu | |||
pt | |||
pt-BR | |||
pt-Latn | |||
pt-br | |||
ptj | |||
pus | |||
pwm | |||
pyu | |||
qu | |||
quc | |||
que | |||
que-Latn | |||
qui | |||
qya | |||
raj | |||
raj-Latn | |||
rap | |||
rap-Latn | |||
rar | |||
rcf | |||
rgn | |||
rki | |||
rm | |||
rmq | |||
rmu | |||
rmy | |||
rn | |||
ro | |||
ro-Cyrl | |||
ro-Latn | |||
roa | |||
roa-rup | |||
roa-tara | |||
roh | |||
roh-Latn | |||
rom | |||
ron | |||
rtm | |||
ru | |||
ru-1708 | |||
ru-Cyril | |||
ru-Cyrl | |||
ru-Latn | |||
rue | |||
rum | |||
run | |||
ruo | |||
rup | |||
rus | |||
rut | |||
rw | |||
ryu | |||
sa | |||
sa-Deva | |||
sa-Latn | |||
sad | |||
sag | |||
sah | |||
sah-Cyrl | |||
sal | |||
san | |||
sat | |||
sax | |||
saz | |||
sc | |||
scl | |||
scn | |||
scn-Latn | |||
sco | |||
scr | |||
sd | |||
sd-Arab | |||
sd-Deva | |||
sd-Latn | |||
sd-arab | |||
sdc | |||
sdh | |||
sdn | |||
se | |||
se-Latn | |||
see | |||
seh | |||
sei | |||
sei-Latn | |||
sem | |||
sem-Latn | |||
seto | |||
sg | |||
sga | |||
sgc | |||
sgn | |||
sgs | |||
sh | |||
sh-Cyrl | |||
sh-Latn | |||
shh | |||
shi | |||
shn | |||
shs | |||
shy | |||
si | |||
si-Latn | |||
sia | |||
simple | |||
sin | |||
sio | |||
sip | |||
sjd | |||
sjd-Latn | |||
sje | |||
sjn | |||
sjw | |||
sjw-Latn | |||
sk | |||
sk-Latn | |||
ska | |||
skg | |||
skr | |||
sl | |||
sla | |||
sla-Latn | |||
sli | |||
slk | |||
slo | |||
slr | |||
slv | |||
slv-Latn | |||
sm | |||
sma | |||
sme | |||
smi | |||
smj | |||
smn | |||
smo | |||
sms | |||
sn | |||
sn-Latn | |||
sna | |||
snd | |||
so | |||
so-Arab | |||
so-Latn | |||
som | |||
son | |||
sot | |||
sou | |||
spa | |||
sq | |||
sqi | |||
sqo | |||
sqt | |||
squ | |||
sr | |||
sr-Cyrl | |||
sr-Latn | |||
src | |||
srd | |||
srd-Latn | |||
srn | |||
sro | |||
srp | |||
srr | |||
ss | |||
ssf | |||
sso | |||
sso-Latn | |||
ssw | |||
st | |||
stq | |||
str | |||
sty | |||
su | |||
sul | |||
sun | |||
sus | |||
sux | |||
sux-Latn | |||
suz | |||
sv | |||
sva | |||
svc | |||
sw | |||
swa | |||
swa-Latn | |||
swb | |||
swe | |||
swg | |||
sxr | |||
sxu | |||
syc | |||
syl | |||
syl-Beng | |||
syl-Latn | |||
syl-Sylo | |||
syr | |||
szl | |||
ta | |||
ta-Arab | |||
ta-Latn | |||
taa | |||
tab | |||
tah | |||
tam | |||
tao | |||
taq | |||
tat | |||
tay | |||
tcb | |||
tcb-Latn | |||
tce | |||
tce-Latn | |||
tcx | |||
tcy | |||
tcy-Knda | |||
tcy-Latn | |||
tcy-Mlym | |||
tdd | |||
te | |||
te-Latn | |||
te-Telu | |||
tel | |||
tem | |||
teo | |||
test | |||
tet | |||
tg | |||
tg-Arab | |||
tg-Cyrl | |||
tg-Latn | |||
tg-arab | |||
tg-latn | |||
tgk | |||
tgl | |||
th | |||
th-Latn | |||
th-Thai | |||
tha | |||
thn | |||
thp | |||
tht | |||
ti | |||
tib | |||
tir | |||
tiw | |||
tk | |||
tk-Arab | |||
tk-Cyrl | |||
tk-Latn | |||
tkl | |||
tkn | |||
tkr | |||
tkr-Cyrl | |||
tl | |||
tl-Latn | |||
tlh | |||
tli | |||
tll | |||
tmh | |||
tmh-Tfng | |||
tmr | |||
tmr-Latn | |||
tn | |||
tnq | |||
to | |||
toi | |||
tol | |||
ton | |||
tow | |||
tpi | |||
tql | |||
tr | |||
trk | |||
trv | |||
ts | |||
tsd | |||
tsg | |||
tsi | |||
tsn | |||
tso | |||
tt | |||
tt-Cyrl | |||
tt-Latn | |||
ttm | |||
ttm-Latn | |||
ttr | |||
tts | |||
ttt | |||
tuk | |||
tum | |||
tun | |||
tun-Latn | |||
tur | |||
tus | |||
tut | |||
tvl | |||
tw | |||
twi | |||
ty | |||
tyv | |||
tyv-Latn | |||
tzl | |||
tzm | |||
uby | |||
udi | |||
udm | |||
udm-Cyrl | |||
udm-Latn | |||
ug | |||
ug-Arab | |||
ug-Cyrl | |||
ug-Latn | |||
uga | |||
uga-Latn | |||
uig | |||
uk | |||
uk-Cyrl | |||
uk-Latn | |||
ukr | |||
uli | |||
umu | |||
und | |||
und-Cyrl | |||
und-Deva | |||
und-Grek | |||
und-Hani | |||
und-Hant | |||
und-lat | |||
undefined | |||
unm | |||
ur | |||
ur-Latn | |||
urd | |||
ure | |||
ute | |||
uun | |||
uy | |||
uz | |||
uz-Arab | |||
uz-Cyrl | |||
uz-Latn | |||
uzb | |||
uzb-Cyrl | |||
uzb-Latn | |||
va | |||
ve | |||
vec | |||
ven | |||
vep | |||
vep-Latn | |||
vi | |||
vi-Hani | |||
vie | |||
vl | |||
vls | |||
vmw | |||
vo | |||
vol | |||
vot | |||
vro | |||
wa | |||
wae | |||
wal | |||
wam | |||
war | |||
was | |||
wbl | |||
wel | |||
wen | |||
wep | |||
wes | |||
wlm | |||
wln | |||
wls | |||
wo | |||
wol | |||
wrg | |||
wrr | |||
wuu | |||
wuu-Hani | |||
wuu-Hans | |||
wuu-Hant | |||
wym | |||
xaa | |||
xaa-Latn | |||
xal | |||
xal-RU | |||
xam | |||
xbc | |||
xbr | |||
xcb | |||
xce | |||
xcl | |||
xct | |||
xdk | |||
xgf | |||
xh | |||
xh-Latn | |||
xho | |||
xhu | |||
xlc | |||
xlc-Latn | |||
xld | |||
xld-Grek | |||
xld-Latn | |||
xmf | |||
xmm | |||
xng | |||
xno | |||
xog | |||
xpg | |||
xpi | |||
xpr | |||
xpr-Latn | |||
xpu | |||
xsb | |||
xsc | |||
xsr | |||
xtg | |||
xtg-Grek | |||
xum | |||
xur | |||
yap | |||
yaq | |||
ybe | |||
yi | |||
yi-Hebr | |||
yi-Latn | |||
yid | |||
ykg | |||
ymm | |||
yo | |||
yor | |||
yox | |||
ypk | |||
ypk-Latn | |||
yrk | |||
yrl | |||
yua | |||
yuc | |||
yue | |||
yue-Hani | |||
yue-Hant | |||
yue-Latn | |||
yuf | |||
yuf-hav | |||
za | |||
za-Latn | |||
zap | |||
zap-Latn | |||
zea | |||
zen | |||
zgh | |||
zh | |||
zh-Arab | |||
zh-Bopo | |||
zh-CN | |||
zh-HK | |||
zh-Hani | |||
zh-Hans | |||
zh-Hans-CN | |||
zh-Hans-SG | |||
zh-Hant | |||
zh-Hant-HK | |||
zh-Hant-TW | |||
zh-Latn | |||
zh-Latn-pinyin | |||
zh-TW | |||
zh-classical | |||
zh-cn | |||
zh-hak-Latn | |||
zh-han | |||
zh-hang | |||
zh-hans | |||
zh-hans-CN | |||
zh-hant | |||
zh-hk | |||
zh-latn-pinyin | |||
zh-min-nan | |||
zh-mo | |||
zh-my | |||
zh-s | |||
zh-sg | |||
zh-t | |||
zh-tw | |||
zh-wuu-Hans | |||
zh-wuu-Latn | |||
zh-yue | |||
zha | |||
zha-Latn | |||
zho | |||
zlw | |||
zpi | |||
zsm | |||
zts | |||
zu | |||
zul | |||
zun | |||
zun-Latn | |||
zxx | |||
zza | |||
</poem> | |||
{{cob}} | |||
::::::As an aside, (and please, don't take this the wrong way) when you're trying to show that you've been attentive to detail, leaving 3 spelling mistakes & unclosed brackets in your final comment doesn't help your case. ] (]) 08:57, 21 September 2018 (UTC) | |||
:::::::A very large part of the problem with the {{tlx|ISO 639 name}} suite of templates is that too many of the 'codes' that they support, aren't ISO 639 codes: | |||
:::::::*<code><nowiki>{{ISO 639 name 1bd}}</nowiki></code> → <nowiki>{{ISO 639 name|1bd}}</nowiki><!-- Common Brittonic --> : <code>1bd</code> is a ] identifier so doesn't belong in an ISO template | |||
:::::::*<code><nowiki>{{ISO 639 name Arab}}</nowiki></code> → {{ISO 639 name|ar}}<!-- Arabic --> : <code>Arab</code> is four characters so is not an ISO 639 code; is an ISO 15924 script code | |||
:::::::*<code><nowiki>{{ISO 639 name Cherokee}}</nowiki></code> → {{ISO 639 name|chr}}<!-- Cherokee --> : <code>Cherokee</code> is a language name; why call a template with a language name to render that same name? (<code>chr</code> → {{ISO 639 name|chr}}<!-- Cherokee -->) | |||
:::::::*<code><nowiki>{{ISO 639 name Hluw}}</nowiki></code> → <nowiki>{{ISO 639 name|Hluw}}</nowiki><!-- Anatolian hieroglyphic --> : <code><nowiki>Hluw</nowiki></code> is an ISO 15924 script code | |||
:::::::*<code><nowiki>{{ISO 639 name Ja-Latn}}</nowiki></code> → {{ISO 639 name|ja}}<!-- Japanese --> : an ISO 639 code with an ISO 15924 script suffix is no longer an ISO code but is an IETF language tag | |||
:::::::*<code><nowiki>{{ISO 639 name ar-DZ}}</nowiki></code> → {{ISO 639 name|ar}}<!-- Arabic --> : an ISO 639 code with an ISO 3166 region suffix is no longer an ISO code but is an IETF language tag | |||
:::::::*<code><nowiki>{{ISO 639 name be-tarask}}</nowiki></code> → <nowiki>{{ISO 639 name|be-tarask}}</nowiki><!-- Belarusian (Taraškievica) --> : an ISO 639 code with an IANA variant suffix is no longer an ISO code but is an IETF language tag | |||
:::::::*<code><nowiki>{{ISO 639 name be-x-old}}</nowiki></code> → <nowiki>{{ISO 639 name|be-tarask}}</nowiki><!-- Belarusian (Taraškievica) --> : an ISO 639 code with an IANA private-use suffix is no longer an ISO code but is an IETF language tag | |||
:::::::*<code><nowiki>{{ISO 639 name cbk-zam}}</nowiki></code> → <nowiki>{{ISO 639 name|cbk-zam}}</nowiki><!-- Zamboanga Chavacano --> : presumably <code>cbk</code> = Chavacano and <code>zam</code> = Zamboangueño; ISO 639-3 <code>zam</code> is Miahuatlán Zapotec; <code>zam</code> is not an IANA-registered extlang; <code>cbk-zam</code> is used as a sub-domain name for cbk-zam.wikipedia.org | |||
:::::::no doubt there are other non-ISO 639 'codes'. The {{tld|ISO 639 name}} templates that use 15924 script codes should use the {{tlx|ISO 15924 name}} template suite; those templates might be upgraded to use ] (which should be harmonized with ] if possible). For those 'codes' that are in the form of IETF tags, perhaps an {{tlx|IETF name}} template that takes its data from the IANA data used by {{tlx|lang}}. | |||
:::::::—] (]) 11:25, 21 September 2018 (UTC) | |||
:::::Pretty sure that I did say what it is that I thought should be done. | |||
:::: | |||
:::::3166 is the basis for the region part of an ]: pt-BR → Portuguese as used in Brasil. | |||
:::::—] (]) 09:03, 21 September 2018 (UTC) | |||
::::::{{ping|Trappist the monk}} Ok, So how you you want them moved over? I think instead of having ISO 639 name we should just call it language name and have it include IETF/IANA data. So in then end we would have a '''Script''' suite and a '''Language''' suite with other templates do special formatting to their outputs. Does that sound good? – ] ] 12:24, 21 September 2018 (UTC) | |||
:::::::It is not an issue of movement as much as it is an issue of data sourcing and then, once we have decided on sourcing, we must take a decision about how we structure and define that data. Because the data come from multiple sources (infoterm (-1), Library of Congress (-2, -5), sil (-3)), we should attempt to use data directly from the appropriate source. Alas, infoterm apparently doesn't publish the official list of 639-1 codes so we must look elsewhere for them; the likely best place being IANA which prefers -1 over -3 codes when both exist. For -2 and -5, Library of congress publishes lists of codes – the -2 list contains both -2/T and -2/B codes. For -3, sil.org publishes multiple lists that appear to sometimes contain different data for the same code depending on which file you're looking at – for example the current iso-639-3_Name_Index_20180914.tab lists two spellings of <code>aee</code> while iso-639-3_20180914.tab from the same zip file lists only one spelling. | |||
:::::: | |||
:::::::Because {{tlx|lang}} already uses 639-1 codes from the IANA and 639-3 codes from sil.org's iso-639-3_Name_Index_YYYYMMDD.tab file, those two are I think, taken care of. For 639-2, it would seem a simple matter to create ] from the LOC data in the same format as ]. For 639-5, ] (what is the source for these data?) there are the issues of format conversion and of <code>altnames</code> which do not appear in the . | |||
:::::::—] (]) 15:17, 21 September 2018 (UTC) | |||
:I've created testcases ] ] ] & ] (it's too much for 1 page). There's more that will need work beyond the dialect & script suffixes - bh, eml, & gkm caught my attention. Hope that helps, ] (]) 15:29, 21 September 2018 (UTC) | |||
::That was a bit of work, thanks. | |||
: | |||
::<code>bh</code> is a valid 639-1 code; it is the only two-character collective: <code><nowiki>{{#invoke:lang|name_from_tag|bh}}</nowiki></code> → {{#invoke:lang|name_from_tag|bh}}; <code>eml</code> is not a valid ISO 639 code (deprecated 2009); <code>gkm</code> is not currently a valid 639-3 code; see . | |||
::—] (]) 16:14, 21 September 2018 (UTC) | |||
: | |||
::testcases4 revealed a bug in ], now fixed. thanks | |||
::—] (]) 18:43, 21 September 2018 (UTC) | |||
: | |||
::The reason that the testcases had to be spread across four pages is revealed here (these parser profiling data captures from testcases2): | |||
<pre style="margin-left:4.8em">CPU time usage 6.248 seconds | |||
Real time usage 6.754 seconds | |||
Preprocessor visited node count 8,038/1,000,000 | |||
Preprocessor generated node count 0/1,500,000 | |||
Post-expand include size 19,120/2,097,152 bytes | |||
Template argument size 6,948/2,097,152 bytes | |||
Highest expansion depth 5/40 | |||
Expensive parser function count 420/500 | |||
Unstrip recursion depth 0/20 | |||
Unstrip post-expand size 0/5,000,000 bytes | |||
Number of Wikibase entities loaded 0/400 | |||
Lua time usage 5.521/10.000 seconds | |||
Lua memory usage 16.14 MB/50 MB</pre> | |||
::this one from after I added calls into ] (the IETF comments): | |||
<pre style="margin-left:4.8em">CPU time usage 6.048 seconds | |||
Real time usage 6.672 seconds | |||
Preprocessor visited node count 8,430/1,000,000 | |||
Preprocessor generated node count 0/1,500,000 | |||
Post-expand include size 22,894/2,097,152 bytes | |||
Template argument size 6,948/2,097,152 bytes | |||
Highest expansion depth 5/40 | |||
Expensive parser function count 420/500 | |||
Unstrip recursion depth 0/20 | |||
Unstrip post-expand size 0/5,000,000 bytes | |||
Number of Wikibase entities loaded 0/400 | |||
Lua time usage 5.249/10.000 seconds | |||
Lua memory usage 27.76 MB/50 MB</pre> | |||
::in both cases the expensive parser function count is approaching the limit; once converted to Lua, the count will be zero. The lua time usage metric shows that the brute-force search currently employed by ] is taking a lot of time; it shouldn't. The lua time measurement is not precise but giving scributo more work to do will not reduce the time it takes to accomplish the original work plus the new work | |||
::—] (]) 18:43, 21 September 2018 (UTC) | |||
:::{{ping|Trappist the monk}} I got the ISO 639-5 list form the Misplaced Pages article, I couldn't find any sources. I'll try to find sources for the rest and post them here. – ] ] 19:50, 21 September 2018 (UTC) | |||
::::Library of Congress is the custodian for -2 and -5. Their lists are: | |||
::::: | |||
::::: | |||
::::—] (]) 20:40, 21 September 2018 (UTC) | |||
::::::The more I look at the sub pages the more I'm confused. The naming system is a mess and there's so many sub-pages without documentation it's crazy. I think using ] for now is a good idea, and then we can merge it with ]. For now we should merge ] with ]. – ] ] 15:51, 23 September 2018 (UTC) | |||
:::::::Yes, the existing {{tlx|ISO 639 name}} template suite is confusing; that is why we are having this conversation | |||
:::::::{{tq|I think using ] for now is a good idea}} – not in its current implementation for reasons stated above | |||
:::::::{{tq|and then we can merge it with ]}} – no; the two modules have distinctly separate purposes and functionality | |||
:::::::{{tq|For now we should merge ] with ].}} – no; the two modules have distinctly separate purposes and functionality | |||
:::::::—] (]) 17:25, 23 September 2018 (UTC) | |||
::::::::{{ping|Trappist the monk}} I'm saying ] sub pages are confusing ({{tlx|ISO 639 name}} sub pages are confusing as well). I've made changes to ], how does it run now?– ] ] 20:11, 23 September 2018 (UTC) | |||
:::::::::{{u|BrandonXLF}}, Have you looked at the testcases ] ] ] & ] ?? I think the appearance of {{red|'''Lua error: not enough memory.'''}} early in each page answers your question. ] (]) 20:45, 23 September 2018 (UTC) | |||
::::::::::::... and the testpages have ended up in ]. ] (]) 20:50, 23 September 2018 (UTC) | |||
::I have hacked ]. Used in ] is doesn't run out of memory nor time when used in testcases ] ] ] & ] and renders error messages for those 'codes' that aren't ISO 639 codes. | |||
: | |||
::I'll add similar code for the {{tlx|ISO 639 code-1}}, {{tlx|ISO 639 code-2}}, and {{tlx|ISO 639 code-3}} templates. | |||
::—] (]) 22:53, 23 September 2018 (UTC) | |||
:::{{ping|Trappist the monk}} Your sandbox looks good, but it needs to be able to accept names, it needs to turn AA into aa and it needs to accept ]. Also, how's ]? – ] ] 04:59, 24 September 2018 (UTC) | |||
::::The purpose of this template is stated in the first line of its documentation: | |||
:::::The {{tlx|ISO 639 name}} template is used to resolve ], ] and ] codes to language names. | |||
::::A language name is not an ISO 639 code so the template should not accept input that is not a valid 639 code. Alas, because the current template does accept such input, any template replacement must deal with that misuse. I used an error message to show which of the testcases were not valid 639 codes so that something other than the simple error message might be done for them. At the moment I'm thinking that 'codes' that look like ietf tags will be stripped of their subtags and the result used to index into the appropriate 639 table. For non-code input, return the non-code input (perhaps decorated, perhaps not). In both of these cases, the code will add an error category so that these non-codes can be found and fixed. | |||
::: | |||
::::639-5 will come in its turn; first we must get -1, -2, and -3 to work correctly because those are the codes most in use and supported by the template suite as it exists today. | |||
::: | |||
::::Can you show a case where my code did not properly handle a valid 639 code regardless of case? The code that you complained about appears to work correctly: | |||
:::::<code><nowiki>{{ISO 639 name/sandbox|AA}}</nowiki></code> → {{ISO 639 name/sandbox|AA}} | |||
::::—] (]) 09:12, 24 September 2018 (UTC) | |||
:::::{{ping|Trappist the monk}} Are we not trying to make a template that supports {{tlx|ISO 639 code-1}}, {{tlx|ISO 639 code-2}}, and {{tlx|ISO 639 code-3}}? To stay organized it should be the same module. And I don't see why it's and for this to accept names. I can make the lua table for name to code using the find and replace function in Misplaced Pages, should this discussion be moved? – ] ] 22:17, 24 September 2018 (UTC) | |||
::::::Yes, I think that we are trying to make a template that supports {{tlx|ISO 639 code-1}}, {{tlx|ISO 639 code-2}}, and {{tlx|ISO 639 code-3}} as well as the generic {{tlx|ISO 639 name}}. And the code that I've written does that: | |||
:::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_1|AA}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_1|AA}}</nowiki> | |||
:::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_2|afa}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_2|afa}}</nowiki> | |||
:::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_3|chr}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_code_3|chr}}</nowiki> | |||
::::::I agree that all of this should be in the same module (data excepted). | |||
::::: | |||
::::::Some words have escaped from your sentence so it no longer makes sense: | |||
:::::::{{tq|And I don't see why it's and for this to accept names.}} | |||
::::::What did you mean that sentence to say? | |||
::::: | |||
::::::Surely there's a better way of constructing a name-to-code table than by search and replace. Why should we consider moving this discussion? | |||
::::::—] (]) 22:40, 24 September 2018 (UTC) | |||
:::::::{{ping|Trappist the monk}} I meant to say: I don't see why it bad (not and) for this to accept names. And to do the find and replace you find the regex (+"]) = (.+"}) and replace it with the regex $2 = $1,, all you need to do it is AWB. – ] ] 22:44, 24 September 2018 (UTC) | |||
::::::::It is pointless for the template to accept a language name that is not an ISO 639 code and return that same language name except as an error condition. Accepting a language name is contrary to the purpose of the template as stated on its documentation page. | |||
::::::::—] (]) 23:05, 24 September 2018 (UTC) | |||
:::::::::{{ping|Trappist the monk}} Let's say you're making a template that has a output of a language name at some point. Some people might put the language name as the input for the parameter. Rather the having editors fix these issues, why not let ] accept the names of languages? Of course it should be more of a backup. – ] ] 23:11, 24 September 2018 (UTC) | |||
::::::::::Editors might also give the template the name of the Andalusian ambassador: | |||
:::::::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name|Pedro Jiménez de Góngora}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name|Pedro Jiménez de Góngora}}</nowiki> | |||
::::::::::which is returned with an error message. For this template, language names as input are wrong just as the ambassador's name is wrong. | |||
::::::::::—] (]) 14:15, 25 September 2018 (UTC) | |||
::::::::] built by ] supports name-to-code: | |||
:::::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Afar|1}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Afar|1}}</nowiki> – 639-1 | |||
:::::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Cherokee|2}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Cherokee|2}}</nowiki> – 639-2 | |||
:::::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Chazumba Mixtec|3}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Chazumba Mixtec|3}}</nowiki> – 639-3 | |||
:::::::::<code><nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Chazumba Mixtec}}</nowiki></code> → <nowiki>{{#invoke:Sandbox/trappist the monk/ISO 639 name|iso_639_name_to_code|Chazumba Mixtec}}</nowiki> – 639 part unspecified | |||
::::::::—] (]) 14:15, 25 September 2018 (UTC) | |||
{{od|::::::::}} {{ping|Trappist the monk}}But it can't change ISO 639-2 to ISO 639-3 for example, But ] can. | |||
{| class="wikitable" | |||
!Output | |||
!Input | |||
!Output type | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code1|French}}</nowiki> | |||
|French | |||
|code1 | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code2|french}}</nowiki> | |||
|french | |||
|code2 | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code3|French}}</nowiki> | |||
|French | |||
|code3 | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code3|fra}}</nowiki> | |||
|fra (code 2/3) | |||
|code3 | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code2|fra}}</nowiki> | |||
|fra (code 2/3) | |||
|code2 | |||
|- | |||
|<nowiki>{{#invoke:ISO 639/sandbox|code2|fr}}</nowiki> | |||
|fr (code 1) | |||
|code2 | |||
|} | |||
– ] ] 03:52, 27 September 2018 (UTC) | |||
:I don't think that what you are attempting to do is working correctly: | |||
::<code><nowiki>{{#invoke:ISO 639/sandbox|code1|Cherokee}}</nowiki></code> → <nowiki>{{#invoke:ISO 639/sandbox|code1|Cherokee}}</nowiki> | |||
::<code><nowiki>{{#invoke:ISO 639/sandbox|code2|Cherokee}}</nowiki></code> → <nowiki>{{#invoke:ISO 639/sandbox|code2|Cherokee}}</nowiki> | |||
::<code><nowiki>{{#invoke:ISO 639/sandbox|code3|Cherokee}}</nowiki></code> → <nowiki>{{#invoke:ISO 639/sandbox|code3|Cherokee}}</nowiki> | |||
:—] (]) 11:34, 27 September 2018 (UTC) | |||
:: {{ping|Trappist the monk}}, my bad. It's fixed now. How does it look? – ] ] 19:44, 27 September 2018 (UTC) | |||
:: {{ping|Trappist the monk}} Fixed all other issues too. – ] ] 04:00, 28 September 2018 (UTC) | |||
::: {{ping|Trappist the monk}} Can we move the data pages to ]? – ] ] 01:02, 5 October 2018 (UTC) | |||
== Template broken (2024) == | |||
===moving on=== | |||
... before this discussion becomes moribund and is flushed into an archive | |||
Template looks like it's broken. It's giving the following as an output: <code>Lua error in package.lua at line 80: module 'Module:Language/data/ISO 639 deprecated' not found.</code> ] <sub>(] / ])</sub> 14:59, 11 July 2024 (UTC) | |||
I have usurped ] (it was a pseudo redirect to ]) and its associated /doc page (a true redirect to ]). | |||
== Two suggestions == | |||
This module is currently in use in {{tlx|ISO 639 name/sandbox}}. The four testcases pages created by Editor ] are here: | |||
:] | |||
:] | |||
:] | |||
:] | |||
The module has: | |||
: ] to allow us to return an alternate of the standard ISO 639 name when appropriate | |||
: support for ISO 639-1, -2, -3, -5; codes and names all taken from custodial or other official sources | |||
: support for individual code-part lookup | |||
: the ability to link language name to a Misplaced Pages article; to be used by {{tlx|ISO 639 name link}} | |||
: code-from-name lookup | |||
: code to replace expensive <code><nowiki>{{#ifexists:}}</nowiki></code> parser function | |||
: error messaging (can be hidden by user css) and categorization ({{cl|ISO 639 name template errors}} | |||
Given the extensive coverage provided by Editor Cabayi's testcases, I expect little in the way of trouble implementing this module in the wider world. However, now is not the time for feature-creep so no edits should be made to the module except those that repair deficiencies or outright errors. | |||
Hi, is it possible to add two features? | |||
—] (]) 14:34, 17 October 2018 (UTC) | |||
*a link to ] and other variants of that language; | |||
:I've implemented the module in {{tlx|ISO 639 name link}} and in {{tlx|User x/doc}}. | |||
*a shortcut to {{tl|ISO 639 name link}} | |||
:—] (]) 16:06, 17 October 2018 (UTC) | |||
Thanks.-- ] (]) 20:12, 3 September 2024 (UTC) | |||
:ISO 639 does not recognize ]. Not in ISO 639? not going to be added to a template specifically for ISO 639 recognized languages. | |||
: | : | ||
:If you want to create a shortcut (did you mean a redirect?) to {{tlx|ISO 639 name link}}, go ahead. | |||
:<s>Implemented the module in {{tlx|Native_name}}.</s> | |||
:—] (]) |
:—] (]) 20:41, 3 September 2024 (UTC) | ||
::I've just discovered {{tl|Llink}}, seems to be fine. Thanks anyway.-- ] (]) 05:15, 4 September 2024 (UTC) | |||
::] is a better fit for {{tlx|native name}}. | |||
::—] (]) 10:29, 22 October 2018 (UTC) | |||
:Implemented the module in {{tlx|Wikisourcelang}}. | |||
:—] (]) 11:00, 23 October 2018 (UTC) | |||
:Implemented the module in {{tlx|Infobox name module}}. | |||
:—] (]) 13:13, 24 October 2018 (UTC) | |||
:Implemented the module in {{tlx|Proofreader needed}}, {{tlx|User Translator}} | |||
:—] (]) 13:03, 25 October 2018 (UTC) | |||
== Mono language issue == | |||
== Template-protected edit request on 18 December 2018 == | |||
There is an issue with this language, see the following: | |||
{{edit template-protected|Template:ISO 639 name|answered=yes}} | |||
* {{tlx|ISO 639 name|mnr|_show_result=yes}} | |||
We received the folloing rewuest at the help desk: | |||
* {{suppress categories|{{tlx|ISO 639 code|Mono|_show_result=yes}}}} | |||
*please fix <nowiki>{{iso2language|lij}}</nowiki> with link to ]. thanks!!! --] (]) 14:53, 18 December 2018 (UTC) | |||
] (]) 13:45, 27 October 2024 (UTC) | |||
I checked at the ISO639 site: this is the correct mapping. please add: | |||
:You must tell the template which of the four you want. The name must be exactly as it is listed in the ISO 639 data modules (for a list of them, see {{slink|Module:ISO_639_name#Data_mapping}}): | |||
* lij --> ] ] (]) 16:08, 18 December 2018 (UTC) | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Democratic Republic of Congo)}}</syntaxhighlight> → {{ISO 639 code|Mono (Democratic Republic of Congo)}} | |||
::] '''Already done'''<!-- Template:ETp --> Already done. Test: | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (USA)}}</syntaxhighlight> → {{ISO 639 code|Mono (USA)}} | |||
:::{{iso2language|lij}} | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Cameroon)}}</syntaxhighlight> → {{ISO 639 code|Mono (Cameroon)}} | |||
::See rest of the discussion at ]. ] 🎷 <sup>'']'' | '']''</sup> 22:45, 19 December 2018 (UTC) | |||
:*<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 code|Mono (Solomon Islands)}}</syntaxhighlight> → {{ISO 639 code|Mono (Solomon Islands)}} | |||
:—] (]) 14:17, 27 October 2024 (UTC) | |||
::Ah, thanks for reminding me of this. Do you have any idea why {{tlx|IPA|mnr|test}} gets the non-disambiguated name (])? ] (]) 14:26, 27 October 2024 (UTC) | |||
:::To get the language name, ] uses: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr}} (]) | |||
:::] always strips IANA/ISO disambiguators. Module:IPA might do better to fetch the name from ] using the {{para|raw|yes}} parameter: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}}</syntaxhighlight> → {{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}} | |||
:::also available to the template: | |||
::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr|raw=yes}}</syntaxhighlight> → {{ISO 639 name|mnr|raw=yes}} | |||
:::—] (]) 15:00, 27 October 2024 (UTC) | |||
::::Is <code>_iso_639_code_to_name (frame)</code> meant as a module entry point also? It currently doesn't work like <code>_iso_639_name_to_code (args)</code>. ] (]) 15:29, 27 October 2024 (UTC) | |||
:::::Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module. <syntaxhighlight lang="lua" inline="1">_iso_639_code_to_name (frame)</syntaxhighlight> is not exported and because it accepts <code>frame</code> as a variable, would be a template access point. Mayhaps I got started on creating module access points and got side-tracked? Don't know, I'll give some thought to fixing that. | |||
:::::—] (]) 16:43, 27 October 2024 (UTC) | |||
::::{{re|Trappist the monk}} That doesn't work because the input can be an IETF tag. Barring an exposed function to fetch the language name, the article to link, the raw name, and the canonical/sanitized tag from an IETF tag all at once (which would be great), is there no equivalent to {{ml|Lang|category_from_tag}} except it returns just the language part, i.e. without "Articles containing" or "-language text"? ] (]) 05:27, 26 December 2024 (UTC) | |||
:::::What do you mean by: {{tq|the input can be an IETF tag}}? {{tlx|ISO 639 name}} supports ISO 639-1, -2, -3, and -5 language tags only. It does not support IETF language tags. The only category link emitted by {{tld|ISO 639 name}} is {{cl|ISO 639 name template errors}}; there is no other categorization. | |||
:::::—] (]) 15:20, 26 December 2024 (UTC) | |||
::::::You said {{tq|Module:IPA might do better to fetch the name from ] using the {{para|raw|yes}} parameter}}. I'm pointing out that doesn't work because e.g. {{tlx|IPA|pt-BR|...}} needs to show the same label as {{tlx|langx|pt-BR|...}} (which, if used in an article, puts it in ] rather than ]). ] (]) 15:28, 26 December 2024 (UTC) | |||
:::::::That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If {{tlx|IPA}} and {{tlx|Langx}} {{em|must}} show the same label then {{tlx|ISO 639 name}} is not the correct tool for {{tld|IPA}}. | |||
::::::: | |||
:::::::How {{tld|langx}} categorizes out-of-scope for {{tld|ISO 639 name}}. | |||
::::::: | |||
:::::::This is the wrong venue to be discussing changes to Module:Lang. Certainly ] can be tweaked so that <code>name_from_tag()</code> supports {{para|raw|yes}}. It would be up to ] to decide what it does with that parameter. | |||
:::::::—] (]) 16:42, 26 December 2024 (UTC) | |||
::::::::You're telling me. I'm pointing out you and Gonnym were missing a bigger picture when suggesting Module:IPA use this module. | |||
::::::::So is there no exposed function that converts e.g. <code>pt-BR</code> to "Brazilian Portuguese" and <code>mnr</code> to "Mono (USA)", i.e. what {{tlf|lang(x)}} does to generate categories? Can you make one? ] (]) 16:52, 26 December 2024 (UTC) | |||
:::::::::There is no support in ] for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag: | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|pt-BR}}</syntaxhighlight> → {{ISO 639 name|pt-BR}} | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr}}</syntaxhighlight> → {{ISO 639 name|mnr}} | |||
:::::::::and to get the name with disambiguator (if present): | |||
::::::::::<syntaxhighlight lang="wikitext" inline="1">{{ISO 639 name|mnr|raw=yes}}</syntaxhighlight> → {{ISO 639 name|mnr|raw=yes}} | |||
:::::::::—] (]) 17:16, 26 December 2024 (UTC) | |||
::::::::::Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if ''this'' module has it, I'm asking if ''any'' module does. ] (]) 17:19, 26 December 2024 (UTC) | |||
:::::::::::Then Module:Lang should also have a {{para|raw|yes}} option to get the full name. ] (]) 17:44, 26 December 2024 (UTC) | |||
::::::::::::] but that was apparently ignored. I've added it: | |||
::::::::::::*<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr}} | |||
::::::::::::*<syntaxhighlight lang="wikitext" inline="1">{{lang|fn=name_from_tag|mnr|raw=yes}}</syntaxhighlight> → {{lang|fn=name_from_tag|mnr|raw=yes}} | |||
::::::::::::—] (]) 18:10, 26 December 2024 (UTC) | |||
:::::::::::::If that was meant to me, I wasn't ignoring you, I was agreeing with you. ] (]) 18:27, 26 December 2024 (UTC) | |||
::::::::::::::Twas meant for you; just noting that Editor Nardog had apparently ignored that part of my post. | |||
::::::::::::::—] (]) 18:59, 26 December 2024 (UTC) | |||
:::::::::::::::I wasn't ignoring it, I just didn't realize that was precisely what I was asking! ] (]) 19:00, 26 December 2024 (UTC) |
Latest revision as of 19:00, 26 December 2024
Template:ISO 639 name 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. This template does not have a testcases subpage. You can create the testcases subpage here. |
This template does not require a rating on Misplaced Pages's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
Archives | |
|
|
This page has archives. Sections older than 180 days may be automatically archived by Lowercase sigmabot III when more than 3 sections are present. |
Template broken (2024)
Template looks like it's broken. It's giving the following as an output: Lua error in package.lua at line 80: module 'Module:Language/data/ISO 639 deprecated' not found.
HapHaxion (talk / contribs) 14:59, 11 July 2024 (UTC)
Two suggestions
Hi, is it possible to add two features?
- a link to Mozambican Portuguese and other variants of that language;
- a shortcut to {{ISO 639 name link}}
Thanks.-- Carnby (talk) 20:12, 3 September 2024 (UTC)
- ISO 639 does not recognize Mozambican Portuguese. Not in ISO 639? not going to be added to a template specifically for ISO 639 recognized languages.
- If you want to create a shortcut (did you mean a redirect?) to
{{ISO 639 name link}}
, go ahead. - —Trappist the monk (talk) 20:41, 3 September 2024 (UTC)
- I've just discovered {{Llink}}, seems to be fine. Thanks anyway.-- Carnby (talk) 05:15, 4 September 2024 (UTC)
Mono language issue
There is an issue with this language, see the following:
{{ISO 639 name|mnr}}
→ Mono{{ISO 639 code|Mono}}
→ error: Mono not found in ISO 639-1, -2, -2B, -3, -5 list (help)
Gonnym (talk) 13:45, 27 October 2024 (UTC)
- You must tell the template which of the four you want. The name must be exactly as it is listed in the ISO 639 data modules (for a list of them, see Module:ISO 639 name § Data mapping):
{{ISO 639 code|Mono (Democratic Republic of Congo)}}
→ mnh{{ISO 639 code|Mono (USA)}}
→ mnr{{ISO 639 code|Mono (Cameroon)}}
→ mru{{ISO 639 code|Mono (Solomon Islands)}}
→ mte
- —Trappist the monk (talk) 14:17, 27 October 2024 (UTC)
- Ah, thanks for reminding me of this. Do you have any idea why
{{IPA|mnr|test}}
gets the non-disambiguated name (Category:Pages with Mono IPA)? Gonnym (talk) 14:26, 27 October 2024 (UTC)- To get the language name, Module:IPA uses:
{{lang|fn=name_from_tag|mnr}}
→ Mono (lines 65–72)
- Module:Lang always strips IANA/ISO disambiguators. Module:IPA might do better to fetch the name from Module:ISO 639 name using the
|raw=yes
parameter:{{#invoke:ISO 639 name|iso_639_code_to_name|mnr|raw=yes}}
→ Mono (USA)
- also available to the template:
{{ISO 639 name|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 15:00, 27 October 2024 (UTC)
- Is
_iso_639_code_to_name (frame)
meant as a module entry point also? It currently doesn't work like_iso_639_name_to_code (args)
. Gonnym (talk) 15:29, 27 October 2024 (UTC)- Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module.
_iso_639_code_to_name (frame)
is not exported and because it acceptsframe
as a variable, would be a template access point. Mayhaps I got started on creating module access points and got side-tracked? Don't know, I'll give some thought to fixing that. - —Trappist the monk (talk) 16:43, 27 October 2024 (UTC)
- Not clear to me why the code is written as it is. Usually, when I use an underscore-prefixed function name, that name (if exported) is for access from another module.
- @Trappist the monk: That doesn't work because the input can be an IETF tag. Barring an exposed function to fetch the language name, the article to link, the raw name, and the canonical/sanitized tag from an IETF tag all at once (which would be great), is there no equivalent to {{#invoke:Lang|category_from_tag}} except it returns just the language part, i.e. without "Articles containing" or "-language text"? Nardog (talk) 05:27, 26 December 2024 (UTC)
- What do you mean by:
the input can be an IETF tag
?{{ISO 639 name}}
supports ISO 639-1, -2, -3, and -5 language tags only. It does not support IETF language tags. The only category link emitted by{{ISO 639 name}}
is Category:ISO 639 name template errors; there is no other categorization. - —Trappist the monk (talk) 15:20, 26 December 2024 (UTC)
- You said
Module:IPA might do better to fetch the name from Module:ISO 639 name using the
. I'm pointing out that doesn't work because e.g.|raw=yes
parameter{{IPA|pt-BR|...}}
needs to show the same label as{{langx|pt-BR|...}}
(which, if used in an article, puts it in Category:Articles containing Brazilian Portuguese-language text rather than Category:Articles containing Portuguese-language text). Nardog (talk) 15:28, 26 December 2024 (UTC)- That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If
{{IPA}}
and{{Langx}}
must show the same label then{{ISO 639 name}}
is not the correct tool for{{IPA}}
. - How
{{langx}}
categorizes out-of-scope for{{ISO 639 name}}
. - This is the wrong venue to be discussing changes to Module:Lang. Certainly Module:Lang can be tweaked so that
name_from_tag()
supports|raw=yes
. It would be up to Module:IPA to decide what it does with that parameter. - —Trappist the monk (talk) 16:42, 26 December 2024 (UTC)
- You're telling me. I'm pointing out you and Gonnym were missing a bigger picture when suggesting Module:IPA use this module.
- So is there no exposed function that converts e.g.
pt-BR
to "Brazilian Portuguese" andmnr
to "Mono (USA)", i.e. what {{lang(x)}} does to generate categories? Can you make one? Nardog (talk) 16:52, 26 December 2024 (UTC)- There is no support in Module:ISO 639 name for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag:
{{ISO 639 name|pt-BR}}
→ Portuguese error: pt-BR is an IETF tag (help){{ISO 639 name|mnr}}
→ Mono
- and to get the name with disambiguator (if present):
{{ISO 639 name|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 17:16, 26 December 2024 (UTC)
- Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if this module has it, I'm asking if any module does. Nardog (talk) 17:19, 26 December 2024 (UTC)
- Then Module:Lang should also have a
|raw=yes
option to get the full name. Gonnym (talk) 17:44, 26 December 2024 (UTC)- Which I suggested could be done but that was apparently ignored. I've added it:
{{lang|fn=name_from_tag|mnr}}
→ Mono{{lang|fn=name_from_tag|mnr|raw=yes}}
→ Mono (USA)
- —Trappist the monk (talk) 18:10, 26 December 2024 (UTC)
- If that was meant to me, I wasn't ignoring you, I was agreeing with you. Gonnym (talk) 18:27, 26 December 2024 (UTC)
- Twas meant for you; just noting that Editor Nardog had apparently ignored that part of my post.
- —Trappist the monk (talk) 18:59, 26 December 2024 (UTC)
- I wasn't ignoring it, I just didn't realize that was precisely what I was asking! Nardog (talk) 19:00, 26 December 2024 (UTC)
- If that was meant to me, I wasn't ignoring you, I was agreeing with you. Gonnym (talk) 18:27, 26 December 2024 (UTC)
- Which I suggested could be done but that was apparently ignored. I've added it:
- Then Module:Lang should also have a
- Again, I'm only asking here because you were already having a relevant discussion here. I'm not asking if this module has it, I'm asking if any module does. Nardog (talk) 17:19, 26 December 2024 (UTC)
- There is no support in Module:ISO 639 name for IETF language tags because IETF is not ISO 639. Module:ISO 639 name will return a language name from an ISO 639 language tag:
- That was for the rare case of Mono, a name shared by several different languages, each with its own language tag. If
- You said
- What do you mean by:
- Is
- To get the language name, Module:IPA uses:
- Ah, thanks for reminding me of this. Do you have any idea why