-
-
Notifications
You must be signed in to change notification settings - Fork 166
Translating the Program
First of all: Thank your for your interest in contributing to Little Navmap!
Keep in mind that the number of texts in such a program like Little Navmap is huge and won't be translated in a few days or a week. Also be sure to have a good knowledge of your native language as well as English. The translation tools listed below can help but you have to be able to review the results. You also need to have sufficient knowledge of aviation terms, whether from being a real pilot or a long-time simulator pilot.
I any case contact me if you plan to translate the program. I'll be glad to assist.
You can download a packed version of the Qt Linguist and lrelease programs here:
Little Navmap Downloads - Translations
to avoid the bloat of a full installation. These save you the confusing official download section of Qt which requires to create an account and also tries to trick you into a commercial version using dark patterns.
If you'd like to use the full Qt installation (click arrow to expand).
The fairly hidden Open Source download is Download Qt for open source use and the installation instructions are Get and Install Qt with Qt Online Installer.
You can download the Little Navmap sources for the latest version from GitHub. It is not needed but helps translating by showing sources, windows and dialogs in Qt Linguist.
Little Navmap Sources for the current releases 3.0:
- https://github.com/albar965/littlenavmap/tree/release/3.0
- https://github.com/albar965/littlenavconnect/tree/release/3.0
- https://github.com/albar965/atools/tree/release/4.0
Click the green button on the top right and select Download
.
There are three projects which contain translatable texts:
-
littlenavmap
The main program. -
littlenavconnect
The networking program. -
atools
A library that is used by the two above.
Each project contains .ts
source files e.g. littlenavmap_XX.ts
for translatable texts which are the files to be edited.
The files littlenavmap_XX.qm
are compiled binary files which cannot be edited.
Important: Edit the .ts
files only with Qt Linguist. You will make it more difficult than it is using a plain text editor and the result might crash Little Navmap.
Ask me and I'll send you the files for your language. Copy atools_XX.ts
, littlenavconnect_XX.ts
and littlenavmap_XX.ts
into the base directory of the extracted sources (besides littlenavmap.pro
and littlenavconnect.pro
).
Once done send the files back to me.
Clone the three repositories atools
, littlenavconnect
and littlenavmap
.
Alternatively, if you do not want to use Git you can also download the sources from the release pages at Github. Release pages are here: atools, Little Navconnect and Little Navmap.
Add you language to the project file to the TRANSLATIONS
variable.
Run lupdate
to create the *.ts
files.
Once done create a pull request on Github. See here for information on pull requests.
Overview of the Translation Process.
Read this if you'd like to get and update the translation files yourself:
Release Manager
The *.ts
are the files where the translations will be stored. These are text files and can be saved as a *.qm
by Qt Linguist using the File
-> Release
function.
Extract the downloaded Zip archives and open Qt Linguist (...\QtLinguist-win64-5.15.2\linguist.exe
or .../QtLinguist-macOS-5.15.2/bin/Linguist.app
).
On Linux the command line tools can be found in $HOME/Qt/5.15.2/gcc_64/bin
.
Qt Linguist manual for translators. Read this if you are not familiar with Qt Linguist. The linguist uses a quite intelligent and time saving workflow. It is really build to translate thousands of phrases and has a lot of checks and validation logic in it.
Once done I can add it to the next release or build a download package from it which I can put on my webpage and you can also put it on yours.
Users can just add the package to the program directory and the program will show up in their language.
Always mark a translation as done in Qt Linguist once done. This allows you to easily find new translations if a new version is released.
You need a compiled/binary version of the program which can be a release, beta or development version. These can be either publicly available version or one I send you by mail.
Create the *.qm
files with Qt Linguist using: Main menu -> File
-> Release
Copy the atools.qm
and the corresponding
*.qm
for the program (Little Navconnect or Little Navmap) into the sub-directory translations
besides the executable.
You can force the GUI language of Little Navmap by adding Language=XX
to the [Options]
section in the C:\Users\YOURUSERNAME\AppData\Roaming\ABarthel\little_navmap.ini
or $HOME/.config/ABarthel/little_navmap.ini
file. XX
is a language code like en
, de
or fr
or PT_br
.
Texts will changed or be added during continued development of the program and when new versions arrive. If a translation is not available the program will show the English text or phrase during runtime.
Therefore it is needed to update the translations from time to time.
I run the lupdate
tool on the translation files and send you the updates which will contain a few new untranslated texts. Translate, test, send back and we are done.
- Update the cloned Git repositories and switch to the right branch like
release/1.8
that directs to betas and releases. - Run
lupdate *.pro
in each program directory to extract new texts from the sources. - Translate.
- Test using.
- Create a pull request on Github and I'll merge your changes back.
Each button or menu text should have an accelerator or a mnemonic indicated by a &
in the text. These are the underlined characters in the GUI. In Windows you have to press Alt to see them. They allow to access functions with the keyboard. I.e. Alt+F
goes opens the file menu. Then press o
to open a flight plan.
When you find an &
you can assign it as it fits best into your language. It is nice if the letters are unique in a menu but not required.
%1
, %2
, etc. are placeholders for other information like VOR types, numbers etc. You can change the order of these symbols according to your language but do not remove or add new placeholders.
Do not translate placeholders like %dist%
, %alt%` or similar since I use these to add units like NM or Meters into the text.
You will also find carriage returns in text which are shown as ¶
and have to be kept. Also there is HTML text where you translate only the phases inside the HTML.
If there is a space or a carriage return at the start or end of the text keep these.
You will find very short text snippets like ,
. Keep these as they are. Most languages do not need to translate these.
It is important that placeholders like %1
are kept in the text. The order is not important.
Phrases referring to menu items or buttons in the program are typically enclosed in double quotes "
. Keep the references
in sync with the actual buttons or menu items.
Do not try to be creative or funny. Check other applications or web pages in your language to find common aviation or domain specific translations.
Using texts from automatic translators always need to be reviewed. Never take the results as is.
Online translation programs:
Check common and widely used applications like MS Word, LibreOffice or a web browser to find the translation of terms like Save as
in your language. Do not try to invent new phrases but keep words consistent.
A translation can be distributed as an add-on package if it was finished in the middle of a release cycle.
To build a package download the template here: littlenavmap_translation_XX.zip
Extract the zip file.
Look for TODO
marks in the English README.txt
template and replace the text. The rest of the file is generic for all translations. No need to change.
Then copy the whole README.txt
file and translate the content of the file and the filename to your language (e.g. from README.txt
to LIESMICH.txt
or LEAME.txt
).
Add the translation files and optional PDF help files to the directory structure of the extracted template. The README.txt
contains the file structure as a hint. Only add the compiled *.qm
files and not the sources (*.ts
).
Create a zip file with the full structure, your added translation files, help files, the README.txt
and your translated README.txt
file. Replace the XX
in the zip file name with your language code (e.g. fr
, de_AT
or pt_BR
).
Send the file to me so I can publish it on my home page and add it to the latest release on the Github Release Page.
Feel free to publish the file on your own home page or send it to the local flight simulation sites in your home country.