Traduction incomplète
Cette page n'est pas encore entièrement traduite : les passages non traduits sont affichés en anglais.
0013. English source, French shipped, no hard-coded strings¶
Status: accepted
Date: 2026-11-07
Context¶
Housecairn is written in English and ships in French from V1; more languages will come through a translation platform. Strings added without translation functions are the usual cause of half-translated screens.
Decision¶
English is the source language (
LANGUAGE_CODE = "en");LANGUAGESlists English and French.LocaleMiddlewarepicks the language from the browser.Every user-visible string goes through
gettext/gettext_lazyin Python and{% translate %}/{% blocktranslate %}in templates. The product name is not translated.The catalog lives in
src/housecairn/locale/fr/LC_MESSAGES/django.po; the compileddjango.mois committed so the application runs without GNU gettext installed.manage.py check_translationsfails on an untranslated or fuzzy entry;--sourcesalso runsmakemessages(needs GNU gettext) and fails if a string of the code or templates is missing from the catalog. Both run in the tests, the second when gettext is available.Dates, numbers and currencies are formatted with Django’s localization.
Consequences¶
A pull request that adds a string also updates
django.poanddjango.mo:cd src/housecairn uv run python ../../manage.py makemessages -l fr --no-obsolete --add-location=file -i "static/*" uv run python ../../manage.py compilemessages -l fr