Page MenuHomePhabricator

MinT has ambiguous language code "zh" as output language, which is used for the mix-script language converter
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Check the list of supported languages by language code

What happens?:

  • zh (Mandarin) is listed as one of the translation target languages

What should have happened instead?:

We should only use explicit zh-hans / zh-Hans , zh-hant / zh-Hant , zh-hk / zh-Hant-HK language codes for translation target language

This ticket proposes to allow users to indicate specific variants of a language when they are supported. This requires MinT to be updated to (a) include variants supported when listing the supported languages, and (b) accept those variants as input when providing translations. In this way, users could request a translation of a sentence to either zh-Hans (Mandarin written with Simplified Han script) or zh-Hant (Mandarin written with Traditional Han script).

It should still be possible to request translations for the general language code (zh) without using a specific variant, as currently happens.


Related: T240185: Expose Traditional Chinese variant in addition to Simplified Chinese for services supporting it

Event Timeline

Winston_Sung renamed this task from MinT has ambiguous language code "zh", which is used for the mix-script language converter to MinT has ambiguous language code "zh" as output language, which is used for the mix-script language converter.Jul 26 2023, 11:18 AM

Change 941942 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Mint: Disable translations to Chinese

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

Change 941942 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Mint: Disable translations to Chinese

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

Pginer-WMF moved this task from Backlog to Adding languages on the MinT board.

I think I run into this issue today. I am working on converting C:Template:Sisterprojects to use translate extension. The original template had Chinese variants:

  • zh-hans - Chinese written with simplified script
  • zh-hant - Chinese written with traditional script
  • zh-tw - Taiwanese Mandarin (using traditional or pinyin script)
  • cdo - Eastern Min
  • zh-min-nan / nan - Southern Min

I am attempting to copy existing translations from the old format to the new and I was able to copy Min variants but not Chinese variants. I get the error:

Screenshot 2024-06-13 091242.jpg (267×480 px, 32 KB)