Page MenuHomePhabricator

Fix language fallback and language variant namespace, special page, magic words aliasing
Open, Needs TriagePublic

Description

  • ✔ 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.