Translations#
Formerly
transifex-integration.md.
IntroVox's own texts (the default steps of the welcome tour, the built-in tours, the admin and personal settings, and the messages around them) are translated in VoxCloud's Weblate. This page describes how a string travels from the code to a user's screen, what a developer does when adding strings, why l10n/ is generated, and how IntroVox picks a translation at runtime.
The tours an admin writes are not part of this: they are stored per language in the database, and an admin translates them in the step editor, by hand or with Translate with AI. See Language Management.
How the pipeline works#
Source strings in the code
│ t('introvox', '…') and $l->t('…'), American English, with // TRANSLATORS: hints
│
│ (1) the developer runs `npm run pot` and commits the POT with the code
▼
translationfiles/templates/introvox.pot on main
│
│ (2) Weblate picks up the new strings automatically
▼
VoxCloud's Weblate
│
│ (3) translators translate; Weblate commits translationfiles/<lang>/introvox.po
│ to the branch l10n/weblate and opens a pull request
▼
Pull request from l10n/weblate
│
│ (4) the "l10n sync" check rebuilds l10n/<lang>.js + l10n/<lang>.json from the .po files
│ and commits them on that branch; the pull request is merged
▼
Next IntroVox release
│
│ (5) the tarball includes l10n/
▼
User sees IntroVox in their Nextcloud language, no admin action needed
- Source strings live in the code:
t('introvox', '…')in Vue and JavaScript,$l->t('…')in PHP, written in American English. A// TRANSLATORS:comment above a string explains it to translators. - The POT follows the code. A developer who adds or changes strings runs
npm run pot. That regeneratestranslationfiles/templates/introvox.potwith Nextcloud's own translationtool, and the POT is committed together with the code. - Weblate picks up the strings once that commit is on
main. Nobody uploads anything by hand. - Translators work in Weblate. Weblate writes the translations to
translationfiles/<lang>/introvox.po, commits them to the branchl10n/weblate, and opens a pull request. - CI builds what Nextcloud loads. On that pull request, the l10n sync check converts the
.pofiles intol10n/<lang>.jsandl10n/<lang>.json(translationtool'sconvert-po-files) and commits them on the same branch. Strings marked "needs editing" in Weblate (fuzzy) are left out. The pull request is merged, and the translations ship with the next release.
Every language ships. There is no minimum percentage: a language that is partly translated ships with what it has, and a string that is not translated yet shows in English.
Files#
| File | Purpose |
|---|---|
translationfiles/templates/introvox.pot |
The source strings. Generated by npm run pot, committed with the code; Weblate reads it from main |
translationfiles/<lang>/introvox.po |
The translations of one language. Written by Weblate only |
l10n/<lang>.js, l10n/<lang>.json |
What Nextcloud loads. Generated from the .po files by CI, never edited by hand |
l10n/.source-strings.json, l10n/.source-count.json |
The list and number of source strings, written by npm run pot. npm run build fails when the code's strings no longer match the list |
.l10nignore |
Folders translationtool skips when it builds the POT (docs/, js/, node_modules/, the test folders, …) |
scripts/l10n-sync.mjs |
Runs translationtool: pot writes the POT, build writes l10n/ from the .po files, check fails when either is out of date |
Adding or changing strings#
- Write the string in the code, in American English, with
'introvox'as the first argument:
// TRANSLATORS: Label of a switch in the personal settings
t('introvox', 'Start tours by themselves')
n('introvox', '%n person', '%n people', count)
In a Vue template, the hint is an HTML comment: <!-- TRANSLATORS: … -->.
-
Only what translationtool can see reaches translators. It finds
t('introvox', '…')andn('introvox', '…', '…', …)with literal strings, and->t('…')and->n(…)in PHP. A helper with another name (trans,$t,this.t), a call without'introvox'as its first argument, or a string built from variables is invisible to it: the string is never translated.tests-js/l10n-bot-visibility.test.jssimulates translationtool and fails when it would miss a string, such as one behind a helper with another name. -
Run
npm run potand commit what it changed together with the code:
npm run pot
git add translationfiles/templates/introvox.pot l10n/.source-strings.json l10n/.source-count.json
It needs Node 20 or later, PHP with SimpleXML, and gettext (xgettext, msgattrib). npm run l10n:lint checks the new strings against Nextcloud's translation guidelines, such as a non-breaking space before an ellipsis.
- Commit early. Translators can only start once the strings are on
main, so a string added just before a release ships in English first. If you forget the POT,npm run buildstops with the list of strings that changed (scripts/check-l10n-sync.js), and CI fails onnode scripts/l10n-sync.mjs check.
Hints end up in the POT as #. lines, and Weblate shows them next to the string:
#. TRANSLATORS: Error message: only administrators may do this
msgid "Administrator privileges required"
msgstr ""
Changing the English text of an existing string makes it a new string for translators. Until it is translated again, users see the new English text.
Why l10n/ is generated#
Nextcloud loads translations from two files per language, and nothing else:
l10n/<lang>.jsregisters the translations in the browser throughOC.L10N.register:
OC.L10N.register(
"introvox",
{
"Got it" : "Verstanden",
"_%n person_::_%n people_" : ["%n Person","%n Personen"]
},
"nplurals=2; plural=(n != 1);");
l10n/<lang>.jsonis what the server reads (IL10N, for$l->t()): the same translations under"translations", with the plural rule as"pluralForm".
A plural string has the key _<singular>_::_<plural>_ and a list of forms, as many as the language's plural rule has. Neither file goes through webpack; both are shipped in the App Store tarball. English has no file: English is the source text in the code.
The .po files are the source of the translations and Weblate is their only writer. l10n/ is built from them with translationtool, the same tool Nextcloud uses for its own apps, so the files have exactly the format Nextcloud expects. A change made by hand in l10n/ or in a .po file would be overwritten by the next build, and a pull request that changes a .po file outside Weblate fails the l10n sync check. A wrong translation is fixed in Weblate.
Translations at runtime#
Which translation a user gets#
ApiController::getWizardSteps() uses IFactory::findLanguage(null) to obtain the user's raw language preference (deliberately not findLanguage('introvox'), which would re-route to a language IntroVox happens to ship a translation file for). DefaultStepsService::getForLanguage($lang) then builds the eight default steps via IFactory::get('introvox', $lang): in the user's full language (pt_BR), else its base language (pt), else English, never the system default language. See Multi-Language Support.
DefaultStepsService (v1.7.0+)#
A DefaultStepsService was originally removed in v1.6.0 because it shipped hardcoded Dutch defaults and was dead code. It was reintroduced in v1.7.0, this time as the single source of truth for the eight built-in steps, shared between AdminController (editor view seed) and ApiController (end-user fetch). It translates them with IFactory::get('introvox', $lang), with an explicit English fallback when the requested language has no translation file.
This is what made it possible to remove the legacy useDefault: true + empty-steps response pattern: the API now returns the full inline-translated step set in every response, so the client never has to rebuild defaults locally (which had been re-translating them through the browser-loaded Vue bundle, sometimes in the wrong language).
Built-in tours (2.0.0+)#
The built-in tours for Files, Talk, Deck and Calendar are translated the same way. BuiltinTours::stepsIn($l) defines their steps with $l->t(), so their strings are in the POT like the welcome tour's; BuiltinTours::steps($id, $lang) builds them in the user's language, its base language, or English. For users, an admin's own steps for the user's language come first, then the translated built-in steps, then the admin's steps in the tour's main language, then English (see API Reference).
Language names in the override picker (v1.6.0+)#
The "Add language override" picker labels (e.g., "Nederlands", "Português") come from OCP\L10N\IFactory::getLanguages(), Nextcloud's built-in localized-language-name database. Every language Nextcloud knows about is selectable, not just the ones IntroVox already has a translation file for, so an admin can author an override for a language that has no translation yet.
Before v1.6.0, IntroVox maintained a hardcoded map of language codes to display names (and emoji flags). Since v1.6.0 the map is gone: Nextcloud provides the names, correctly localised (an English admin sees "German", a German admin sees "Deutsch"). No emoji flags, matching the Nextcloud Settings convention.
English source strings as msgids (v1.6.0+)#
Before v1.6.0, default step content used opaque translation keys:
Translators had no context for what step_welcome_title should mean. Since v1.6.0, the English source text is the msgid:
This applies to all default step titles and texts, all admin and personal settings strings, the previously-Dutch-hardcoded "Begrepen" button (now t('introvox', 'Got it')), and the strings of the PWA install step: that step detects the user's OS and browser and shows tailored instructions, and its strings in src/utils/deviceDetection.js and src/components/wizardSteps.js were hardcoded Dutch literals before v1.6.0.
Existing customized step content stored in oc_appconfig.wizard_steps_<lang> is not affected by this: only the built-in defaults use these strings.
A new language, or a translation error#
- A translation error, or a language you want to help with: translations are maintained in VoxCloud's Weblate. Open an issue on GitHub with the language, the English text and what it should say. A fix reaches users with the next IntroVox release, once their administrator has updated the app.
- Your own text for one language: an admin can add a
wizard_steps_<lang>override in the step editor for any language Nextcloud supports, also one without a translation. The override wins until it is reset; then the translated defaults take over again. See Language Management.
History#
- v1.6.0 to November 2026: Transifex. IntroVox was part of Nextcloud's Transifex project (resource
nextcloud/introvox) from v1.6.0. From v1.7.0, Nextcloud's sync bot brought the translations into the repository (docker-ci#938); 2.0.0 shipped a pull of its own, made on release day, with every language that had translations. - Since 2026-11-24: VoxCloud's Weblate. The translations moved to VoxCloud's own Weblate, and the
.pofiles became part of the repository. Nothing was lost: the same 107 languages were imported, with no differences. One Belarusian translation, of a string removed from the code in October, went into Weblate's translation memory.
See Also#
- Multi-Language Support — how languages work for users
- Language Management — admin overrides
- Frontend Architecture — how translations are loaded at runtime