![]() |
#166 | |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
I'm just jokingly deducing the term from the term of working on JS tool. ![]() |
|
![]() |
![]() |
![]() |
#167 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
I tried it out, but it doesn't seem to be as flexible as we need it. I do have a dedicated root server somewhere, which could probably take care of this, however I don't want to completely reconfigure it. So as a first step, do you think you could make your tools compatible with python 2.6? While installing 2.7 on Ubuntu LTS works, it's a bit adventurous, and I don't know what other side-effects it may have...
|
![]() |
![]() |
Advert | |
|
![]() |
#168 | |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
UPD Did it. Will test on Python 2.6 in future. Last edited by eureka; 01-25-2012 at 09:25 PM. |
|
![]() |
![]() |
![]() |
#169 | |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Quote:
What it does is: * takes some "model" language that seems to be working fine (e.g. "de") * compares all de.properties and en_US.properties to find out what properties inside those are identical * compares all other languages .properties and en_US.properties * generates .html reports for all other languages showing folders, property names & values if: - value for given property name is different for given language and en_US AND - value for given property name is identical for en_US and "model" language That way it should be easier to find out "out-translated" localizations. I'm attaching the tool and its report: loc-report.zip To use the tool do "tx pull -a -s" and run "python report.py <model_language>" in tx working directory. Those reports are generated with German localization as a model. ixtab, Can you have a look at those reports? I'm especially interested in Russian one, you know ![]() Maybe by analyzing this we can create a list of properties that shouldn't be translated, rather than say vaguely "don't translate something that is too short". Last edited by JustAMan; 01-26-2012 at 04:11 PM. Reason: quoted ixtab |
|
![]() |
![]() |
![]() |
#170 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Thanks for that!
I can't run the report.py by myself, wherever I try to run it, I keep getting Code:
Traceback (most recent call last): File "tool/report.py", line 5, in <module> all_lngs.remove(source) KeyError: 'en_US' ![]() However, I took a look at the output, and it's pretty much what I expected. Most of the Strings I listed in the announcement are wrongly translated. (There are a few innocent ones, like "OK" or "International" as well). It's probably not a bad idea to generate an informative list of "do-not-translate" properties. However, it will unfortunately be of limited usefulness, because translators do not see the property names on Transifex, only the values. I think the report is very useful and helps to give pointers for manual fixing for "advanced" users. (Update) One more suggestion: leave out empty (=untranslated) strings from the report. As said, they are ok because the base version will be used. Also, thanks for your offer of the 5.0.0 files, but I'd think that this might lead to even more trouble. I'll just stick with 5.0.1 for the time being. Maybe if I'm feeling adventurous someday, I just try to install 5.0.3. Does a failed update give any information (in the log or so) about *which* files it complained about? Last edited by ixtab; 01-26-2012 at 05:05 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#171 | |||||
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Quote:
![]() Remember I said do "tx pull -a -s"? Or you're running it from the wrong place. You have to run it from the root folder where you did "tx init" and "tx pull". Agreed that I should handled it better but, oh man, I'm lazy! ![]() Maybe in next version... Quote:
![]() Quote:
Quote:
![]() btw, just thought about dd'ing it just in case... Quote:
Looks like I'll have to figure it out experimentally. |
|||||
![]() |
![]() |
![]() |
#172 | ||
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
![]() I also made sure to run it from the root dir. Still, same error. Quote:
![]() If someone can come up with a complete list of properties to ignore (which Bundle(class name), which property), I'm ok to include it in the tool though. See a few pages up. Transifex unfortunately produces empty strings from missing translations, so in this context "missing" and "empty" are equivalent. |
||
![]() |
![]() |
![]() |
#173 | ||
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Quote:
Quote:
Ah, got it. I tried to fix the script to skip those, it works for ru_RU at least.... Last edited by JustAMan; 01-26-2012 at 06:11 PM. Reason: report.py update |
||
![]() |
![]() |
![]() |
#174 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Nope. Finds no languages. Well, I did look inside it, and I think your glob is wrong ("*/*.properties")?
Here's what the directory structure actually looks like: Code:
$ find . -name "*.properties"|grep en_US|head -n 1 ./src/5.0.0/framework/com/amazon/ebook/util/resources/StringUtilResources_en_US.properties |
![]() |
![]() |
![]() |
#175 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
o_O
Here's what I get when I did "tx pull -s -a": Code:
$ find . -name \*.properties|head -n 5 ./translations/kindle-touch-framework.5-0-0--c-a-k-k-i-Kindlet/es.properties ./translations/kindle-touch-framework.5-0-0--c-a-k-k-i-Kindlet/pl.properties ./translations/kindle-touch-framework.5-0-0--c-a-k-k-i-Kindlet/eu.properties ./translations/kindle-touch-framework.5-0-0--c-a-k-k-i-Kindlet/th.properties ./translations/kindle-touch-framework.5-0-0--c-a-k-k-i-Kindlet/it.properties I'm running my script in ./translations directory. Something is really weird here... Maybe my "tx" is different from yours? I'm using the one that is in Fedora 16 repositories. I suppose I can adapt the tool to both layouts, however I'd rather understand why there's layout difference in the first place. |
![]() |
![]() |
![]() |
#176 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
The difference comes from your using the "auto-install" feature of transifex. This is not recommended. The recommended way is to use the .tx/config from the git repository (Or to simply clone the repository in the first place). This gives the correct directory layout and file names.
|
![]() |
![]() |
![]() |
#177 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
I see... Now I remember reading something about this config in the thread.
I've cloned the repo. I'll fix my report.py tomorrow, stay tuned ![]() |
![]() |
![]() |
![]() |
#178 | |||
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Quote:
Or just use this bookmarklet: Code:
javascript:(function(){var cb=$('#toggle_verbose'), p=$('.source_entity');if(cb.attr('checked')){cb.attr('checked',false);p.hide()}else{cb.attr('checked',true);p.show()};})(); Quote:
Spoiler:
Quote:
|
|||
![]() |
![]() |
![]() |
#179 |
Groupie
![]() ![]() Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
|
Here's new version, renamed to checkit.py, with some reports attached: newreport.zip
Try "python checkit.py -h" for some help on usage. BTW, ixtab, did you fix yesterday some localizations? I don't find much stuff in new report that was found in old, and I don't know whether it's my bug or you fixed the translations. I also didn't commit my tool to git repo you provided as I don't think I have access. You can either give me access to commit or commit it yourself if you think it's worth being there. UPD: it turned out that I ran my report tool on outdated source. eureka says transifex is the freshest one, so I'm going to do "tx pull -a" in git-cloned stuff and re-run the report. Last edited by JustAMan; 01-27-2012 at 03:34 PM. Reason: udpate |
![]() |
![]() |
![]() |
#180 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Fork repo on Bitbucket, add your tool and make a pull request. I'll then give you commit rights at the original repo.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |