Translating BeeBEEP
What a translator receives, how to fill in a translation file, and how to try it in BeeBEEP before it is sent back.
For: translators · From BeeBEEP 6.0.0 · Updated on
Every word BeeBEEP shows on screen can be translated into your language without touching its code. This page is for someone who wants to translate BeeBEEP or review an existing translation: it says which file you work on, how to fill it in and how to see the result in the program.
What you work on
Translations are Qt translation files, one per language, in the translations folder of the source tree.
| File | What it is |
|---|---|
beebeep_xx.ts | The template: every string of BeeBEEP with nothing translated and no language set. The starting point for a new language. |
beebeep_<locale>.ts | A language's source file, for example beebeep_de.ts. <locale> is a Qt locale name: de, pt, zh_CN. |
beebeep_<locale>.qm | The compiled form of the same file, the one BeeBEEP reads. |
The template exists for a language BeeBEEP does not have yet: copy beebeep_xx.ts, and replace xx in the name with the Qt locale name of your language, for example beebeep_ro.ts for Romanian. You do not need to ask first.
Italian is translated in full. English is the language the strings are written in, so its file only holds the singular and plural forms of the strings that count something. The other languages have a .ts file with every string still to translate. Take one of those files, or the template for a language that is not there.
Translating
Open the .ts file in Qt Linguist, the translation tool that comes with Qt.
- If the file has no language yet, as
beebeep_xx.tsdoes, set it under Edit > Translation File Settings. The plural forms of the entries follow that language's rules. - Translate every entry. The source text and the place it appears in are shown next to each entry.
- Keep the placeholders exactly as they are:
%1,%2and%nare replaced by names, numbers and counts when BeeBEEP runs. - Fill in every plural form of an entry that carries
%n, such as%n group(s). The languages differ in how many forms they have, and Linguist shows one field for each. - Save the file.
An entry left unfinished shows the English text in BeeBEEP. A .qm file without a single translated string is ignored, and BeeBEEP uses English.
Trying your translation
On a computer, compile the file and let BeeBEEP read it in place of the one it carries.
- In Qt Linguist choose File > Release, or run
lreleaseon the file. You getbeebeep_<locale>.qmnext to it. - In BeeBEEP open Settings > Appearance > Language. Under Translations folder, Open folder shows the folder BeeBEEP reads first. Put your
.qmfile there. Change... picks another folder, and Use the default folder goes back. - On the same screen choose your language, then start BeeBEEP again. The language changes at the next start, not at once.
A .qm file in that folder is used in place of the one built into BeeBEEP for the same language, so you can improve a translation that already exists.
For a single run, start BeeBEEP with --language=<locale>, for example --language=de. The option wins over the choice in the settings.
The Language setting is on computers only. On Android 13 and later and on iOS the language is chosen for each app in the system's own settings.
Month names
The names of the months and a date written in full, such as a birth date, are not in the .ts file: BeeBEEP takes them from Qt's own data for your language. There is nothing to translate for them, and they are right as soon as BeeBEEP runs in your language.
Right-to-left languages
For a language written from right to left, such as Arabic, BeeBEEP mirrors its layout by itself. Check the screens in that language: icons that show a direction are mirrored, and a clock or a camera never is.
Sending your translation
Send the finished .ts file, the source and not the .qm, by e-mail to marco.mastroddi (at) gmail.com, written as an ordinary address. In the message:
- name the language;
- give the BeeBEEP version you translated;
- say how you want to be credited.
In BeeBEEP, About BeeBEEP lists the languages under Translations, and a language that has been reviewed shows Reviewed by and the names of the reviewers.