Quick guide to translation
  1. Download and install Qt Linguist
    • for windows
    • or with "apt-get install qt4-linguist-tools" on linux
  2. Open gpg4usb translation file from the gpg4usb folder in your preferred language, e.g. ts/gpg4usb_en.ts
  3. Choose "SettingsDialog" from the left Panel and insert your languages name as translation for the "English" String. (example)
  4. Do a "File->SaveAs" and save a new file e.g. ts/gpg4usb_??.ts (where ?? should be your locale, as defined by ISO 639-1)
  5. try translating another string, e.g. "&Open" from GpgWin.cpp
  6. hit File->Release
  7. start gpg4usb and look into "Edit->Settingsdialog", your language should now be selectable.

Now go wild translating and send us the ts-file. We will include it in our next release. We will contact you to update translations when new ones are needed. You will also experience how nice linguist behaves to only ask you for the changed strings to be translated. We are looking forward to working together on delivering gpg4usb in your language.

Especially useful for your translation work are the buttons translation toolbar from the toolbar. With the left you jump to the next untranslated phrase, the right one marks a phrase as translated.

Some further reading on how to use linguist as translator is available at http://doc.qt.nokia.com/latest/linguist-translators.html.

To integrate a new language into gpg4usb, one of the developers has to do one simple step and then the translater can begin his work. For the translator, the most simple way is to use the Qt-Linguist. The developer has to install lupdate and lrelease. In Linux these are contained in the qt4-dev package. Some detailed documentation on the linguist is available here.

 

STEP 1: Change the project-file

At first a developer has to add a line for the language in the gpg4usb.pro file in the TRANSLATIONS section looking like

release/ts/gpg4usb_<language>.ts \

where <language> has to be replaced by the characters, which can be taken from this list.

STEP 2: Run lupdate

Then the developer has to run lupdate, so that the appropriate ts-file is created in the release/ts directory:

lupdate gpg4usb.pro

The ts file is a xml-file, which contains the original phrases, the translated phrases (when it's done), the status of translation, comments to the translation and some other information.

STEP 3: Translate the file

Now the ts-file can be opened with the linguist. In the programm, you just have to enter the translation of the phrases into the translation field and hit [Ctrl]+[Enter] to set the translation status of the phrase to ok and jump to the next unfinished translation. The status of the translation and comments also are automatically saved in the ts-file, so that the translation are easier to maintain.

translation text field

Three things have to be taken care of.

STEP 4: Release the translation file

After translating all the phrases, you have to choose File , Release in the linguist's menu. With this an appropriate qm-file (quite like a binary language file) is generated.

STEP 5: Run the programm

Now you can run gpg4usb with the new language by choosing the language in the settings menu.

Howto Translate new phrases

When the project envolves, it's possible, that new expressions have to be translated. In this case the developer has to run lupdate once more. The translater just has to open the new ts-file with the linguist. On the upper left, he sees in the context menu, in which section are new phrases to translate (everything, which hasn't a green haken in front).

context field

Again the translator has to hit [Ctrl]+[Enter] so that the linguist jumps to the unfinished translation. Afterwards the translator has to release the file another time.

 
Documentation