I suggest using the language without region from the LANGUAGE_CODE in case
an exact match can not be found.
This is __not__ a duplicate of https://code.djangoproject.com/ticket/33070
.
--
Ticket URL: <https://code.djangoproject.com/ticket/33514>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "0001-fallback-to-language-without-region.patch" added.
patch with the suggested change
* keywords: => select2
* has_patch: 1 => 0
* ui_ux: 1 => 0
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
Thanks for the report. We should check all variants, see e.g.
[https://github.com/django/django/blob/7986028e3fbc9f84fca5a25a03cecfbc85ca5ce7/django/utils/translation/trans_real.py#L506-L508
get_supported_language_variant()].
--
Ticket URL: <https://code.djangoproject.com/ticket/33514#comment:1>
* cc: Mohamed Nabil Rady (added)
* owner: nobody => Mohamed Nabil Rady
* has_patch: 0 => 1
* status: new => assigned
Comment:
https://github.com/django/django/pull/15438
--
Ticket URL: <https://code.djangoproject.com/ticket/33514#comment:2>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33514#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"3079133c73f3b8b0e929673b06b62dce1f54be71" 3079133]:
{{{
#!CommitTicketReference repository=""
revision="3079133c73f3b8b0e929673b06b62dce1f54be71"
Fixed #33514 -- Added fallbacks to subsequent language codes in Select2
translations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33514#comment:4>