This also fixes a bug where the UI source.json file was invalid since
it had a trailing comma.
The JSON files were sorted with this Python:
with open(path, 'r') as f:
obj = json.load(f)
with open(path, 'w') as f:
f.write(json.dumps(obj, indent=2, sort_keys=True,
ensure_ascii=False).replace(' \n', '\n'))
Change-Id: I846dfbbc88254030147193fad057bed024997bcd
This changes the format of the localization data to enable apps to
trivially lazy-load translations. It also adds --locales to the build
scripts to allow app developers to choose the compiled-in locales.
The generated output now goes into dist/ and is not checked into
revision control. Finally, it adds "description" and "meaning" fields
to the source messages to allow us to more easily integrate with a
context-aware human translation service. The "description" field
provides application context for the translator, while the "meaning"
field provides linguistic disambiguation for words with multiple
meanings or parts of speech in the original English.
Because the translation service wants to collapse messages with
identical text, we had to merge several messages together. To this
end, we have removed the prefixes "ARIA_LABEL_" and "LABEL_" from the
messages themselves and collapsed what remained.
Issue #1688
Change-Id: I24c17e71c73f6663cf123cfdba118c486fa80ecc