Page MenuHomePhabricator

Clean up, merge and update zh/zh-* translations
Open, In Progress, Needs TriagePublic

Description

Clean up, merge and update zh/zh-* translations

  • mediawiki/core: Rearrange zh/zh-* fallbacks, translations, aliases in mediawiki/core
  • mediawiki/extensions/Babel: Update, merge zh-tw translations back to zh-hant and recover zh-cn, zh-sg translations
  • mediawiki/extensions/DPLforum: Adding zh, zh-hans, zh-hant namespace names and aliases
  • mediawiki/extensions/Flow (StructuredDiscussions): Adding zh, zh-hans, zh-hant namespace names, aliases and special page names, aliases
  • mediawiki/extensions/MobileFrontend: Fix incorrect special page translation in MobileFrontend
  • mediawiki/extensions/Scribunto: Update zh namespace names and adding namespace aliases
  • mediawiki/extensions/Widgets: Adding zh, zh-hans, zh-hant namespace names and aliases in Widgets

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/DPLforumREL1_36+30 -0
mediawiki/extensions/DPLforumREL1_37+30 -0
mediawiki/coremaster+518 -448
operations/mediawiki-configmaster+60 -109
mediawiki/extensions/DPLforumREL1_35+30 -0
mediawiki/extensions/DPLforummaster+30 -0
mediawiki/extensions/Flowmaster+29 -3
mediawiki/extensions/Scribuntomaster+22 -2
mediawiki/extensions/MobileFrontendmaster+13 -15
mediawiki/extensions/Widgetsmaster+37 -2
mediawiki/extensions/Babelmaster+57 -22
mediawiki/extensions/Flowmaster+2 -2
Show related patches Customize query in gerrit

Related Objects

StatusSubtypeAssignedTask
Resolvedsgrabarczuk
ResolvedBUG REPORTNikerabbit
OpenNone
In ProgressWinston_Sung
In ProgressWinston_Sung
ResolvedWinston_Sung
In ProgressWinston_Sung
In ProgressWinston_Sung
ResolvedWinston_Sung
OpenNone
In ProgressWinston_Sung
ResolvedMarcoAurelio
Resolvedhoo
In ProgressNone
ResolvedWinston_Sung
ResolvedFunc
ResolvedWinston_Sung
ResolvedRazeSoldier
ResolvedRazeSoldier
StalledWinston_Sung
In ProgressWinston_Sung

Event Timeline

Change 703560 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] Update zh-hant, zh-tw namespace names and adding zh, zh-hant namespace aliases, merge zh-tw namespace names and aliases to MessagesZh_tw.php in mediawiki/core

https://gerrit.wikimedia.org/r/703560

@Winston_Sung: By who is this wanted, or why is this needed and which problem does this solve? This task describes a solution, but no problem to solve.

By who is this wanted, or why is this needed and which problem does this solve? This task describes a solution, but no problem to solve.

This is not a bug ticket. This ticket is for translation update and merge zh-tw namespace names' and aliases' translations back to zh-hant as how it should be stored.

We know this is not a bug ticket. The question is why you (or more people?) think that a translation update is needed... :) See my previous comment.

languages/messages/MessagesZh.php

  • line 49, 54, 55, 59, 60, 61, 67, 68, 69, 70, 96, 97, 98, 99, 104, 105, 106, 107: adding missing namespace aliases from zh-hant and zh-tw namespace aliases as all variants' namespace name translations should be added as zh namespace aliases.
  • line 121, 123, 132, 164, 172, 177, 196, 198, 200: adding missing special page' aliases as all variants' special page name translations should be added as zh special page aliases.

languages/messages/MessagesZh_hant.php / languages/messages/MessagesZh_tw.php

  • line 69, 70, 78, 79, 92, 93, 101, 102, 116, 117, 120, 121, 122, 123 / line 28, 30: Merge zh-tw namespace names ans aliases back to zh-hant as how it should be (like system message files does: translate zh-tw system messages in zh-hant system messages).

The question is why this translation update is needed.

More specifically, this is a clean up of the duplicated translations, as zh-tw namespace names, namespace aliases, special page name, special page aliases in .php files should be stored in zh-hant language files as how zh-tw/zh-hant .json translation files do.

