Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-02-2015, 09:27 AM   #61
wikiped
Member
wikiped began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Feb 2013
Device: Kobo Aura HD, Kobo Glo
First of all thank you very much for adding new functionality to your update script - being able to apply different setting on different devices / users is very much appreciated.

It is also great to be able to add custom translations and I am sure this will find its use as the message will spread around. However there seems to be a hurdle with keeping translations up-to-date. All the steps outlined in the first post assume that you start from scratch. But having done that with one FW version there seems to be no easy way to update existing translations to the new FW or am I missing something?

You mentioned:
Quote:
Originally Posted by tshering View Post
2. way (I prefer this one)
  • write a fake script that contains all elements of nickel that contain a translation function
  • feed the script and the old ts file to Qt's lupdate and let it create the new ts file
Is this the easiest way to update translations? Would you be able to share the script you mention in 1st bullet point?

I have tried to find a way to do that with QT Linguist, but unsuccessfully.
wikiped is offline   Reply With Quote
Old 10-02-2015, 09:53 AM   #62
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by wikiped View Post
Is this the easiest way to update translations?
It was the easiest way I could find, without having access to the original code of nickel.
Quote:
Originally Posted by wikiped View Post
Would you be able to share the script you mention in 1st bullet point?
Maybe I should rather have said "fake code". Sure, I can share it. The problem is, that one has to write it for each FW anew. (I am too busy/lazy now to create the tools for doing this in a way that they are shareable. It is easier for me to update ts files people post here myself.)
Attached Files
File Type: zip main_cpp_3180_.zip (61.1 KB, 173 views)
tshering is offline   Reply With Quote
Advert
Old 10-08-2015, 05:33 PM   #63
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I have one question. I've seen the thread you refer when people ask about qm file. I have the python script running, selected the translations with the bytes you have said there but... I got I nice text file. How do I convert that text file, with some binary string, in a qm file? Or what do I have to write from the script?
Terisa de morgan is offline   Reply With Quote
Old 10-09-2015, 05:07 AM   #64
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Terisa de morgan View Post
I have one question. I've seen the thread you refer when people ask about qm file. I have the python script running, selected the translations with the bytes you have said there but... I got I nice text file. How do I convert that text file, with some binary string, in a qm file? Or what do I have to write from the script?
I am not sure if I understand you correctly. Do you use the/a python script that is posted in that thread? Or did you improve on it? (If I remember correctly the script posted there does not what it should.) Anyway, I assume you have a python script that can extract all zlib streams from nickel. Ten of those streams are the compressed qm files of the ten supported languages. (Edit: Actually it is eleven files and languages, I forgot to count English) Therefore, I guess your nice text file with some binary strings is already a qm file.

Last edited by tshering; 10-09-2015 at 11:51 AM.
tshering is offline   Reply With Quote
Old 10-09-2015, 05:34 AM   #65
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Sorry about my bad English -my bad explanations happen at any language :O-

I've gotten that script and modified it in the following ways:
  • Extract only the strings which begin with the bytes you mentioned there
  • Write it as a binary file

If I understand you correctly, I'll will have to write a qm file for each string which fits the pattern. Well, that's easy as I already have the binary file written.

Thank you very much
Terisa de morgan is offline   Reply With Quote
Advert
Old 10-09-2015, 11:42 AM   #66
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
Terisa de morgan,
this is correct. For instance, in nickel of FW 3.18.0, if you decompress the zlib stream that starts at 2F05E0, and write it to disk, you get a file with the size of 700.050 Bytes. This is the qm file with the English "translation".
tshering is offline   Reply With Quote
Old 10-09-2015, 01:10 PM   #67
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Well, I'll try it as I think there's something I'm losing because my strings are very much shorter.
Terisa de morgan is offline   Reply With Quote
Old 10-09-2015, 01:24 PM   #68
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
Maybe it has something to do with 00-bytes?
tshering is offline   Reply With Quote
Old 10-09-2015, 01:28 PM   #69
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Or extracting only 1000 bytes (as the original script) instead of the real length of the string, perhaps. If it's the 00-bytes, I don't know if they're really necessary.
Terisa de morgan is offline   Reply With Quote
Old 10-09-2015, 01:32 PM   #70
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, when I'm awake I think better, I already have the nine qm. Thank you very much (nine at 3.11, which is the FW I've tested, now to guess which language is everyone).

Last edited by Terisa de morgan; 10-09-2015 at 01:36 PM.
Terisa de morgan is offline   Reply With Quote
Old 10-09-2015, 01:35 PM   #71
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
They certainly are! You can try to produce a qm file with Qt linguist to see how a qm file looks like.
tshering is offline   Reply With Quote
Old 10-09-2015, 01:42 PM   #72
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you, I downloaded one I found attached at the thread and that gave the hint to write a binary file
Terisa de morgan is offline   Reply With Quote
Old 10-09-2015, 03:02 PM   #73
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,410
Karma: 2895381
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Terisa de morgan View Post
Thank you, when I'm awake I think better, I already have the nine qm. Thank you very much (nine at 3.11, which is the FW I've tested, now to guess which language is everyone).
Sorry, I did not see this post earlier.

To save you some time:
36BA14: trans_en.qm
390EDE: trans_pt2.qm
3B6F20: trans_es.qm
3DD25B: trans_it.qm
404158: trans_de.qm
42C4DC: trans_pt.qm
4526EF: trans_fr.qm
47A8D7: trans_nl.qm
4A0BFE: trans_ja.qm

I do not know a way how to establish the language apart from looking at the translation strings.
tshering is offline   Reply With Quote
Old 10-09-2015, 03:31 PM   #74
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 5,120
Karma: 5678910
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
No problem, thank you, really, you've helped me a lot. I installed the Qt Linguist and I've done the same I supposed that there was no other way.
Terisa de morgan is offline   Reply With Quote
Old 12-14-2015, 02:59 PM   #75
The_Immortal
Enthusiast
The_Immortal began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Jan 2011
Device: Kobo GLO HD, KOBO AURA ONE
Hello guys!

Is there a way to make a translation for 3.19.* firmware?

Thank you!
The_Immortal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
different languages vdem Introduce Yourself 5 12-04-2011 03:39 PM
Languages That Can Be Used Nathan Campos Kindle Developer's Corner 3 11-09-2010 05:51 PM
Languages other than English ThePage Feedback 22 03-14-2009 12:56 AM
Other languages? Japanese? Aku Sony Reader 9 01-13-2009 08:16 AM
Other languages? irishjew Sony Reader 2 07-17-2007 04:30 PM


All times are GMT -4. The time now is 12:15 AM.


MobileRead.com is a privately owned, operated and funded community.