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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2011, 02:43 PM   #31
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by ixtab View Post
eureka, thanks for the comment. I knew about this kind of sites as well. In fact, I've been active on babelzilla.org for some projects.
The problem is that in this particular case, it's not necessarily enough to only know the string that you must translate. Rather, it's much more helpful to also have some context around it (even if that's just comments). In the end, it seems to me that a classical source control system would do better at this task.
OK, I understand your point.

So far, I've found another site for collaboration on software localization: www.transifex.net. In case you'll change your mind, I would strongly suggest you choose this one as platform for translating efforts. It's open-source (it adds value for ones who cares about it and I'm caring), has API and command-line client, which helps to synchronize translations stored in VCS.
eureka is offline   Reply With Quote
Old 12-28-2011, 03:05 PM   #32
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
I've been too impatient so created localization project on transifex.net. I don't know whether it will go any further, but nevetheless it's created.
eureka is offline   Reply With Quote
Old 12-30-2011, 01:30 AM   #33
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
I've imported ixtab's localization file to transifex at new localization project Kindle Touch framework. I've decided that Kindle Touch project should serve as umbrella project.

So, if anyone wants to play a little with transifex, just request a creation of team for your language and give it a try.

For importing to transifex I've created a two-way converter between ixtab's localization file and Java .properties files in filesystem hierarchy. These .properties files were imported into transifex.

I've also created a Git repo on bitbucket, where Java .properties files, the tool and configuration for transifex command-line client are stored.
eureka is offline   Reply With Quote
Old 12-30-2011, 02:46 AM   #34
diba
Addict
diba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolatediba is generous with chocolate
 
Posts: 395
Karma: 33660
Join Date: Jul 2011
Device: Kindle 3, Kindle 4, Kindle PW, Nexus7 3G
Hi, I think it is too early, but I do not see any button to sent a request joining the team. Would bring in my experience in doing the German version for K3.

Any reason why there 5.0.0 for the files not 5.0.1?

Last edited by diba; 12-30-2011 at 02:48 AM.
diba is offline   Reply With Quote
Old 12-30-2011, 03:17 AM   #35
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 711
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by diba View Post
Hi, I think it is too early, but I do not see any button to sent a request joining the team. Would bring in my experience in doing the German version for K3.

Any reason why there 5.0.0 for the files not 5.0.1?
You should be registered and logged in. My bad, I didn't mentioned it.

No reason for 5.0.0 except my guess that resources were taken from 5.0.0 firmware.
eureka is offline   Reply With Quote
Old 12-30-2011, 06:21 AM   #36
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
eureka,

thanks for taking the initiative with transifex. I just signed up there, but I'm unsure of how to make sense of it.

I see that there is essentially 1 "resource" for every .properties file (every resource bundle). I also see quite a few translations for many languages already -- where do they come from?

I don't see any teams yet, or am I just looking in the wrong place? And what is the procedure for updating translations? The one that I'm currently seeing is to click on a file first, then click on a language, then change strings. Is this how it's intended to be used? Or is it rather via your command-line importer/exporter tool? (Haven't tried that yet)

BTW, I quickly took a look at the tool's source code. I'm not horribly proficient at python, but are you sure you are following the "semantics" that I "documented" at the beginning of the file? In particular, this part:
Code:
# - some properties share the same original string. In this case,        #
#   it is sufficient to define it only once. Any properties which        #
#   DO NOT provide a value (don't have a "=" inside) will take the       #
#   last value that was defined. Look a few lines down, you will         #
#   see an example with the "Done" string present in multiple files.     #
Code:
### Kindle3Locs!com.lab126.booklet.browser.resources.UIHeaderResources#progress.done.caption@de
#Erledigt
### Kindle3Locs!ebook.booklet.home.foundation.resources.CollectionsToItemResources#collectionstoitem.done.button.text@de Kindle3Locs!ebook.booklet.home.foundation.resources.ItemsToCollectionResources#itemstocollection.done.button.text@de Kindle3Locs!ebook.booklet.reader.resources.ReaderResources#gui.overlay.edit_description.done.label@de Kindle4!ebook.framework.resources.KeyboardResources#symbols.close.key.label@de
#Fertig
ebook.booklet.pdfreader.impl.resources.PDFReaderImplResources#pdfreader.pdfsearch.done=TEST
kindle.home.resources.AddToCollectionsResources#panel.donebutton.label
kindle.home.resources.ItemsToCollectionResources#panel.donebutton.label
In the above case, there would be THREE properties in 3 files all being assigned the value "TEST". Are you sure you're treating it this way?
ixtab is offline   Reply With Quote
Old 12-30-2011, 08:33 AM   #37
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Blanket localization

OK, in the mean time, a little bit more about the blanket part. It's straight message-format objects, so you can use the usual tools to translate it. (I simply used a text editor).

