View Single Post
Old 05-01-2016, 03:35 PM   #82
pipcat
Connoisseur
pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.pipcat ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
Tshering, many thanks for all the information you share!
I've made some python scripts to help surquizu with catalan translation and a step by step guide, but it could be used for other languages.

Python Tools for Kobo Translation

bin2qm.py => Extracts .qm streams from nickel binaries.
qm2ts.py => Converts a .qm file to a .ts file.
ts2ts.py => Matching between two .ts files to update changes.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Step by step instructions to translate Kobo interface:

0- You need Python installed and Qt Linguist http://doc.qt.io/

1- Download latest Kobo Firmware (or older if you need)
https://www.mobileread.com/forums/sho...d.php?t=185660

2- Extract nickel file from Kobo firmware to your Python Tools folder
nickel is found at: kobo-update-(version).zip/KoboRoot/usr/local/Kobo/nickel

3- Execute python bin2qm.py to create all .qm files (one for each language)

4- Edit qm2ts.py and write the name of the .qm file you want to convert to .ts file (bottom of code).

5- Execute python qm2ts.py to create the .ts file

6- Edit .ts file manually (it's xml) or with Qt Linguist software.

7- On Qt Linguist release to create .qm file from your modified .ts file.

8- Rename to trans_xx.qm where xx is your two char language code.

9- Pack it in a KoboRoot.tgz at /usr/local/Kobo/translations/ and install as other hacks.


If we already have a translation and we want to update it to the latest firmware, we could use ts2ts.py
- After creating .ts file on step 5,
- edit ts2ts.py script and fill 'last_ts_nickel' and 'last_ts_translation' (top of code)
- Execute ts2ts.py to create translated-xxx.ts
- Continue to step 6 with translated-xxx.ts
Attached Files
File Type: zip kobotoolstranslation.zip (3.8 KB, 262 views)
pipcat is offline   Reply With Quote