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 04-05-2015, 04:08 PM   #1
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Interface language

I wont to translate GUI interface to Russian language.
Anybody know where is stored text strings? which file?
AxaRu is offline   Reply With Quote
Old 04-06-2015, 04:49 PM   #2
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,428
Karma: 2896499
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by AxaRu View Post
I wont to translate GUI interface to Russian language.
Anybody know where is stored text strings? which file?
The (most?) text strings are stored in usr/local/Kobo/nickel. This file contains among other things several zlib-compressed blocks. Nine of these blocks contain the text strings of the supported languages.
tshering is offline   Reply With Quote
Advert
Old 04-07-2015, 03:47 AM   #3
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Quote:
Originally Posted by tshering View Post
Nine of these blocks contain the text strings of the supported languages.
Thank you for the reply
Maybe you know the address in the nickel?
AxaRu is offline   Reply With Quote
Old 04-07-2015, 04:55 AM   #4
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,428
Karma: 2896499
Join Date: Jun 2012
Device: kobo touch
The starting addresses in FW 3.13.1 are as follows. For language identification I add one example string for each language. (I chose it randomly.)

2D1C8B (Notitie opgeslagen)
2F62F9 ( コメントを保存しました)
3B37CC (Notiz erfolgreich gespeichert)
3D9BE1 (Nota guardada corretamente)
3FDE8C (Note enregistrée)
31D644 (Note saved successfully)
38E2CC(Nota salvata con successo)
345B39 (Observação salva com sucesso)
369E5C (Nota guardada correctamente)

The language string is in 2 byte annotation, e.g. space = \x00\x20. It is followed by the reference string in English in simple ASCII (EDIT: utf8).

If you need help with finding and uncompressing zlib streams, there is a python script by PeterT somewhere in this forum (maybe you can find it). You cannot use the script as it is, but it might get you started.

Edit: Here is the link to the post containing the python script. For a general description see here.

Last edited by tshering; 04-13-2015 at 10:42 AM.
tshering is offline   Reply With Quote
Old 04-07-2015, 06:34 AM   #5
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
This addresses for Kobo Glo?

Thanks a lot.

Last edited by AxaRu; 04-07-2015 at 06:37 AM.
AxaRu is offline   Reply With Quote
Advert
Old 04-07-2015, 08:46 AM   #6
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
This first approx of python code

Spoiler:
Code:
#!/usr/bin/python2

__author__ = 'axa'

import zlib

ZLIB_MARKERS = ['\x78\x9c']
filename = 'nickel-glo'

infile = open(filename, 'r')
data = infile.read()
end = len(data)

pos = 0
found = False

while pos < end:
    window = data[pos:pos+2]
    for marker in ZLIB_MARKERS:
        if window == marker:
            start = pos
            rest_of_data = data[start:]
            decomp_obj = zlib.decompressobj()
            uncompressed_msg = decomp_obj.decompress(rest_of_data)
            print "===== Message start %0x\n%s" % (pos, uncompressed_msg)

    pos += 1


There is a bug, but the result is very interesting.

http://pastebin.ru/sgat12V0

Last edited by AxaRu; 04-07-2015 at 10:19 PM.
AxaRu is offline   Reply With Quote
Old 04-07-2015, 09:16 AM   #7
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,218
Karma: 26150342
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by AxaRu View Post
This addresses for Kobo Glo?
The firmware is almost identical between the different devices. The differences are some of the fonts and images.
davidfor is offline   Reply With Quote
Old 04-07-2015, 10:43 AM   #8
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Yes, thanks
AxaRu is offline   Reply With Quote
Old 04-07-2015, 10:50 AM   #9
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,428
Karma: 2896499
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by AxaRu View Post
This first approx of python code
.....

There is a bug, but the result is very interesting.

http://pastebin.ru/sgat12V0
Since I do not speak python, I cannot help you with the code. Just for information: You are decompressing successfully the first 4 of 19 zlib streams. Streams 11 to 19 contain the language strings.
tshering is offline   Reply With Quote
Old 04-07-2015, 03:04 PM   #10
surquizu
Evangelist
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 408
Karma: 902071
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
AxaRu,

I do not understand anything (I am not computer programmer), but I'm very interested in how to translate the interface. I want my aura H2O in catalan

I will be grateful if reports its progress and if you get it, help to me.

