Group a language's variants in the picker, and pick one for a bare tag (#1053) #1064
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1064
Loading…
Reference in a new issue
No description provided.
Delete branch "1053-language-picker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Five languages are offered in more than one form, and the picker listed
each form as an entry of its own, grouped by how well it was translated:
português (Portugal) and português (Brasil) could sit under two headings.
Every language menu now shows a language's variants under its own name,
through one function, accounts.forms.grouped_by_language: the select on
Server settings -> Defaults, the document, record and CV language menus
(all LanguageSelect), and the rows of Settings -> Language and time.
The heading is CLDR's name for the language in itself, capitalised as
CLDR asks of a menu (Português, Español, Français, English, 中文), and
carries its lang; under it a variant is its country in its own language
(Brasil, México, United Kingdom; es reads as España), and Chinese is
named by script (简体中文, 繁體中文). A language offered in one form stays a
plain option. The closed control shows the whole name (data-chosen).
language_choices is flat now; the translation state stays on the rows.
Each option and row also carries the words it can be found by: its own
name, CLDR's English one and its name in the interface language, so the
box over a long select and the Settings search find Deutsch for
"German". Without scripts the plain select, with its groups, still works.
A browser asking for plain pt, es, fr, en or zh is given pt-BR, es-MX,
fr-FR, en-GB or zh-Hans (languages.DEFAULT_VARIANTS), in LocaleMiddleware;
a header that names a variant first still gets it. Where the instance
does not offer the form asked for, a visitor gets another offered form
of the same language before the instance default.
Closes #1053
Notes for review
pt→pt-BR,es→es-MX,fr→fr-FR,en→en-GB,zh→zh-Hans.language_choices()is flat now, because an<optgroup>cannot nest. So the Server defaults select loses its "Reviewed / Awaiting review / Partly translated" headings. Partial languages keep their percentage, and Settings still shows each language's state.preferences.fallbacktries another offered form of the same language before the instance default.es-419andes-ARstill go toes(Spain). Only bare tags are remapped.docs/TRANSLATING.md.🤖 Generated with Claude Code
96b24936aa4eab1bdb39