View Single Post
Old 06-15-2015, 12:12 PM   #1
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Adding new interface languages

The whole thing is still a little experimental. I describe the work flow:
  1. extract a qm file from nickel
  2. create a ts file based on the qm file with Qt Linguist (boriar, thank you for this information)
  3. replace the translations in the ts file by the new translations
  4. run lrelease against the new ts file in order to create a qm file (or do it from Qt linguist: files > release.)
  5. rename the new qm file after the language you intend to replace, e.g. trans_it.qm. Edit: It is also possible to introduce new languages, cf. this post
  6. copy the new qm file to usr/local/Kobo/translations

Be aware that the language you replace defines how date and time are formatted, and may have further effects.

I should also mention that after loading nickel only three system fonts are available. And none of them might include the characters needed for your language. In such cases, the required font will be available to the interface only after you open a book (and maybe open the font menu).

For now, I have done steps 1 and 2. The resulting ts files are in the uploaded archive. The archive contains two ts files one with English translations, and one with Japanese translations. Use the English ts file for languages that distinguish grammatically between singular and plural, and Japanese for languages that do not. (Correction: Take any of the two files, and select the target language via the menu in Qt linguist. This will provide the correct slots for singular, dual, plural, or what ever is appropriate for the language.) Please use utf-8 encoding.

If you like I can do points 4 and 5 for you if you upload your ts files.

The current ts files concern FW 3.16.0 (Edit: I am adding newer versions). Future firmwares might require updating these files.

If you upload your ts files, I will list them in post #2 with links, and will provide updates if required by new firmwares (you still will have to provide the translations).

Uninstall: Extract KoboRoot.tgz from uninstall_qms.zip, copy it to .kobo, and restart the reader. This will delete all trans_*.qm files in usr/local/Kobo/translations.

New: Pipcat provides Python Tools for Kobo Translation, which can help you preparing the necessary files.
Attached Files
File Type: zip kobo_ts_3160.zip (227.9 KB, 793 views)
File Type: zip uninstall_qms.zip (464 Bytes, 1013 views)
File Type: zip translate_gui_ts_3173.zip (73.6 KB, 868 views)
File Type: zip translate_gui_ts_3180.zip (73.9 KB, 748 views)
File Type: zip translate_gui_ts_3.19.5613.zip (74.3 KB, 1401 views)

Last edited by tshering; 05-01-2016 at 03:26 PM.
tshering is offline   Reply With Quote