Page MenuHomePhabricator

Improve handling of country-based language variants
Open, Needs TriagePublic

Description

Country-based language variants (e.g. en-gb, en-ca, de-at, de-ch) are currently treated like completely independent languages, even though they are often the same. This makes them difficult to maintain and has led to people suggesting that we remove them entirely.

Issues when not using a variant as the UI language:

  • Users are not shown the other variants when editing. People update one label and don't realise that other labels need updating too. This causes the labels to constantly get out of sync.

Issues when using a variant as the UI language:

  • The variant becomes the first entry in the termbox, which pushes the main variant down the list and makes it harder to edit (the first entry is focused when editing).
  • The terms are often empty, which encourages people to fill in the blank fields.

Proposal:

  • Where appropriate, group language variants and have a way to expand and collapse them.
  • When viewing a page:
    • Collapse the groups by default. Show the user's preferred variant.
    • Expand the groups when clicking "All entered langauges".
  • When editing terms:
    • If the variants are different, expand the group by default. Show the user's preferred variant first in the list.
    • If the variants are not different, collapse the group by default. Show only the main variant. The user can expand it themselves if they need to enter a different label for one of the variants.

Existing languages where this could be useful (if users agree):

  • German (de-at, de-ch)
  • English (en-ca, en-gb)
  • Spanish (es-419)
  • Kazakh (kk-cn as a variant of kk-arab, kk-kz as a variant of kk-cyrl, kk-tr as a variant of kk-latn)
  • Korean (ko-kp)
  • Portuguese (pt-br)
  • Chinese (zh-cn, zh-my, zh-sg as variants of zh-hans, zh-hk, zh-mo, zh-tw as variants of zh-hant)

Event Timeline

Here's a picture of what I have in mind when I talk about grouping the languages:

language-grouping.png (593×1 px, 55 KB)

See https://www.wikidata.org/wiki/Q3733836?uselang=en-gb for an example of how the termbox is currently displayed when a variant is used as the UI language.