Wikipedia talk:Template index/Redirect language codes – code sort

Latest comment: 5 years ago by Trappist the monk in topic Yue
WikiProject iconRedirect Project‑class
WikiProject iconThis page is within the scope of WikiProject Redirect, a collaborative effort to improve the standard of redirects and their categorization on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Note: This banner should be placed on the talk pages of project, template and category pages that exist and operate to maintain redirects.
This banner is not designed to be placed on the talk pages of most redirects and almost never on the talk pages of mainspace redirects. For more information see the template documentation.
ProjectThis page does not require a rating on Wikipedia's content assessment scale.

Yue edit

@Paine Ellsworth: Please see Yi mai: The template doesn't seem to recognise language code "yue" even though it's listed on the table here. Any thoughts on how to fix this? Deryck C. 16:23, 11 March 2019 (UTC)Reply

To editor Deryck C.: looking into this for you. There may be others like this since the language module was implemented in {{R from alternative language}} by Trappist the monk. Trappist, I see that Module:Language/data/ISO 639-3 relates "yue" to "Yue Chinese" rather than "Cantonese" or "Cantonese language", as in Category:Redirects from Cantonese-language terms. In your opinion, what needs to be changed to get the language code "yue" to work? Paine Ellsworth, ed.  put'r there  03:23, 12 March 2019 (UTC)Reply
The Module:Lang function name_from_code() returns:
{{#invoke:Lang|name_from_code|yue}}Script error: The function "name_from_code" does not exist.
According to the ISO 639-3 custodian, yue is assigned the name Yue Chinese. Module:lang is giving the correct response.
In {{R from alternative language}} is this:
{{#ifexist:Category:Redirects from {{#invoke:Lang|name_from_code|{{{1|{{{from|{{{lang|}}}}}}}}}}}-language terms|{{#invoke:Lang|name_from_code|{{{1|{{{from|{{{lang|}}}}}}}}}|link=yes}}|an as yet [[undetermined language]]}}
We can mimic the code that assembles the category name that the above code is looking for:
[[:Category:Redirects from {{#invoke:Lang|name_from_code|yue}}-language terms]]
[[:Category:Redirects from Script error: The function "name_from_code" does not exist.-language terms]]
Because the category does not exist (redlink), {{R from alternative language}} renders the 'as yet undetermined language' text; the correct response. To fix this problem, create the missing category.
Trappist the monk (talk) 11:15, 12 March 2019 (UTC)Reply
@Trappist the monk and Paine Ellsworth:: I propose adding ["yue"] = {"Cantonese"} to override in Module:Lang/data, then creating Category:Redirects from Cantonese-language terms. "Yue Chinese", while accepted by academic linguisticians to encompass more than Standard Cantonese, is generally frowned upon by non-academic native speakers because it's an exonym. Deryck C. 12:13, 13 March 2019 (UTC)Reply
This is the English Wikipedia so, for this encyclopedia, the exonym is appropriate. Why would you create Category:Redirect from Cantonese-language terms (singular 'redirect') when Category:Redirects from Cantonese-language terms (plural 'redirects') already exists?
Trappist the monk (talk) 12:41, 13 March 2019 (UTC)Reply
@Trappist the monk: Sorry for my own typo. Yes the category I want to populate already exists. "Cantonese" is a better mapping than "Yue Chinese" because the former is the common name. Deryck C. 16:19, 13 March 2019 (UTC)Reply
Your new common name argument is rather better than your exonym argument and is supported by IANA which lists 'Cantonese' as an alternate to 'Yue Chinese'. But, at en.wiki, Yue Chinese and Cantonese are two separate articles which suggests to me that editors at en.wiki believe that the two are not synonymous. Both of these articles claim code yue. Because Module:Lang can provide language names and create links to language articles according the IANA / ISO 639 language code, it should provide the appropriate names and create links to the correct articles. This Yue Chinese / Cantonese sharing of the same code is problematic. So the question really is: how can Module:lang be tweaked to provide correct names and links? In other words, how to disambiguate yue?
One possibility is to create a private IETF language tag for Cantonese; perhaps: yue-x-canton (["yue-x-canton"] = {"Cantonese"},). Another method, might be some sort of parameter value passed through the various templates that tells Module:lang to use the alternate IANA language name (if one exists). I rather think that this latter method is too cryptic to be implemented, documented, and used by editors who aren't versed in the arcana of the language templates.
Trappist the monk (talk) 18:08, 13 March 2019 (UTC)Reply
Trappist the monk, Wikipedia has much finer resolution of the genetic relationships between languages than ISO 639-3. The first two paragraphs of the Yue Chinese article explains this resolution: "Cantonese" can both refer to the whole language branch or the prestige dialect(s) spoken in Guangzhou, Hong Kong, and Macau. Surely the fact that "IANA which lists 'Cantonese' as an alternate to 'Yue Chinese'", and that Category:Redirects from Cantonese-language terms already exists, would complete the argument that the en.wp redirect tagging system should map yue -> "Cantonese"? Deryck C. 12:49, 26 March 2019 (UTC)Reply
At Wikipedia, Yue Chinese and Cantonese are distinct else two separate articles would not be required. Editors at both of these article claim the ISO 639-3 code yue as their code. Without there is some sort of mechanism to tell Module:lang that editors in one place are using yue to refer to Yue Chinese and editors in another place are using yue to refer to Cantonese, the module can only get it right for one of those situations and will be wrong in the other. Because the international standards upon which Module:lang rest define the primary name associated with code yue as Yue Chinese, that is the name that this module must return. I have offered a way around that for the cases where editors using code yue mean Cantonese. Apparently you reject that but do not say why you reject it.
Trappist the monk (talk) 13:11, 26 March 2019 (UTC)Reply
Trappist the monk: (vent of frustration redacted) We're doing a disservice to both editors and readers by sending the ISO 639-3 code to the technical exonym rather than the common name of the language. Category:Redirects from Cantonese-language terms, Wikipedia:Template_messages/Redirect_language_codes_–_code_sort, and Module:Language/data/wp languages all say "Cantonese", "yue preferred". You're blocking the rollout and harmonization of the use of the language code yue on Wikipedia because of a technicality of which name IANA picks as default. We don't need more custom language codes with hyphens that nobody wants to use, just to get around Wikipedia's implementation of SIL's standard. Deryck C. 15:23, 26 March 2019 (UTC)Reply
Whatever is done is going to inconvenience someone. Those who want or need code yue to mean Cantonese will inconvenience those who want or need code yue to mean Yue Chinese. We cannot use a single code to represent two vaguely similar but distinctly different things. Because here at en.wiki, yue has two meanings, we must have some sort of custom code that distinguishes one from the other. I have proposed a solution that complies with the ISO, IANA, and IETF standards. Were we to change my proposal so that yue returned Cantonese we would necessarily have to create something like yue-x-yue that returns Yue Chinese. That seems really wrong especially since, according to your definition above, Cantonese in certain uses is a dialect or subdivision of Yue Chinese whereas Yue Chinese is never a dialect or subdivision of itself (which is what yue-x-yue would say it is).
The only use of Cantonese in Module:Language/data/wp languages is ["zh-yue"] = {"Cantonese"}. Codes in that module have unknown provenance so their use is avoided when possible. zh-yue is not supported by Module:Lang even though data from ~/wp languages is available because Module:lang does not support IETF extlang (extended language) codes (this because there are none defined by IANA that do not also have defined preferred codes; see zh-yue in the subtag registry file). This is why we get an an error message for zh-yue from this:
{{#invoke:lang|name_from_code|zh-yue}}Script error: The function "name_from_code" does not exist.
The language name and link for yue in Wikipedia:Template messages/Redirect language codes – code sort comes from {{ISO 639 name|yue}} (actually {{ISO 639 name yue}}) which returns Yue Chinese. But, Cantonese is not the ISO 639 name so that template is wrong – see the standard.
Category:Redirects from Cantonese-language terms exists because it should and because, here at en.wiki, we distinguish between Cantonese and Yue Chinese. For the same reasons, Category:Redirects from Yue Chinese-language terms also exists because it should.
I know, you aren't happy. I am sorry for that, I am not trying to be offensively obstructive. I am going to defend the use of standards based codes for standardized language names because more than just this use case relies on them being the standard codes and the standard names.
Trappist the monk (talk) 17:22, 26 March 2019 (UTC)Reply
Trappist the monk: Well, Category:Redirects from Yue Chinese-language terms exists because I created it to try to get around the problem we're discussing here, but I don't think it's a good solution... Deryck C. 13:48, 27 March 2019 (UTC)Reply
Somehow I don't think that we are communicating. At no time have I said that Category:Redirects from Yue Chinese-language terms was a solution to anything; all I have done is to acknowledge that it exists because it should exist. Thanks for creating it.
Trappist the monk (talk) 19:28, 27 March 2019 (UTC)Reply