Translating Nootion
Nootion's interface is available in English, French, German, Spanish and Italian. Each person picks their language in
My account › Language (or with the command palette: Ctrl+K, then "Language"); until they do, the browser's
language is used, and visitors of public pages get theirs. A language that isn't finished yet shows its progress in the
menu ("Polski (62 %)"): the texts it lacks are shown in English, one by one, so a partial translation is already useful.
What follows the language:
- every text of the interface, the e-mails and the server's messages;
- dates, times and numbers (
1.500in German,1 500in French), and plurals; - the names and keywords of emojis in the icon picker, and the validation messages of forms.
Dates written in plain words in a page (@tomorrow 9am, @morgen um 9 Uhr, @el próximo viernes, @domani alle 15)
are understood in every language, whatever the one chosen.
#Adding or finishing a language
You need Node.js 22 and pnpm (see CONTRIBUTING.md).
Copy
packages/shared/src/i18n/en.tstopackages/shared/src/i18n/<code>.ts(pl.ts,pt.ts…), name the export after the code and type itCatalogue:tsimport type { Catalogue } from "./types.js"; export const pl: Catalogue = { "account.addPhoto": "Dodaj zdjęcie", // … };You can translate a part and leave the rest out: missing texts are shown in English.
Register it in
packages/shared/src/i18n/index.ts: add the code toLOCALES, its name written in the language toLOCALE_NAMES, the catalogue toCATALOGUESand the Intl locale (pl-PL) toINTL. If Zod has the language, add it toi18n/zod.ts; if emojibase-data has it, add it toEMOJI_DATAinapps/web/src/components/IconPicker.tsx.Check it:
bashpnpm i18n:check pl # this language only pnpm i18n:check pl --list # and list the texts still missingIt says how much is translated and lists what must be fixed: texts that no longer exist in
en.ts, placeholders ({count},{name}) or bold marks (<b>…</b>) that differ from English, and plural forms the language doesn't have. Those fail the check (and the CI); missing texts are only a warning.Run
pnpm test, then open a pull request.
#Rules of the catalogues
en.tsis the reference: a new text is added there first, then infr.ts, which must stay complete (TypeScript and a test check it). The other languages follow when their translators update them;pnpm i18n:checklists what changed.- Keep the placeholders as they are:
{name}is replaced by a value, and its position in the sentence is yours to choose.<b>…</b>marks words in bold.{{row.<column>}}and the formula examples (prop("Price"),dateAdd()) are what people type: translate the column names in the examples, not the function names. - A text with a count is written with its plural forms, chosen by the
countparameter with Intl.PluralRules:{ one: "{count} page", other: "{count} pages" }. Languages with more forms add them (zero,two,few,many), for example in Polish{ one: "{count} strona", few: "{count} strony", many: "{count} stron", other: "{count} strony" }.otheris always required; a form a language needs but the catalogue lacks falls back toother. - The tone is the one of the English texts: short, plain words, addressing the person directly. French uses "vous"; German, Spanish and Italian use the informal "du", "tú" and "tu", as most apps do in those languages.
- Keep product names as they are (Nootion, Nextcloud, Google Calendar, Entra ID…).
Right-to-left languages (Arabic, Hebrew) need layout changes beyond the texts; they will come separately.
#Plain-word dates
The words understood in dates written in a page (@demain 9h, @next friday) are in
packages/shared/src/dates.ts: days of the week, months, numbers, units ("days", "Tage", "giorni") and phrases such
as "tomorrow" or "in 3 days". A new language adds its words there, with tests in apps/server/test/dates.test.ts.
Abbreviations that mean something else in another language ("mar" is March and Tuesday) are left out.