Opened 3 years ago
Closed 3 years ago
#33514 closed Cleanup/optimization (fixed)
Fallback to a more generic language variant for Select2 translations.
Reported by: | David Glenck | Owned by: | Mohamed Nabil Rady |
---|---|---|---|
Component: | contrib.admin | Version: | 4.0 |
Severity: | Normal | Keywords: | select2 |
Cc: | Mohamed Nabil Rady | 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
When using for example the setting LANGUAGE_CODE="de-ch"
, the autocomplete_field widget will be in English as select2 does not provide the specific regional translation for "de-ch". However the existing translation language "de" would be a much better approximation.
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 .
Attachments (1)
Change History (5)
by , 3 years ago
Attachment: | 0001-fallback-to-language-without-region.patch added |
---|
comment:1 by , 3 years ago
Has patch: | unset |
---|---|
Keywords: | select2 added |
Summary: | Fallback to language without region for select2 translation → Fallback to a more generic language variant for Select2 translations. |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
UI/UX: | unset |
Thanks for the report. We should check all variants, see e.g. get_supported_language_variant().
comment:2 by , 3 years ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
patch with the suggested change