Page MenuHomePhabricator

cmn is no longer recognized properly as a language
Open, Needs TriagePublicBUG REPORT

Description

Originally reported at https://meta.wikimedia.org/wiki/Meta:Babel#Broken_Babel_templates_for_Mandarin_Chinese_%28cmn%29

{{#babel:cmn}} results in the same as {{#babel:en}}
{{#language:cmn}} just returns "cmn", rather than the language name (same behaviour if "foo" is used)

Unlike other variants of Chinese, cmn doesn't appear as an option to change the page language (not sure if it used to though)

Note sure what the relevant extension or component is.

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald Transcript
DannyS712 added a project: Regression.
DannyS712 changed the subtype of this task from "Task" to "Bug Report".
DannyS712 updated the task description. (Show Details)

"no longer" implies that it used to work. Are you sure?

The report on Meta suggests that it used to. @The_Editor.s_Apprentice can you confirm that it used to work?

I cannot confirm that has been anytime in the past in which "cmn" was correctly recognized as a language code on Meta. I only recently learned about the code "cmn" and that it might be able to be used to generate a Babel box. Theoretically it should have been/be since it is a valid ISO 639-3 code and the extensions Mediawiki page states all that ISO 639-3 codes are usable.

Follow up on ISO 639-3 code recognition: the way {{#babel}} handles ISO 639-3 codes is different than the way it handles inputs which are not part of ISO 639-1 or ISO 639-3. As an example, {{#babel:foo}} renders no box and shows only a broken template link, while cmn, and seemingly the vast majority of ISO 639-3 codes, lead to a box proclaiming "This user has a native understanding of English." and displaying the passed code. This suggests to me that some basic back end implementation was done, but that it was not completed. This is not entirely surprising to me given that ISO 639-3 codes are much less common as well as much more numerous. This idea is additionally supported by the fact that the ISO 639-3 code for German (deu), and some other languages, display differently most ISO 639-3 codes, such as cmn, which are undifferentiated from each other. This means that there does exist a capability for such codes to be integrated into the extension.

Yeah, cmn is on my mental list of codes that we probably don't support properly but should.

If possible, I might be able implement support for cmn if I was pointed in the general direction of where the relevant code is. I am fairly competent when it comes to coding.

Following up on my previous comment, and apologies for the ping, but @Jdforrester-WMF, could you point me at the general place at which support for language codes is implemented?