Winston_Sung renamed this task from Update zh namespace names and aliases in mediawiki/core to Merge zh-tw translations back to zh-hant, update zh, zh-hant, zh-tw translations and adding missing aliases in php file (namespace/special page/magic words names and aliases) in mediawiki/core.Jul 24 2021, 10:48 AM
Winston_Sung updated the task description. (Show Details)
Winston_Sung renamed this task from Merge zh-tw translations back to zh-hant, update zh, zh-hant, zh-tw translations and adding missing aliases in php file (namespace/special page/magic words names and aliases) in mediawiki/core to Clean up, merge and update zh-tw translations.Nov 17 2021, 4:37 AM
Winston_Sung updated the task description. (Show Details)

Change 739293 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/Babel@master] Update and merge zh-tw translations back to zh-hant in mediawiki/extensions/Babel

https://gerrit.wikimedia.org/r/739293

CC @Nikerabbit for https://translatewiki.net/wiki/Thread:Support/Message_clean_up_request .

These zh-tw messages are merged to zh-hant and no longer used.

MediaWiki:Abusefilter-edit-builder-vars-user-mobile/zh-tw
MediaWiki:AjaxLogin1/zh-tw
MediaWiki:AjaxLogin2/zh-tw
MediaWiki:Babel/zh-tw
MediaWiki:Babel-0/zh-tw
MediaWiki:Babel-1/zh-tw
MediaWiki:Babel-2/zh-tw
MediaWiki:Babel-3/zh-tw
MediaWiki:Babel-4/zh-tw
MediaWiki:Babel-5/zh-tw
MediaWiki:Babel-autocreate-abort/zh-tw
MediaWiki:Babel-autocreate-reason/zh-tw
MediaWiki:Babel-autocreate-text-levels/zh-tw
MediaWiki:Babel-autocreate-text-main/zh-tw
MediaWiki:Babel-desc/zh-tw
MediaWiki:Babel-N/zh-tw
MediaWiki:Babel-url/zh-tw
MediaWiki:Beta-feature-minerva/zh-tw
MediaWiki:Beta-feature-minerva-description/zh-tw
MediaWiki:Bookmanagerv2-section-name/zh-tw
MediaWiki:Contributorsaddon-desc/zh-tw
MediaWiki:Cookie-policy-description/zh-tw
MediaWiki:Cookie-policy-notification-message/zh-tw
MediaWiki:Cookie-policy-read-more/zh-tw
MediaWiki:Copyright/zh-tw
MediaWiki:Createclass/zh-tw
MediaWiki:Createform/zh-tw
MediaWiki:Createpage/zh-tw
MediaWiki:Createpage-advanced-warning/zh-tw
MediaWiki:Createpage-article-exists/zh-tw
MediaWiki:Createpage-button-createplate-submit/zh-tw
MediaWiki:Createpage-categories/zh-tw
MediaWiki:Createpage-edit-normal/zh-tw
MediaWiki:Createpage-hide/zh-tw
MediaWiki:Createpage-title/zh-tw
MediaWiki:Createpage-title-caption/zh-tw
MediaWiki:Createpage-upload/zh-tw
MediaWiki:Createproperty/zh-tw
MediaWiki:Donate interface/zh-tw
MediaWiki:Donate interface-currency/zh-tw
MediaWiki:Donate interface-email-agreement/zh-tw
MediaWiki:Donate interface-gross/zh-tw
MediaWiki:Donate interface-intro/zh-tw
MediaWiki:Donate interface-other-amount/zh-tw
MediaWiki:Donate interface-EUR/zh-tw
MediaWiki:Donate interface-HKD/zh-tw
MediaWiki:Donate interface-ILS/zh-tw
MediaWiki:Donate interface-NZD/zh-tw
MediaWiki:Donate interface-SGD/zh-tw
MediaWiki:Editing/zh-tw
MediaWiki:Expandtemplates/zh-tw
MediaWiki:Gwtoolset-no-form-handler/zh-tw
MediaWiki:Interlanguage-link-mul/zh-tw
MediaWiki:Mainpagedocfooter/zh-tw
MediaWiki:Mobile-frontend-app-title/zh-tw
MediaWiki:Mobile-frontend-desc/zh-tw
MediaWiki:Mobile-frontend-disable-images/zh-tw
MediaWiki:Mobile-frontend-editor-unavailable/zh-tw
MediaWiki:Mobile-frontend-editor-undo-unsupported/zh-tw
MediaWiki:Mobile-frontend-enable-images/zh-tw
MediaWiki:Mobile-frontend-privacy-link-text/zh-tw
MediaWiki:Mobile-frontend-requires-mobile/zh-tw
MediaWiki:Mobile-frontend-settings-description/zh-tw
MediaWiki:Mobile-frontend-view/zh-tw
MediaWiki:Mobile-frontend-view-mobile/zh-tw
MediaWiki:Newuserlog-create2-entry/zh-tw
MediaWiki:Nstab-mediawiki/zh-tw
MediaWiki:Nstab-project/zh-tw
MediaWiki:Nstab-template/zh-tw
MediaWiki:Popularpages/zh-tw
MediaWiki:Privacy/zh-tw
MediaWiki:Projectpage/zh-tw
MediaWiki:Ps-add-section/zh-tw
MediaWiki:Pf createform addelements/zh-tw
MediaWiki:Pf createform additembeforesave/zh-tw
MediaWiki:Pf-createform-with-name/zh-tw
MediaWiki:Sf createform addelements/zh-tw
MediaWiki:Sf createform additembeforesave/zh-tw
MediaWiki:Sf-createform-with-name/zh-tw
MediaWiki:Sp-translate-data-Namespaces/zh-tw
MediaWiki:Sp-translate-data-SpecialPageAliases/zh-tw
MediaWiki:Tag-mobile edit/zh-tw
MediaWiki:Tag-mobile app edit/zh-tw
MediaWiki:Tag-mobile app edit-description/zh-tw
MediaWiki:Tag-mobile web edit/zh-tw
MediaWiki:Tag-mobile web edit-description/zh-tw
MediaWiki:Tooltip-desc/zh-tw
MediaWiki:Uncategorizedtemplates/zh-tw
MediaWiki:Visualeditor-find-and-replace-regular-expression/zh-tw
MediaWiki:Welcomecreation/zh-tw
MediaWiki:Wikibase-setsitelink-submit/zh-tw
MediaWiki:Wikieditor-previewDialog-preference/zh-tw
Winston_Sung renamed this task from Clean up, merge and update zh-tw translations to Clean up, merge and update zh/zh-* translations.Nov 22 2021, 1:28 PM
Winston_Sung changed the task status from Open to In Progress.
Winston_Sung claimed this task.
Winston_Sung updated the task description. (Show Details)

