#23005 closed Bug (fixed)

Improve zh-* language code handling

Reported by: caxekis@… Owned by: nobody
Component: Internationalization Version: master
Severity: Normal Keywords: i18n, chinese, zh
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As per #18419, zh-cn and zh-tw are deprecated and one of the reason was that "...Traditional Chinese is not used only by Taiwan (tw) but also Honk Kong (hk), and Simplified Chinese is not only used in China (cn) but also Singapore (sg) and Malaysia..." . However pull #1868 https://github.com/django/django/pull/1868 did not specify fallback for those language variant.

I would say we should follow Mediawiki's configuration for chinese language variants fallback (see https://git.wikimedia.org/blob/mediawiki%2Fcore.git/e016f6aa9386f515398d07d25419650c1fb74bf6/languages%2Fclasses%2FLanguageZh.php#L104 line 104 ).

  • zh-cn, zh-sg and zh-my fallback to zh-hans
  • zh-hk, zh-mo and zh-tw fallback to zh-hant

Change History (4)

comment:1 Changed 13 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 13 months ago by timo

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 13 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 5dcdbe95c749d36072f527e120a8cb463199ae0d:

Fixed #23005 -- Allowed specifying special fallback languages

This fixes the Chinese language issues described in #23005 but
also provides for other fallback exceptions by updating the
LANG_INFO structure.
Thanks caxekis at gmail.com for the report and Tim Graham for the
review.

Note: See TracTickets for help on using tickets.
Back to Top