[Potlatch-dev] internationalisation: generating <lang>.zip asset
Hiroshi Miura(@osmf)
miurahr at osmf.jp
Thu Dec 13 22:41:27 GMT 2012
Hi Richard,
On 2012年12月03日 22:42, Hiroshi Miura(@osmf) wrote:
> I made an implementation of locale asset converter utility to generate <locale>.zip files on resources/locales/
> directory from map_features.xml and map_features/*.xml by replacing names with localized one.
> https://github.com/miurahr/potlatch2/commits/i18n-features
>
> You can see properties files in l10n/locale/<lang>/map_features.properties
>
> You need to add flash parameter such as args["assets"] = "locales/ja_JP.zip" to get localized version.
It is based on developers comment last year.
I've proposed that direct translation of XML files and selectable load feature.
The comment is that we can use asset loading mechanism.
This proposal is that adding feature to generate assset.
- generate localized xml from properties file and original XML file.
- packed to ZIP file for asset loading in initialize phase
- provide template properties file for tranlators
- PoC asset in Japanese
It is also generate files for each languages that indicate untranslated part of map_features/*xml files.
It helps translators to determine what feature should be translate when updated a potlatch2 code.
> I've also asked to pull it.
> https://github.com/systemed/potlatch2/pull/86
>
>
>
> i18n: introduce MapFeturesConverter
>
> It introduce java utility to generate localized *.xml from map_features/*xml and properties
>
> i18n: map_features.properties, id attribute
>
> The utility use id attribute to find replacing block.
>
Do you have any comment? Be happy with localization, isn't it?
I test my patch against recent branch and it is happily applied w/out any error.
You may be able to see Japanese localized potlatch2 w/ this resource in:
http://www.osm.jp/potlatch2/osmjp.html
#warn: Here is a test site that connect dev server.
A localization files are java style properties, so it is good for translation site
such as translatewiki
To adopt to OSM Japan site, I started translation project at
https://www.transifex.com/projects/p/potlatch2/
Hiroshi
More information about the Potlatch-dev
mailing list