Change 703560 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] Merge zh-tw translations back to zh-hant in mediawiki/core

https://gerrit.wikimedia.org/r/703560

Change 704622 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/DPLforum@master] Adding zh, zh-hans, zh-hant namespace names and aliases in DPLforum

https://gerrit.wikimedia.org/r/704622

Change 705141 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/DPLforum@REL1_35] Adding zh, zh-hans, zh-hant namespace names and aliases in DPLforum

https://gerrit.wikimedia.org/r/705141

Change 738404 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/Flow@master] Adding zh, zh-hans, zh-hant namespace names, aliases and special page names, aliases in StructuredDiscussions (Flow)

https://gerrit.wikimedia.org/r/738404

Change 702950 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/Scribunto@master] Update zh namespace names and adding namespace aliases in Scribunto

https://gerrit.wikimedia.org/r/702950

Change 742246 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/Widgets@master] Update namespace names and magic words i18n for zh, zh-hans, zh-hant in Extension:Widgets

https://gerrit.wikimedia.org/r/742246

Change 742249 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/DPLforum@REL1_36] Adding zh, zh-hans, zh-hant namespace names and aliases in DPLforum

https://gerrit.wikimedia.org/r/742249

Change 742250 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/DPLforum@REL1_37] Adding zh, zh-hans, zh-hant namespace names and aliases in DPLforum

https://gerrit.wikimedia.org/r/742250

