localization
Adam Young
ayoung at redhat.com
Thu Apr 15 19:47:05 UTC 2010
Looks pretty straightforward to build. The gettext-commons project has
no external dependencies, with the minor exception of junit for the
tests. I'll have an RPM either today or tomorrow
On 04/15/2010 12:38 PM, Dmitri Dolguikh wrote:
> changes are in. Here's the skinny:
>
> - there's a new dependency in the build: gettext-commons
> - there are new targets in the build: extractkeys - extracts strings
> that need to be localized, mergekeys - performs a merge on the
> existing .po files, createresourcebundles - compiles resource bundles
> - localized resource bundles can be found in
> localized_resources/classes/ directory
> - if you're running tomcat from under eclipse, you'll need to the
> above directory into tomcat's classpath
>
> how to use it (development):
> inject I18n (there's a I18n provider) instance in the classes that
> will have user-visible text. Then (assuming instance variable name is
> i18n):
>
> <snip>
> i18n.tr("goodbye, cruel world.");
> </snip>
>
> will do the trick.
> NOTES: if a resource bundle for a given locale wasn't found, the
> default locale (en_US) will be used. Default locale (en_US) is an
> empty resource bundle, therefore all calls to tr() will return
> unmodified arguments.
>
> how to use it (translation of resources):
> - create .po file for the desired locale in localized_resources directory
> - update buildfile (tasks mentioned above) with the new locale
> - run mergekeys
> - provide translations using poedit (or w/e else you choose to use)
> - run createresourcebundles to build the resources
> - profit!
>
> -d
>
>
>
>
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/candlepin/attachments/20100415/62129208/attachment.html>
More information about the candlepin
mailing list