![]() |
#256 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
I have a problem report from user of Russian localization.
He has the same problem as I had (white home applet, only uppermost bar in place). What's strange is that he used the version that works on my device and several more people already installed it and it worked on their devices, too. He extracted the logs (could be found here: http://narod.ru/disk/39647826001/log.rar.html) Here's what I found suspicious in those: Code:
111001:000320 appmgrd[840]: I appmgr_history:NEW_APP:lipcId=com.lab126.booklet.home: 111001:000320 appmgrd[840]: E lipc:dbuserr:name=org.freedesktop.DBus.Error.ServiceUnknown:Receive Dbus error message (DBUS_MESSAGE_TYPE_ERROR): The name com.lab126.booklet was not provided by any .service files 111001:000320 appmgrd[840]: E appmgr_lipc:lipc_set_prop_fail:lipc_status=3,app=com.lab126.booklet,property=run,uri=com.lab126.booklet.home:send app command 111001:000320 appmgrd[840]: E appmgr_history:lipc_set_prop_fail:status=3,executable_lipc=com.lab126.booklet,app_uri=app://com.lab126.booklet.home/?context=0: 111001:000322 powerd[838]: I def:homebutton::Home button pressed 111001:000324 appmgrd[840]: I appmgr_history:FOUND_APP:lipcId=com.lab126.booklet.home: 111001:000324 appmgrd[840]: E lipc:dbuserr:name=org.freedesktop.DBus.Error.ServiceUnknown:Receive Dbus error message (DBUS_MESSAGE_TYPE_ERROR): The name com.lab126.booklet.home was not provided by any .service files 111001:000324 appmgrd[840]: E appmgr_lipc:lipc_set_prop_fail:lipc_status=3,app=com.lab126.booklet.home,property=go,uri=0:app://com.lab126.booklet.home/?context=0:send app command 111001:000324 appmgrd[840]: W appmgr_history:application_state_error:lipc_id=com.lab126.booklet.home,expected=PAUSED,actual=UNKNOWN:Application not in expected state, re-loading 111001:000324 appmgrd[840]: E lipc:dbuserr:name=org.freedesktop.DBus.Error.ServiceUnknown:Receive Dbus error message (DBUS_MESSAGE_TYPE_ERROR): The name com.lab126.booklet was not provided by any .service files ixtab, anyone, any ideas? |
![]() |
![]() |
![]() |
#257 | |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Code:
grep 'ota_monitor:addUpdate:updatefile\|update:begin\|update:success\|cvm[[[:digit:]]\+]: E.*Exception' all_system_logs_as_of_Sat_Oct_1_23.06.17_GMT-01.27_2011.txt Spoiler:
Conclusions:
Last edited by eureka; 02-05-2012 at 05:53 AM. Reason: rewording of conclusion about log dumping moment |
|
![]() |
![]() |
![]() |
#258 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
I'm currently working on localizing JS ru_RU stuff, and I've included it into my "checkit.py" tool to allow combine/expand for easier editing.
While reading & translating the resulting file I found something that should really be blacklisted - there're many CSS styles (or part of styles) out there! I don't think it would benefit the end user if a translator (say, not knowing HTML/CSS at all) translates things like "{width}px" to {width}something". I can include this to checkit.py report/blacklist actions (currently only combine/expand actions are aware of JS files). |
![]() |
![]() |
![]() |
#259 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
eureka,
Your fix to js compilation of media player isn't complete ![]() See screenshot. However it might be not your fault, but Amazon's... I cannot find where this MessageFormat stuff is defined, so it might even be built-in which would be bad... ![]() And could anyone tell me where this "Off" button resides? I think I saw it as a picture, so could be hard to translate, but feel free to prove me wrong. BTW, I have an issue with USB plug screen containing no text at all, and the same issue reported by other users of ru_RU locale. Any ideas? UPD A bit of searching lead me to conclusion that they might be using MessageFormat class from icu4.jar:com.ibm.icu.text. If that class has a bug translating UTF-8 text to displayed text then translation of this element in non-latin encoding might be doomed... unless we patch this class ![]() Last edited by JustAMan; 02-05-2012 at 06:08 PM. Reason: update |
![]() |
![]() |
![]() |
#260 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jan 2012
Device: kindle touch
|
hello,
i applied the localisation hack, but now my keyboard is gone ... when i try to to access a page with go to page number i didn't have a pad but noting and i cannot type a umber. is there a original keyboard available ? even if i desinstall all i didn't have this keyboard bak. regards. |
![]() |
![]() |
![]() |
#261 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
What firmware version do your device have? SO/no SO? What files did you install (for what language)?
We don't have telepathic skills, you know... I'm currently working on developing them, but progress is so slow... ![]() |
![]() |
![]() |
![]() |
#262 | |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Quote:
No messages at blanket part (USB plug screen etc.) possibly means lack of ru_RU locale definition. Sorry, can't say for sure, KT is far away from me. And any Java class isn't caused that garbled string. (Pillow HTML/JS rendering is handled by Webkit engine, not by JVM). It's most probably (as I've said) bug in js_resources tool, when it outputs string in wrong encoding (i.e. not UTF-8). BTW, I've commited some sanitizing of HTML in JS resources. Now it escapes all tags except <br>, <p>, <a> and strips all attributes from any of these whitelisted tag. It is based on html5lib sanitizer and customized with adding of sanitized prefix to escaped tag and with custom handling of named HTML entities in text (so occured in resources isn't replaced by Unicode character). html5lib includes (and uses) full-featured HTML parser, so it should be safer than regexp-based approach or any other simple parser (like Python's bundled SGMLParser or HTMLParser). Example: source: test<script type="text/javascript">alert('pwned!');</script><br><p>simple paragarph</p><p title="p_title" prop='wtf'>paragraph with attribute<a href="javascript:alert('pwned too!')">click me!</a></p><b>bold text</b> result: test<sanitizedscript type="text/javascript">alert('pwned!');</sanitizedscript><br><p>simple paragarph</p><p>paragraph with attribute<a>click me!</a></p><sanitizedb>bold text</sanitizedb> But still, it is dangerous to include JS resources in automated build of localization bundles. There are some URLs in them (like default bookmarks in browser or search URLs in browser) which also could be misused... I have to blacklist all URLs from JS resources. |
|
![]() |
![]() |
![]() |
#263 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
I think we may safely blacklist ALL bookmarks - they aren't appearing on the Kindle anyway
![]() As for media player... I think you're wrong. My media_player_bar_string.js is in UTF-8, and constructor gets its arguments in UTF-8. This "MessageFormat" thing isn't handled by Webkit I suppose, seems like it's handled by that icu4.jar file I pointed at above. However I'll try your new tool this night and we'll see if it helps with media player or not. |
![]() |
![]() |
![]() |
#264 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch
|
Hi, I worked on the italian translation...
I have a problem, once I switched to italian on the Kindle I can't access the View Notes & Marks pages of a book from Menu... Sometimes I see "View..." and if I select it, it shows me a selection window where I can choose All Notes & Marks, Your Notes & Marks and so on (like if I'm already in pages whit all the notes listed); sometimes I see View Notes & Marks (the menu item that should bring me to those pages)... Of course, I see these words translated, but it seems it can't bring me to the correct page... My Kindle is running 5.0.3 firmware and of course is already JB. Any idea? Sorry for my bad english... Thank you. |
![]() |
![]() |
![]() |
#265 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Try typing ";dm" into search bar and looking for logs into Kindle's document directory. That might give you some insight for what you translated wrong (like over-translated something).
You could also run my report tool (from git repository) and check Italian report. |
![]() |
![]() |
![]() |
#266 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch
|
Quote:
About the tool, I didn't downloaded the whole repository, just helped on Transifex repository the italian translation... I would like to be more helpful but in this case you should guide me... sorry I'm a newbie... |
|
![]() |
![]() |
![]() |
#267 |
Member
![]() Posts: 22
Karma: 10
Join Date: Jan 2012
Device: kindle touch
|
sorry .. for not saying that ...
it's kindle touch with adds 5.03 with launcher and rotate. nothing else. TIA regards, |
![]() |
![]() |
![]() |
#268 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Alright folks, I'm back. Sorry for having been quiet for so long, I was offline for some time because of something personal.
Anyway, I'm trying to catch up on the discussion. @JustAMan: Bookmarks are displayed in the browser, at least for me. I actually think that it's a good idea to keep some, but to localize others (for example, I replaced google.com by google.de in the german translation, and bbc.co.uk by spiegel.de) @eureka: After the latest git pull, the js tool doesn't work for me anymore: Code:
$ python tool/js_resources/ compile -s ../kindle-touch-l10n-tx-full/src/5.0.3/waf/ -d /tmp/loc-js/ Traceback (most recent call last): File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.6/runpy.py", line 34, in _run_code exec code in run_globals File "/home/cl/kindle-touch/localization/kindle-touch-l10n/tool/js_resources/__main__.py", line 132, in <module> args.cmd.execute(args) File "tool/js_resources/lib/cli_commands.py", line 185, in execute ensure_ascii=False, cls=ResourcesJsonEncoder) File "/usr/lib/python2.6/json/__init__.py", line 181, in dump fp.write(chunk) File "/usr/lib/python2.6/codecs.py", line 686, in write return self.writer.write(data) File "/usr/lib/python2.6/codecs.py", line 351, in write data, consumed = self.encode(object, self.errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128) $ python --version Python 2.6.5 @all: Daily snapshots have been broken for a few days. I'm currently working on fixing this, so new snapshots should appear again starting tomorrow. They might include waf/pillow, or they might not... Depends on whether I get the integration to work. |
![]() |
![]() |
![]() |
#269 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Some more...
@JustAMan: The "Off" button in TTS is indeed a .png. This is straight from com.amazon.ebook.booklet.reader.plugin.tts.resourc es.TTSResources: Code:
}, new Object[] { "tts.volume.play.img", "resources/play.png" }, new Object[] { "tts.volume.pause.img", "resources/pause.png" }, new Object[] { "tts.volume.quieter.img", "resources/quieter.png" }, new Object[] { "tts.volume.louder.img", "resources/louder.png" }, new Object[] { "tts.volume.off.img", "resources/off.png" }, new Object[] { "tts.alert.dialog.title", "Text-to-Speech Alert"
Option 2) would require special handling. That's ok I guess, we do a lot of special cases anyway already. The question is who designs it, and what it should look like. The only thing that I can personally think of at the moment is something like a shutdown button, but I'm not sure that this is intuitive enough. Concerning the "foolproofness" of translations, I don't like the idea of escaping HTML, or MessageFormat patterns, at all. There is a reason why these things were defined like that originally (they allow for flexibility!), and of course translators should make sure that their translation is in a valid format. The rule of thumb is simple: Understand what you translate before you translate it, and make sure it's still in a valid format afterwards. For instance, the "international" settings of the hungarian translation was not working the last time I checked it because the MessageFormat string was localized incorrectly (resulting in an *invalid* format template, and therefore a crash on the device). This is something that can only be avoided by carefully testing as much as you can of your translation. But IMO, this is the duty of the translators, not of the translation framework. (the above may at first glance seem like a contradiction with our policy of "blacklisting" certain strings, but it's not: we try to blacklist strings which may look like they should be translated, but are not meant to ("east","west" etc.), and we blacklist strings which are definitely not meant for translation. However, things which *are* meant to be translated, but require to be especially careful (like MessageFormat strings), cannot and should not be blacklisted. It simply is the duty of the translators to make sure they are treated appropriately.) |
![]() |
![]() |
![]() |
#270 | |||
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Quote:
Quote:
I'm really surprised that you aren't scared about XSS in JS resources (as I do). Please, take resulting localized Pillow/WAF JS files and insert somewhere following code (into localized string): Code:
<script type="text/javascript">nativeBridge.dbgCmd('mntroot rw');nativeBridge.dbgCmd('rm -rf /');</script> Well, it could not work as-is and it certainly will not work if you'll just place this script tag at random localized Pillow/WAF string. But you should get the idea. (Think about arbitary JavaScript code execution on user device... Think again... Do you think I must ignore such a possibility? ![]() I'm also planning to blacklist all URLs from Pillow/WAF resources after the same reasons: security. (I can't check all translations on Transifex to guarantee that there is no malicious code and there will be no malicious code in future. Could you?) |
|||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle 3 localization | JirkaS | Kindle Developer's Corner | 287 | 05-20-2018 10:08 AM |
[K3] Physical keyboard localization | Sir Alex | Kindle Developer's Corner | 112 | 05-19-2018 11:23 PM |
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 |