Is the idea here that zh-hant would be used for zh-tw everywhere (and zh-tw shouldn't exist) and zh-hk would be used to override it for cases where it has different phrases?

According to the current translation status on translatewiki.net , zh-tw translations would be stored in zh-hant i18n files and zh-hk would being used for overriding zh-tw (de facto zh-hant).

Change 738404 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Adding zh, zh-hans, zh-hant namespace names, aliases and special page names, aliases in StructuredDiscussions (Flow)

https://gerrit.wikimedia.org/r/738404

Change 743008 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/MobileFrontend@master] Fix incorrect special page translation in MobileFrontend

https://gerrit.wikimedia.org/r/743008

Current status and issues:

  • $namespaceAliases works with $convertedNames ($namespaceNames in variant)
  • Need to be tested: whether $namespaceAliases works with $namespaceAliases in variant
  • To be fixed: $namespaceAliases does NOT work with fallback -> $namespaceNames
  • $namespaceAliases works with fallback -> $namespaceAliases
  • To be fixed: $specialPageAliases does NOT works with $convertedSpecials ($specialPageAliases in variant)
  • $specialPageAliases works with fallback -> $specialPageAliases
  • To be fixed: $magicWords does NOT works with $convertedWords ($magicWords in variant)
  • $magicWords works with fallback -> $magicWords

Change 743309 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/extensions/Flow@master] Remove unused zh-hant mis-translation special page names/alias in StructuredDiscussions (Flow)

https://gerrit.wikimedia.org/r/743309

@Winston_Sung can you provide reproduction steps (a link to some wiki page where people can see the bug in action, or better yet, a list of steps to trigger the bug so other people can debug on their own wikis) for the issues you mentioned? That would help me or other people look into what's causing them, and potentially come up with a fix or some better workaround. It still feels weird to me to put zh-hant strings in zh-hans arrays, and other people having to maintain the code in the future would likely not know what to put in the arrays to maintain the correct fallback behavior.

Change 743309 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Remove unused zh-hant mis-translation special page names/alias in StructuredDiscussions (Flow)

https://gerrit.wikimedia.org/r/743309

Change 739293 merged by jenkins-bot:

[mediawiki/extensions/Babel@master] Update, merge zh-tw translations back to zh-hant and recover zh-cn, zh-sg translations in mediawiki/extensions/Babel

https://gerrit.wikimedia.org/r/739293

  • ✔ SUCCESS: namespaceAliases works with $convertedNames ($namespaceNames in variant)
    • -> $namespaceNames in variant redirect to $namespaceNames in main language without fallback chain

✔ Test: Disable all fallback chain and namespace aliases, replace namespace name in variant in URL and got redirected.

  • ✖ FAILURE: whether $namespaceAliases works with $namespaceAliases in variant
    • -> $namespaceAliases in variant redirect to $namespaceNames in main language without fallback chain

✖ Test: Disable all fallback chain and namespace name, replace namespace alias in variant in URL but didn't get redirected. Expected: be redirected.

  • ✖ FAILURE: $namespaceAliases does NOT work with fallback -> $namespaceNames
    • -> $namespaceNames in fallback language redirect to $namespaceNames in main language without $namespaceAliases set in fallback language

✖ Test: Disable all namespace aliases, set $wgLanguageCode = "zh-hant"; with zh-hant fallback to zh-hans, zh-hans $namespaceNames = [ NS_TALK => '讨论', ]; but didn't get redirected. Expected: be redirected to 討論:.

  • ✔ SUCCESS: $namespaceAliases works with fallback -> $namespaceAliases
    • -> $namespaceAliases in fallback language redirect to $namespaceNames in main language without $namespaceAliases in main language

✔ Test: Disable all namespace aliases in main language, set $wgLanguageCode = "zh-hant"; with zh-hant fallback to zh-hans, zh-hans $namespaceAliases = [ '对话' => NS_TALK, ]; and got redirected to 討論:.

  • ✖ FAILURE: $specialPageAliases does NOT works with $convertedSpecials ($specialPageAliases in variant)
    • -> $specialPageAliases in variant redirect to $specialPageAliases in main language without fallback chain

