Languages¶
CleanYourTV's screens are in English, Dutch, German, French, Spanish, Catalan, Russian, Turkish, Arabic and Polish: the launcher, its menus and Live TV, the manager app, the Inputs list, and the pages a phone opens from a QR code (Wallpapers, Live TV setup, voice setup, Share log).
Choosing the language¶
| Where | Language |
|---|---|
| The TV's screens | The TV's menu language. In the manager app, More > Language can choose another one: Automatic follows the TV again. The list shows how much of each language is translated; what is missing stays English. Dates and the clock follow the same choice. |
| A phone page | The phone's own language, then the one chosen in the manager, then English. |
| The Share log report | Always English, because it is read by the people who look into a bug report. |
Adding or improving a language¶
The Catalan translation is complete but has not yet been reviewed by a native speaker; corrections are very welcome. The Russian, Turkish and Arabic translations were machine-made and have not been reviewed by a native speaker yet; corrections are also welcome.
Translations are plain text files in the repository, one per language, so no programming is needed. Anyone can add a language or fix a translation with a pull request; the next daily release then brings it to every TV.
- Open
i18n/en.json. It lists every English text the screens use, as"English text": "English text". - Copy it to
i18n/<code>.json, where<code>is the two-letter code of the language (itfor Italian,plfor Polish). Set_nameto the language's name in that language ("Italiano") and_dirtoltr, orrtlfor a right-to-left language. - Replace each value with the translation. Leave out a line you are not sure about: that text stays English. Translating the texts of the launcher and the menus first gives the most visible result.
- Keep the placeholders:
%sis filled in with a text (a name, a version) and%dwith a number, in the same order as in English. - A text with a number can have plural forms, as
"%d photos": {"one": "%d foto", "other": "%d foto’s"}. The forms are the Unicode CLDR plural categories (zero,one,two,few,many,other);otheris required, and the form follows the first number in the text. - Keep translations short where you can: the TV is read from a few metres away, and a text too long for its row or button ends in "...".
- Open a pull request against the
devbranch. If you cannot use git, open a New language issue and attach the file.
The checks of the pull request run node tools/i18n.js: it shows how complete each language is, and it fails only when a file is
not valid JSON or a placeholder does not match the English text. To try a language on a TV before it is released, install the
dev build once the pull request is merged.
Right-to-left languages¶
With "_dir": "rtl" (Arabic, Hebrew) the home screen, its menus, the Inputs list and the manager app are mirrored, and Left and
Right on the remote follow the mirrored layout. Live TV keeps its left-to-right layout for now. Arabic is the first right-to-left language.
For developers¶
New texts are written in English and passed through t('...') in the launcher and the picker, tr() in the manager, and
i18n.tr() in the service's phone pages. node tools/i18n.js --sync adds texts from t('...') calls to en.json, and
node tools/build-pages.js puts each page's translations into it. i18n/README.md
has the details.