--
Ticket URL: <https://code.djangoproject.com/ticket/32479>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Claude Paroz (added)
* stage: Unreviewed => Accepted
Comment:
Thanks for this ticket, as far as I'm aware `zh-Hant-HK` is a valid
language tag (see [http://www.iana.org/assignments/language-subtag-
registry/language-subtag-registry Language Subtag Registry]), we should
probably add `zh-Hant-HK` and others to fallbacks:
- `zh-hans`: `zh-Hans-CN`, `zh-Hans-HK`, `zh-Hans-MO`, `zh-Hans-SG`, `zh-
Hans-TW`,
- `zh-hant`: `zh-Hant-CN`, `zh-Hant-HK`, `zh-Hant-MO`, `zh-Hant-SG`, `zh-
Hant-TW`.
What do you think Claude?
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:1>
Comment (by Cup0fCoffee):
Hi, I thought of different solutions, and it seems to me like the one
proposed by Mariusz Felisiak is the most appropriate, so I've added a
[https://github.com/django/django/pull/14334 PR], in case the proposed
solutions gets accepted.
My only concern, is should the match be case sensitive or not? I.e. should
{{{zh-hant-HK}}} and {{{zh-hant-hk}}} match to {{{zh-Hant-HK}}}? I think,
the current implementation will not match them.
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:2>
* owner: nobody => Cup0fCoffee
* status: new => assigned
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:3>
Comment (by Claude Paroz):
As posted on the PR, I'd like to explore the automatic fallback in such
cases. If anyone beats me with this, feel free…
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:4>
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:5>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:6>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"06fd4df41afb5aa1d681b853c3c08d8c688ca3a5" 06fd4df4]:
{{{
#!CommitTicketReference repository=""
revision="06fd4df41afb5aa1d681b853c3c08d8c688ca3a5"
Fixed #32479 -- Added fallbacks to subsequent language codes in
translations.
Thanks Claude Paroz and Nick Pope for reviews.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32479#comment:8>