Translating The Hub
The Hub speaks five languages: English, Français, Português (Brazil), Español and 日本語. Every button, title, message and error in the app is translated, and so are the desktop app's login page and its Windows installer. Messages people write, names and space names are never translated.
This page is for anyone who wants to make the translations better, add text to the app, or ship translations with an activity module.
How the language is picked
- In the app: Settings → Language. "Same as my browser" follows the browser or the computer; picking one keeps it. The Hub reloads to switch.
- In the desktop app: the very first launch asks, before the login page, with the computer's language already selected. The app then opens in that language, and changing it in Settings → Language keeps the login page in step.
- The Windows installer asks for its own screens (Next, Install, Finish) when it starts.
- Dates and times follow the language you pick.
Help make it better
The translations were written by the team and haven't all been checked by native speakers. If a sentence sounds wrong, stiff or unnatural in your language, tell us.
One wrong sentence: open Settings → Feedback, choose Fix a translation, and write where you saw it (the screen, or what you clicked), the text as it is now, and how you would say it. A screenshot helps. The app adds the language it is in by itself.
A whole language: download the review sheet for your language. It lists every text of the app, where it shows, the English and the translation today, with empty columns for a better wording and a note. It is rebuilt with every update, so it always matches the app.
Open it in Excel, Google Sheets, LibreOffice or Numbers, and fill in Better wording only where the translation should change. Then send the whole file back: Settings → Feedback → Fix a translation, and add it with Add a screenshot or sheet (.csv or .xlsx, as you saved it). Every correction goes into the next update.
For the team: node tools/i18n-import.cjs <fr|pt|es|ja> <sheet.csv> reads a returned sheet (an .xlsx is saved as CSV first) and shows every change it would make, was and now, without writing anything. Once someone has read them, the same command with --apply writes them. It finds each row by its English text and leaves out a correction that drops a {placeholder}; run the tests after it.
Tips for translators
- Keep the tone of a friendly app: everyday words, short sentences. Use the same form of address the existing translations use (in French, vous).
- Short texts are usually buttons, tabs or titles: keep them short, or they won't fit.
- Keep anything in braces (
{terms}),@everyone,@here,#channelnames and numbers exactly as they are: the app fills them in. - Product names stay as they are: The Hub, the Lounge, GIF, TikTok, YouTube.
- A few texts are built around a value, like Server error (500) or Online 3: translate the words and keep the number in the same place.
Adding text to the app
The interface is written in English. A translator in the page (assets/i18n.js) swaps any text, tooltip or placeholder that exactly matches an English entry, so new text needs a row there:
['Report sent. Thank you for looking out for people.', 'Signalement envoyé. Merci de veiller sur les autres.',
'Denúncia enviada. Obrigado por cuidar das pessoas.', 'Denuncia enviada. Gracias por cuidar de los demás.',
'報告を送りました。みんなを気にかけてくれてありがとう。'],
The order is always English, French, Portuguese, Spanish, Japanese. Text built around a value goes in I18N_PATTERNS instead, as a regular expression with $1 where the value goes:
[/^Server error \((\d+)\)$/, ['Erreur du serveur ($1)', 'Erro do servidor ($1)', 'Error del servidor ($1)', 'サーバーエラー ($1)']],
The tests catch what was forgotten: test/i18n-coverage.test.js reads every sentence in the app and fails for any that has no row and no pattern. Names, codes and examples that read the same everywhere go in its KEEP_ENGLISH list.
Text that must never be translated (people's messages, names) is skipped by the translator: give its element data-no-i18n, or one of the classes in SKIP at the end of assets/i18n.js.
The desktop app's login page can't load assets/i18n.js, so it carries its own rows (ROWS in desktop/src/login.html), in the same order, checked by the same test.
Translations in an activity module
A module brings its own strings: list a JSON file as i18n in its module.json, with the module's rows and patterns in the same shape as above ("patterns" take the regular expression as a string):
{
"rows": [["Your turn", "À vous de jouer", "Sua vez", "Tu turno", "あなたの番"]],
"patterns": [["^(\\d+) points$", ["$1 points", "$1 pontos", "$1 puntos", "$1 点"]]]
}
A row the app already has wins, so a module can't change the app's own wording. See Activity modules for the rest of module.json.
Plugins can't ship translations yet: a plugin's text shows as written. If you need it, tell us through Settings → Feedback (choose Suggest a feature).
Adding a language
A new language needs a column in every row, so it is a bigger job: talk to us first through Settings → Feedback (choose Suggest a feature). Any review sheet above works as a start: its English column is the full list to translate. Once it is done, we add the language to the app, the desktop login page and the installer together.