✖ Test: Disable all special page aliases in main language and disable all fallback chain, use special page aliases in variant but didn't get redirected. Expected: be redirected.

  • ✔ SUCCESS: $specialPageAliases works with fallback -> $specialPageAliases
    • -> $specialPageAliases in fallback language redirect to $specialPageAliases in main language without $specialPageAliases in main language

✔ Test: Disable all special page aliases in main language, use special page aliases in fallback language and got redirected.

  • ✖ FAILURE: $magicWords does NOT works with $convertedWords ($magicWords in variant)
    • -> $magicWords in variant has same effect as $magicWords in main language without fallback chain

✖ Test: Disable all magic word names, aliases in main language and disable all fallback chain, use magic word names, aliases in variant but didn't work. Expected: work as magic word aliases.

  • ✔ SUCCESS: $magicWords works with fallback -> $magicWords
    • -> $magicWords in fallback language has same effect as $magicWords in main language without $magicWords aliases set in main language

✔ Test: Disable all magic word names, aliases in main language, use magic word names, aliases in fallback language and having same effect.

Change 743008 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Update and fix incorrect zh-* special page alias translations in MobileFrontend

https://gerrit.wikimedia.org/r/743008

Change 702950 merged by jenkins-bot:

[mediawiki/extensions/Scribunto@master] Update zh/zh-* namespace names and adding namespace aliases in Scribunto

https://gerrit.wikimedia.org/r/702950

Change 747912 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[operations/mediawiki-config@master] Revert \"Add zh-hans and zh-hant translation of Module and Module_talk aliases\" for Ib083a8ff042daa9bdd30d6a1e8c34f85b500fc12

https://gerrit.wikimedia.org/r/747912

Change 747913 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[operations/mediawiki-config@master] Revert \"Add zh-hans and zh-hant translation of Module and Module_talk aliases\" for Ib083a8ff042daa9bdd30d6a1e8c34f85b500fc12

https://gerrit.wikimedia.org/r/747913

Change 747912 abandoned by Winston Sung:

[operations/mediawiki-config@master] Revert \"Add zh-hans and zh-hant translation of Module and Module_talk aliases\" for Ib083a8ff042daa9bdd30d6a1e8c34f85b500fc12

Reason:

https://gerrit.wikimedia.org/r/747912

Change 747912 restored by Winston Sung:

[operations/mediawiki-config@master] Revert \"Add zh-hans and zh-hant translation of Module and Module_talk aliases\" for Ib083a8ff042daa9bdd30d6a1e8c34f85b500fc12

https://gerrit.wikimedia.org/r/747912

Sorry for the delay in responding. I'm still struggling to understand what exactly the issue is...

✖ Test: Disable all fallback chain and namespace name, replace namespace alias in variant in URL but didn't get redirected. Expected: be redirected.

What does "disable all fallback chain" mean here? Can you give a specific URL (e.g. on zhwiki) that breaks? I tested something like https://zh.wikipedia.org/zh-cn/對話:維基百科 and it seems to work fine. (where "對話" is in $namespaceAliases in MessagesZh_hant.php)

✖ Test: Disable all namespace aliases, set $wgLanguageCode = "zh-hant"; with zh-hant fallback to zh-hans, zh-hans $namespaceNames = [ NS_TALK => '讨论', ]; but didn't get redirected. Expected: be redirected to 討論:.

I think this is expected not to work? From reading LanguageConverterFactory it seems like Language Converter doesn't even take effect if $wgLangCode is set to a specific variant (TrivialLanguageConverter is returned as the language converter, not ZhConverter). I think it's probably reasonable that no auto conversion happens if the wiki sets $wgLangCode to something other than zh, since in that case the wiki is probably variant-specific in the first place.

✖ Test: Disable all special page aliases in main language and disable all fallback chain, use special page aliases in variant but didn't get redirected. Expected: be redirected.

I think I'm also stuck on "disable all fallback chain" for this one. https://zh.wikipedia.org/zh-cn/Special:字首索引 seems to work, with "字首索引" taken from $specialPageAliases in MessagesZh_hant.php (redirects to https://zh.wikipedia.org/w/index.php?title=Special:前缀索引&variant=zh-cn which loads correctly)

