Wiki
Clone wikikindle-touch-l10n / Home
Plans for Kindle Touch localization
Who's working on what:
- ive_found: ?
- ixtab: ?
Decisions on a non-trivial problems
Translating Java resources (solved)
We can't use the .properties files as-is, as at least one resource is contained in ListResourceBundle sub-class. .properties format can't handle it. And transifex.net doesn't supports raw Java classes as input/output format.
This one is solved by using tool/kt-loc.jar. We're converting Arrays into properties format like so:
arrayprop = new String[] {"a","b"}
becomes
arrayprop[0]=a arrayprop[1]=b
When bundling up the translated Strings, these cases are checked for, and ListResourceBundle classes are created on the fly where needed.
Translating Pillow and WAF resources
Pillow and WAF string resources are JavaScript files that are (mostly) containing object with a keys and strings. Example:
var SomeAppStringTable = {
title: "SomeApp",
warning: "There be dragons"
};
The plan is to make from such a JavaScript file two another files: template and .properties:
// Concrete syntax of template substitutions isn't important.
var SomeAppStringTable = {
title: "%SomeAppStringTable.title%",
warning: "%SomeAppStringTable.warning%"
};
SomeAppStringTable.title=SomeApp
SomeAppStringTable.warning=There be dragons
Then .properties could be imported to transifex.net.
We need tools for
- extracting strings from JavaScript file
- making a template from JavaScript file
- making a .properties file from extracted strings
- applying .properties file to a JavaScript template
Updated