Here's a short summary of what I did to create this file. Don't blindly copy-paste this, but rather understand it and adjust accordingly.

Code:
scp -r root@kindle:/usr/share/locale/en/LC_MESSAGES/* .
for i in *.mo; do msgunfmt $i > `basename $i .mo`.po; done
for i in *.po; do gedit $i &; done
for i in *.po; do msgfmt $i -o `basename $i .po`.mo; done
mkdir -p de/LC_MESSAGES
cp *.mo de/LC_MESSAGES/
zip -9 -r blanket_de.zip de
scp blanket_de.zip root@kindle:/usr/share/locale/
ssh root@kindle 'cd /usr/share/locale && unzip -o blanket_de.zip && rm blanket_de.zip';
EDIT: Note that it's probably a *VERY* good idea to start with this part (i.e. making sure the /usr/share/locale/ contains a folder for your target locale) before attempting any other localization parts. As stated before, langpicker *seems* to check for the existence of that directory to determine whether a given locale is supported at all. This *may* be the reason for potentially bricking your device if setting it to an "unsupported" locale.
Attached Files
File Type: zip blanket_de.zip (2.6 KB, 65 views)

Last edited by ixtab; 12-30-2011 at 08:38 AM.
ixtab is offline   Reply With Quote
Old 12-30-2011, 09:35 AM   #38
MatzeMatz
Enthusiast
MatzeMatz began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
@ixtab: Yes, this may be really the reason for my brick.
I didn't fill up that directory for the German language.

BUT: I also didn't set the language to "German", as the menu point wasn't there - that's why I decided to restart the device - and bricked it

So I assume even if the language isn't selected but only partly available it may brick the device...
MatzeMatz is offline   Reply With Quote
Old 12-30-2011, 10:08 AM   #39
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Ok Matzematz,

I think I may have found another attack "vector", which may, or may not, help in your situation. before going any further though, please answer a few questions:

- Are you ABSOLUTELY sure that you only touched /opt/amazon/ebook/lib/locale-{base,de_DE}.jar, /var/local/java/prefs/com.amazon.ebook.framework/prefs, and /opt/amazon/ebook/config/locales/de.properties?

- Does your loading screen display a progress indicator or not?
ixtab is offline   Reply With Quote
Old 12-30-2011, 11:08 AM   #40
MatzeMatz
Enthusiast
MatzeMatz began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Quote:
Originally Posted by ixtab View Post
- Are you ABSOLUTELY sure that you only touched /opt/amazon/ebook/lib/locale-{base,de_DE}.jar, /var/local/java/prefs/com.amazon.ebook.framework/prefs, and /opt/amazon/ebook/config/locales/de.properties?
Yes, I'm sure.

Quote:
Originally Posted by ixtab View Post
- Does your loading screen display a progress indicator or not?
In normal situation (long press powerbutton reset) it only flashes the screen a few times and then the picture with kindle on top and tree on bottom (without other text) appears again and stays there.
If I put the usbnetworking bundle on /mnt/us (via USB mass storage device access) and got the "Update Error: 3" it shows me the progress (and picture with "please wait") afterwards.
Then it hangs with that picture...

So I'm excited: tell me about your (possible) attack vector?
MatzeMatz is offline   Reply With Quote
Old 12-30-2011, 11:48 AM   #41
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by MatzeMatz View Post
Yes, I'm sure.

In normal situation (long press powerbutton reset) it only flashes the screen a few times and then the picture with kindle on top and tree on bottom (without other text) appears again and stays there.
OK, then please try the attached file. (***EVERYBODY ELSE***: DON'T do this unless you're adventurous!!!!!)

Unzip and put both files in the USB root folder of your device. Then reboot. If it doesn't work after the first reboot, remove RUNME.done (if existing) and reboot again.
This is the best I can come up with, and it should undo pretty much all of the changes you have done so far. If it doesn't work after that either... well... we may just be out of luck for today.


Quote:
Originally Posted by MatzeMatz View Post
So I'm excited: tell me about your (possible) attack vector?
The complete explanation is here: http://www.mobileread.com/forums/sho...8&postcount=41
Attached Files
File Type: zip Matze.zip (837 Bytes, 65 views)
ixtab is offline   Reply With Quote
Old 12-30-2011, 12:21 PM   #42
MatzeMatz
Enthusiast
MatzeMatz began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
Talking

It works!
My device is usable again

You're my man of the day

BTW, all three RUNME files are present afterwards and empty.

Do I have to manually edit the "/var/local/system/locale" again?
Or would it be best, to keep the "test ..." line inside for possible future repair action in RUNME.sh?
MatzeMatz is offline   Reply With Quote
Old 12-30-2011, 12:53 PM   #43
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by MatzeMatz View Post
It works!
My device is usable again

You're my man of the day
Glad it worked out, and... you're welcome :-)

Now the real question is *WHY* this happened. Can you get a dump of "showlog" before it gets outdated? Hopefully, there is a clue in the logs as to what went wrong. For instance, just run "showlog > /mnt/us/broken.log" or whatever on the device. I'd really be curious about the cause of the error.

Quote:
Originally Posted by MatzeMatz View Post
BTW, all three RUNME files are present afterwards and empty.
You can delete all of them. The only one important for the functionality is the RUNME.done (If it's present, RUNME.sh will not run again; but that logic is coded inside RUNME.sh itself).

Quote:
Originally Posted by MatzeMatz View Post
Do I have to manually edit the "/var/local/system/locale" again?
Or would it be best, to keep the "test ..." line inside for possible future repair action in RUNME.sh?
I guess that's up to you. For maximum "standards-compliance" of your device, remove the additional line. You can always get this version back by "installing" data.tar.gz.

EDIT: typo. The command is "showlog", not "showlogs".

Last edited by ixtab; 12-30-2011 at 12:56 PM. Reason: Typo: showlogs -> showlog
ixtab is offline   Reply With Quote
Old 12-30-2011, 01:51 PM   #44
MatzeMatz
Enthusiast
MatzeMatz began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
I sent you a PN...

But I couldn't find any special in the log...

The only difference I see is, that the langpicker sends a finished event when working...

Not working:
Code:
111230:180854 blanket[11651]: I lipc:evts:name=moduleLoaded, origin=com.lab126.blanket, fparam=splash:Event sent
111230:180854 blanket[11651]: I loaderEventHandler:MODULE_LOAD_EVENT:module=langpicker:
111230:180854 lxinit[11637]: I def:main:got loaded module:splash
111230:180854 lxinit[11637]: I start:client:finished loading:
111230:180854 init.exe: vnc pre-start process (11663) terminated with status 1
and working
Code:
111230:180943 blanket[1152]: I loaderEventHandler:MODULE_LOAD_EVENT:module=langpicker:
111230:180943 lxinit[1074]: I def:main:got loaded module:langpicker
111230:180943 blanket[1152]: I lipc:evts:name=moduleLoaded, origin=com.lab126.blanket, fparam=langpicker:Event sent
111230:180943 init.exe: vnc pre-start process (1162) terminated with status 1
MatzeMatz is offline   Reply With Quote
Old 12-30-2011, 02:28 PM   #45
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by MatzeMatz View Post
I sent you a PN...

But I couldn't find any special in the log...

The only difference I see is, that the langpicker sends a finished event when working...

Not working:
Code:
111230:180854 blanket[11651]: I lipc:evts:name=moduleLoaded, origin=com.lab126.blanket, fparam=splash:Event sent
111230:180854 blanket[11651]: I loaderEventHandler:MODULE_LOAD_EVENT:module=langpicker:
111230:180854 lxinit[11637]: I def:main:got loaded module:splash
111230:180854 lxinit[11637]: I start:client:finished loading:
111230:180854 init.exe: vnc pre-start process (11663) terminated with status 1
and working
Code:
111230:180943 blanket[1152]: I loaderEventHandler:MODULE_LOAD_EVENT:module=langpicker:
111230:180943 lxinit[1074]: I def:main:got loaded module:langpicker
111230:180943 blanket[1152]: I lipc:evts:name=moduleLoaded, origin=com.lab126.blanket, fparam=langpicker:Event sent
111230:180943 init.exe: vnc pre-start process (1162) terminated with status 1
Yeah, so the only thing that I can suppose you did wrong is something in the creation of the /opt/amazon/ebook/config/locales/de.properties file. langpicker is extremely picky about these -- they have to look exactly what it expects them to be, or it'll screw up.

(BTW: Ironically, I just spent about an hour to unbrick my own device -- which was left in the exact same state as MatzeMatze described, only showing trees but no progress -- after trying to find out what could, and what could not be done with the RUNME.sh approach above. Turns out you can do almost everything, but not everything is a good idea to do.)
ixtab 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
K3 [K3] Physical keyboard localization Sir Alex Kindle Developer's Corner 105 07-04-2014 06:30 AM
K3 Kindle 3 localization JirkaS Kindle Developer's Corner 269 12-07-2013 12:13 AM
Kindle 4 (no touch) GUI Localization Sir Alex Kindle Developer's Corner 43 09-13-2013 07:19 AM
Keyboard localization (hack) Sir Alex Kindle Developer's Corner 72 04-16-2013 03:05 PM
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch jbcohen Which one should I buy? 4 06-18-2011 07:58 PM


All times are GMT -4. The time now is 03:57 PM.


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