Translations
In progress
English is the source language. Everything else follows it.
What gets translated
Section titled “What gets translated”| What | Source | Translations |
|---|---|---|
| Web vault, used by every app | apps/web/src/i18n/en.ts |
ar.ts, and translations/web/<language>.json |
| Browser extension | apps/extension/src/i18n.ts |
translations/extension/<language>.json |
| Desktop app | apps/desktop/src/i18n.ts |
translations/desktop/<language>.json |
| Phone apps | apps/web/src/i18n/phone.ts |
translations/phone/<language>.json |
| Website | apps/website/src/i18n/landing/en.json |
<language>.json beside it |
| Docs interface | apps/website/src/content/i18n/en.json |
<language>.json beside it |
| Docs pages | docs/<path>.md |
docs/<language>/<path>.md |
The changelog stays in English. The native iPhone and Android apps take their strings from the web and phone catalogs through tools/native-resources, so they need no translation of their own.
Fixing a translation
Section titled “Fixing a translation”Open Weblate once it’s live, or edit the file in a pull request:
- App strings: edit
ar.tsor thearblock in the app’s catalog, then runnode tools/translations/sync.mjs export. CI checks that the two match. - Docs: edit the page under
docs/ar/.
Weblate commits to the translations/ files and to docs/ar/. Run node tools/translations/sync.mjs import to carry Arabic fixes from translations/ back into the TypeScript catalogs.
Keeping docs in step
Section titled “Keeping docs in step”node tools/translations/check-docs.mjs lists English pages with no translation, and fails on translations that have lost their English page, changed a page’s status, or link to an English page. A page with no translation shows the English text with a notice, so a new English page never leaves a hole in the site.
Rules for Arabic
Section titled “Rules for Arabic”- Modern Standard Arabic, plain and direct, in the same voice as the English.
- Use the words the apps use. The Arabic catalog,
apps/web/src/i18n/ar.ts, is the glossary: for example, «الخزنة» for vault and «البريد المُقنَّع» for masked email. - Product names stay in Latin letters: Octa Pass, Touch ID, Windows Hello, Weblate.
- Western digits (0–9), as in the apps.
- Commands, code, file names, setting names like
OCTAPASS_PUBLIC_URLand URLs stay as they are. - Counted messages need all six plural forms: zero, one, two, few, many and other.
- No letter-spacing on Arabic text: it breaks the joins between letters.
Adding a language
Section titled “Adding a language”- Open the language in Weblate, or add
translations/<component>/<language>.jsonby hand. - Add it to
LOCALESinapps/web/src/i18n/core.ts, with its direction, and load its catalogs in each app. - Add it to
localesinapps/website/astro.config.mjs. - Translate the docs pages you can. The rest fall back to English.
Step 2 is a code change on purpose: a language ships when its app strings are complete, because a half-translated password manager is easy to misread.
Weblate setup
Section titled “Weblate setup”For maintainers. .weblate points the wlc client at the project, and translations/weblate.json lists every component with its file mask, format and settings. Docs pages use one Markdown component each, created by the component discovery add-on, with Translate front matter values turned on. See translations/README.md.