QHiMDTransfer, the GUI application used to transfer files from/to the HiMD devices, has originally an English interface. However, since we're planning to get the software packaged for Linux distributions like Ubuntu or Fedora, we should provide translated version of the interface for the various languages provided by the distributions. Of course, the Windows and MacOS versions will also profit from the translations. Whenever a user starts QHiMDTransfer on his/her non-English operating system and there is a translation of QHiMDTransfer for that specific language available, it will automatically switch the interface language to match the one of the operating system.
The actual process of translation is performed with a special software "Qt Linguist" by Qt Software. The translator will only need to download and install the software, fetch a template file which contains the English words and phrases of the user interface from this website and edit the template file in the software. Qt Linguist displays each English phrase or word which needs to be translated and in order to translate, the translator simply needs to type the translation of the English original. Once everything has been translated, the translator saves the file and sends it back to use. After checking for proper syntax, the translation is integrated into the main software and immediately available to all users. So everybody is encouraged to help! Your efforts will be credited and you will be contributor to a great open source project :).
Please send your finished translation to the linux-minidisc mailing list: email@example.com
NOTE: Please make sure that you save your finished translation as a .ts file, otherwise we cannot integrate your translation into QHiMDTransfer.
The necessary software for translation is called "Qt Linguist 4". For Windows and MacOS X, it can be downloaded here:
Linux (and *BSD users) install it with the package manager of their distribution. Usually, installing the latest version of the Qt4 SDK together with Qt Creator will install the necessary files and "Qt Linguist 4" will show up in the program menu.
A detailed manual for the software can be found at: http://doc.trolltech.com/4.5/linguist-manual.html
Run "Qt Linguist 4" from your applications menu. Upon startup, you will be prompted with the following screen:
Upon opening a new template file, Qt Linguist will prompt you with the following dialog. Please leave the settings for "Source language" unchanged and simply adjust the settings for "Target language". Set your language and country there (language and country should match ;)):
After applying the correct settings for your language, your screen should look like this except for the fact that the translations for your language are not yet defined, that's your job:
To start translation, just type the translation of the source word or phrase for all items in the lists. Note, that you have to follow some minor rules for the syntax of your translations. These include so-called "accelerators" (also known as keyboard shortcuts), place holders for strings (e.g. %1) and text formatting in the style of HTML. These are explained in the following three paragraphs:
Accelerators refer to the keyboard shortcuts you invoke with the "Alt"-key together with any alphabetical key on your keyboard. If you look at the menu of your current browser window, for example, you'll recognize that the "F" of the menu "File" got underlined, i.e. it looks like this: "File". This means, by holding down "Alt" and pressing "f" at the same time, you can invoke the file menu in your browser.
Now, qhimdtransfer has the same style menus and when you start translating those menus into your language, you'll have to take care of these shortcuts as well. Due to it's nature, an accelerator cannot be transfered as is into another language. When translating "File" into the German "Datei", there is no "F" which is supposed to be the accelerator. Thus, a new letter has to be chosen. To define an accelerator, just precede the letter that is supposed to be the accelerator with an ampersand, thus:
The accelerator can precede any letter in a word, it doesn't have to be the first one.
Accelerators have to be unique, Qt Linguist will prompt you for any duplicate assigned accelerators. Please check the warnings at the bottom all the time.
One note on East Asian languages (or any other language with non-latin alphabets): Since most people in asia use standard alphanumeric keyboards but the menus still appear in their specific language, accelerators have to be defined through an extra character. Naturally, mose people just use the accelarators from the English version. Thus, if you translate "&File" from English to Japanese, it will become ファイル (F).
This means in code:
Place holders are used to reserve parts of a text for information that is inserted on runtime by the program code. That is, while the program is actually running. This is necessary to provide the user with dynamically generated information, like how many tracks were deleted or on how many tracks errors were detected.
A very simple example is:
which is used to caption a track in the user interface. "%1" here is the place holder which is replaced by a numeric on runtime.
For translations, it is important that all place holders are also present in the translated text.
Thus, the above one translates to in Norwegian:
It doesn't matter, at what position in the translated sentence, the place holder is shown but only the fact that it actually exists. The position solely depends on your translation. So, in German, it might also be something like:
%1 er Track
Some of the interface text might be formatted with HTML. HTML formatting is useful to display certain text with larger fonts, bold or italic and so on. For example, the text in the about dialog looks like this:
<h3>QHiMDTransfer, Version 0.0.1</h3> <p><p> <p>A free music transfer software for MiniDisc walkman.</p> <p><p> <p>Brought to you by the linux-minidisc project:</p> <p><p> <p>https://wiki.physik.fu-berlin.de/linux-minidisc</p> <p><p> <p>This software is covered by the GNU GPL v2 license. See the file LICENSE in the program folder for more information.</p>
For translation of such formatted texts, the best practice is just to copy the whole formatted text (including the HTML tags) and just edit and translate the normal, user-visible text. Changing the formatting should not be necessary in most cases. Thus, for example, the German translation looks very similar:
<h3>QHiMDTransfer, Version 0.0.1</h3> <p><p> <p>Eine freie Transfersoftware für MiniDisc Walkman.</p> <p><p> <p>Diese Software entstand im linux-minidisc Projekt:</p> <p><p> <p>https://wiki.physik.fu-berlin.de/linux-minidisc</p> <p><p> <p>Diese Software unterliegt der GNU GPL v2 Lizenz. Lesen sie die Datei LICENSE im Programmverzeichnis für mehr Infos.</p>
All currently existing translations can be found on our FTP server at: http://users.physik.fu-berlin.de/~glaubitz/linux-minidisc/translations/. This directory also contains a generic template file called "00-qhimdtransfer_template.ts" for new language files.