Server settings → Defaults: with nothing stored no language is ticked, and a partly translated language loses its region #322
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#322
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found on 2026-09-29 while building #312. Both bugs were already there before that change.
1. With nothing stored, no language is ticked
With the setting empty (a new instance, or one that never saved Defaults), Languages this instance offers shows every box unticked, although the page says every language is offered. The form's initial value comes from the saved record, an empty list, and that overrides the field's default of "all".
Saving the page as shown is where this could go wrong: the stored value would then disagree with what the page claimed.
Fix: when the stored list is empty, the form starts with every language ticked. A test renders the page on a fresh instance and finds every box ticked, and a second test saves the page unchanged and finds the offer unchanged.
2. A partly translated language loses its region in the list
LocaleForm._language_optioncuts a language's name at the first " (" to drop the percentage it appends. A name that has a region in brackets loses the region as well: "français (France)" is shown as "français", next to "français (Canada)" if that is ever added.Fix: remove only the part the code appended (keep it apart from the name rather than cutting at a bracket). A test uses a partly translated regional language.