✖ Test: Disable all magic word names, aliases in main language and disable all fallback chain, use magic word names, aliases in variant but didn't work. Expected: work as magic word aliases.

Can you give a specific example of a case where this breaks, e.g. with a demo page on zhwiki?

What does "disable all fallback chain" mean here?

Please set up a custom wiki with $fallback removed from \languages\messages\Message*.php .

I tested something like https://zh.wikipedia.org/zh-cn/對話:維基百科 and it seems to work fine. (where "對話" is in $namespaceAliases in MessagesZh_hant.php)

"對話" is fetched from $namespaceAliases in \languages\messages\MessageZh.php line 43.
Also, whether ?variant= is specified won't affect $namespaceAliases , the only factor is $wgLanguageCode .

✖ Test: Disable all namespace aliases, set $wgLanguageCode = "zh-hant"; with zh-hant fallback to zh-hans, zh-hans $namespaceNames = [ NS_TALK => '讨论', ]; but didn't get redirected. Expected: be redirected to 討論:.

I think this is expected not to work? From reading LanguageConverterFactory it seems like Language Converter doesn't even take effect if $wgLangCode is set to a specific variant (TrivialLanguageConverter is returned as the language converter, not ZhConverter). I think it's probably reasonable that no auto conversion happens if the wiki sets $wgLangCode to something other than zh, since in that case the wiki is probably variant-specific in the first place.

This part is for fallback chain instead of LanguageConverter.

✖ Test: Disable all special page aliases in main language and disable all fallback chain, use special page aliases in variant but didn't get redirected. Expected: be redirected.

I think I'm also stuck on "disable all fallback chain" for this one. https://zh.wikipedia.org/zh-cn/Special:字首索引 seems to work, with "字首索引" taken from $specialPageAliases in MessagesZh_hant.php (redirects to https://zh.wikipedia.org/w/index.php?title=Special:前缀索引&variant=zh-cn which loads correctly)

"字首索引" is fetched from $specialPageAliases in \languages\messages\MessageZh.php line 149.

✖ Test: Disable all magic word names, aliases in main language and disable all fallback chain, use magic word names, aliases in variant but didn't work. Expected: work as magic word aliases.

Can you give a specific example of a case where this breaks, e.g. with a demo page on zhwiki?

Try using #重新導向 on any zh wiki, it won't work.

Sorry, I tried looking into this and got stuck, and then it fell off my radar. I probably won't have time to help resolve this in the near future, but here are some preliminary thoughts:

  1. In my opinion, the fallback chains specified in the message files should be considered part of the software, rather than something to be modified by wiki administrators, i.e. if something breaks only if the fallback chain is modified or removed, then it's not really a bug. Conversely, if the fallback chains cause bugs, then that should be addressed (so something like T182485 would be a bug if it causes incorrect behavior).
  2. If the issue here is that the current fallback chain setup requires duplicating translations in MessagesZh and MessagesZh_hant, it might be good to figure out how to restructure the fallback chain or the code to avoid this specifically.
  3. Given that LanguageConverter doesn't seem to be active if $wgLangCode is set to a specific variant like zh-tw (and so conversion would not be available for content), I think it's fine if it also doesn't work when e.g. trying to access a namespace in Simplified Chinese on a wiki where $wgLangCode is set to zh-tw, since it's probably reasonable to assume that a wiki like this is targeted towards Traditional Chinese users.

I tried tracing the logic for MediaWikiTitleCodec::splitTitleString (called from MediaWiki::parseTitle, which is used to resolve the title in the URL), but got pretty lost since it was hard to tell which part of the code was responsible for converting the namespaces/special page titles, even though it seemed like all of the scenarios I threw at it (without touching the fallback chains) worked fine.

LanguageConverter::findVariantLink (also called from MediaWiki::parseTitle) might be relevant as well. (I didn't have a chance to look into the magic words issue.)

  1. The fallback chains specified in the message files should be considered part of the software, rather than something to be modified by wiki administrators

The reason modifying the fallback chain is just used for simulating the situation.

Change 753959 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] Update language fallback chain for yue

https://gerrit.wikimedia.org/r/753959