Languages¶
Sioul speaks your language, English and French first. The core decides and returns facts (lanes, reasons, counts), and one translation layer turns them into sentences (crates/sioul-core/src/i18n.rs).
Why Fluent¶
Translations use Project Fluent, Mozilla's system.
- It handles agreement as well as plurals. French must say "une lettre est arrivée" but "un code est prêt"; gettext's plural forms alone cannot express that.
- Each language decides its own grammar in its own file: the code passes the number, and the number in words in the masculine and the feminine, and each language picks what it needs.
Files¶
- One file per language:
crates/sioul-core/locales/<language>/sioul.ftl, built into the program. - English stands in for any message a translation lacks.
- A test checks that every language has every message, and that every file parses.
tools/check-messages.pychecks that every message the code asks for by its name (QMLsioul.text("…"), Rusttext("…"),say("…")) exists in each language, and French typography (narrow no-break spaces, ’);--unusedlists the messages never asked for by name (some are built at run time, "area-" and a kind). It fails when something is missing, so CI runs it.
Conventions¶
- Counts:
$nis the number, for plural selection;$countand$Countare it in words, lowercase and capitalised;$countfand$Countfare the feminine forms;- small numbers are written as words, as a calm sentence says them.
- Short-lived secrets:
$kind,$Kind, and$akindwith its article ("a code", "un code"). - Typography belongs to each language: French puts a narrow no-break space before
:;!?, and uses typographic apostrophes and commas in decimals. - Plain, literal language in every language: no idioms, buttons that say what they do (research.md, §10).
Dates and numbers¶
Day and month names come from the translation files for now. Full regional formats (CLDR, through ICU4X) come when a language needs more than names and separators.
Detection is not the interface's language¶
The detectors (one-time codes, dates in letters, case routes) read the languages of the mail you receive, whatever the interface's language. The code detector reads French and English today.
The Qt interface¶
QML displays strings it gets from the core: one catalogue, not two.
Translating¶
- AI drafts the missing strings, marked for review, then a person checks them (the workflow Ansel's documentation uses).
- Weblate supports Fluent, for when translators join.