thanks
surquizu is offline   Reply With Quote
Old 04-07-2015, 03:17 PM   #11
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Simply change strings from one language to another, then zipping block an replace in nickel.
AxaRu is offline   Reply With Quote
Old 04-07-2015, 03:54 PM   #12
surquizu
Evangelist
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 408
Karma: 902071
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
Quote:
Originally Posted by AxaRu View Post
Simply change strings from one language to another, then zipping block an replace in nickel.
You could send me the text strings and then zipping block an replace in nickel my translate?

or explain step by step how to do it in a very, very clear and simple way?
surquizu is offline   Reply With Quote
Old 04-07-2015, 05:02 PM   #13
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Sure, but I'm still just at the beginning
AxaRu is offline   Reply With Quote
Old 04-08-2015, 12:36 AM   #14
surquizu
Evangelist
surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.surquizu ought to be getting tired of karma fortunes by now.
 
surquizu's Avatar
 
Posts: 408
Karma: 902071
Join Date: Jun 2008
Location: Zaragoza (Spain)
Device: prs-505, kobo auraHD, kobo auraH2O, kobo Glo HD, kobo aura ONE
Quote:
Originally Posted by AxaRu View Post
Sure, but I'm still just at the beginning
Ok. Thanks
surquizu is offline   Reply With Quote
Old 04-08-2015, 06:13 AM   #15
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 12
Karma: 624
Join Date: May 2013
Device: Kobo Glo, Kobo Aura H2o, Kobo Aura One
Second approach
Spoiler:
Code:
#!/usr/bin/python2
# -- coding: utf-8 --

__author__ = 'axa'

import zlib

ZLIB_MARKERS = ['\x78\x9c']

def zipstreams(filename) :
    with open(filename, 'rb') as fh:
        data = fh.read()

    pos = 0

    while pos < len(data) :
        window = data[pos:pos+2]
        for marker in ZLIB_MARKERS:
            if window == marker:
                try:
                    zo = zlib.decompress(data[pos:])
                    if zo[0:4] not in ['\x89PNG', '\x8aMNG']:
                        print '{:x} : {:s}'.format(pos, repr(zo)[0:1000])
                except zlib.error:
                    pos = pos
        pos += 1
        if pos == len(data):
            break

zipstreams('nickel-glo')

Spoiler:

And out

Code:
3cabc : "'Adan, Yemen\tAsia/Aden\n'Ar'ar, Saudi Arabia\tAsia/Riyadh\n'Ataq, Yemen\tAsia/Aden
44a28 : '* { margin: 0px; padding: 0px; }\n\n/* --- */\n\nbody\n{\n    text-align: center;\n
49e9e : '* {\n\tbackground-color: white;\n}\n\nQCheckBox {\n\tspacing: 12px;\n\tpadding-left
4a796 : 'const SHOW_DEBUG_ALERTS = false;\n\n// for testing if we\'ve evaluated this file ye
2d0661 : 'html {\n\tfont-family: serif;\n\tfont-size: 20px;\n}\n\nhtml[deviceCodeName="phoen
2d1a9b : 'QSlider {\n\tbackground-color:none;\n}\n\nQSlider::handle:horizontal[qApp_deviceIs
2d1c8b : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00\x
2f62f9 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\xc8\x00\x00\x00.
31d644 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\xb8\x00\x00\x00.
345b39 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
369e5c : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
38e2cc : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00
3b37cc : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@ \x00\x00\x00.\x00
3d9be1 : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x18\x00\x00\x00.
3fde8c : '<\xb8d\x18\xca\xef\x9c\x95\xcd!\x1c\xbf`\xa1\xbd\xddB\x00\x00@\x10\x00\x00\x00.

Last edited by AxaRu; 04-08-2015 at 06:17 AM.
AxaRu 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
PRS-T3 Update firmware,to change interface LANGUAGE sbwtxj Sony Reader 51 05-26-2015 04:56 PM
Hanvon C18: how do you set the interface language? Heba More E-Book Readers 1 05-18-2014 05:26 AM
User Interface Language - Preference item missing! jjenkov Sigil 5 07-06-2012 07:27 AM
Interface language Obywatelpw Calibre 7 05-20-2012 08:48 AM
MR interface language changed kovidgoyal Feedback 7 10-07-2011 10:39 PM


All times are GMT -4. The time now is 05:23 PM.


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