Following on from a discussion last year[1] I've started work on internationalisation of p2 using the babelFx[2] i18n framework. This lets use keep the internationalisation separate from the rest of the development, rather than covering the code in standard flex resourceManager calls. It's the same framework as was discussed back in August.
There's a few, err, issues with what's been done so far, so here goes: 1) There's a bug where the default locale, en_US, isn't loaded at runtime. It's apparently been fixed[3] but I still couldn't get it to work. If anyone else knows more about compiler parameters, resource bundles and/or locales in flex then please enlighten me! 2) It doesn't appear to fall back to the hardcoded strings when the resource bundles key/values are missing. I don't know whether that's by design but it makes everything a bit fragile. 3) There's no automated locale switching yet. Play with recompiling for now with different locales. The only reason there's a hardcoded switch-to-en_GB is due to point 1) 4) I've seen flickering as text is injected and components resized, and you can spot blank labels as components are drawn before the locale has been loaded. 5) The locales have been set up as runtime-loaded resources, since that's apparently "how it should be done" rather than bundling them all into the .swf. I suspect bundling would help 4 but in the long run it could turn really nasty with 40+ locales bloating the .swf 6) The logging is currently insane, but that's easily switched off. You need to, at a minimum, "ant deployLocales" to get the locale .swfs into resources/ otherwise things break. You'll notice something is wrong because there will be no text on the undo/redo buttons. If you are using ant to compile the whole thing it should work. I would say if anyone wants to translate the whole app, hang fire until we've got some of the bugs listed above worked out. Comments? Cheers, Andy [1] http://lists.openstreetmap.org/pipermail/potlatch-dev/2010-August/000130.html [2] http://babelfx.org/ [3] http://groups.google.com/group/babelfx/browse_thread/thread/813d455c850a62f2 _______________________________________________ Potlatch-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/potlatch-dev
