Follow BCP 47 for language codes: canonical tags in tests and documents, gettext names only for the locale directories #14
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#14
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?
The requirement: all language codes must follow BCP 47. A BCP 47 tag (RFC 5646) is made of subtags from the IANA registry joined by hyphens, and §2.1.1 gives the form to write one in: the language in lower case, a script in title case, a region in upper case (
pt-BR,en-GB,sr-Cyrl). The rule for the whole project is postulo/postulo#337; this is what it means for this plugin.What exists today
src/postulo_dav/locale/under gettext locale names (fr_FR,pt_BR,pt_PT), and each PO file'sLanguage:header says the same. They are not language tags; the core'spostulo-messagesderives them from a tag with Django'sto_locale.tests/test_catalogues.pynames the working languages as("fr-fr", "pt-pt")and the European Union's with"fr-fr"and"pt-pt"among them, andtests/test_dav.pyswitches language withtranslation.override("fr-fr"),("pt-pt")and("en-gb")(lines 692-697). These are the core's own spellings, handed to the core's tool, so they cannot change here before they change there.PRODIDends in//EN(src/postulo_dav/sync.py:75). That is the language field of a formal public identifier, written in upper case by its own convention, and it stays.src/postulo_dav/text.pywrites noLANGUAGEparameter and drops one it reads.What the plugin should do
pyproject.tomlpins commit1d6cdd7e0), and write the codes in the tests as the core then does (fr-FR,pt-PT,en-GB).locale/directory names being gettext's and made by the tool.LANGUAGEparameter of RFC 6350 §5.1 and RFC 5545 §3.2.10 takes one. That bears on postulo/postulo-dav#8, #11 and #12, which patch cards, events and tasks instead of rebuilding them and so must keep aLANGUAGEparameter they find; and on postulo/postulo#335, after which the text Postulo writes is in its owner's language and could say so.Done when
locale/directory names and the PO headers.uv run pytestpasses against the core that carries postulo/postulo#337, anduv run pytest -m releasestill holds the European Union catalogues complete.LANGUAGEparameter on a card or event made elsewhere survives a push, once those issues land.Requested on 2026-10-01: all language codes must follow BCP 47.