Re: [Potlatch-dev] i18n using babelFx

2011-02-23 Thread Steve Bennett
On Wed, Feb 23, 2011 at 2:10 AM, NopMap  wrote:
> Just to explain the situation: I am running an (unmodified) P2, but I have
> built a custom map_feature file from scratch. Of course it would be good to
> translate both.

I wonder how this would best work? Maybe we could have auxiliary
map_features files that only serve to change the descriptions and
names. Something like:

paths.xml:


...


But it could get complicated trying to assign id's to every element,
including 's etc.

Or do you simply have lists of translations, with contexts, like
"cycle path"->"piste cyclable"? That would be very fragile though,
breaking every time a description in English changed...

Steve

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] i18n using babelFx

2011-02-21 Thread NopMap


Is there a way to attach custom resource files to this process which match
the custom map_features?

bye
Nop
-- 
View this message in context: 
http://gis.638310.n2.nabble.com/Potlatch-dev-i18n-using-babelFx-tp6040153p6048659.html
Sent from the Potlatch mailing list archive at Nabble.com.

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] i18n using babelFx

2011-02-21 Thread Andy Allan
On Mon, Feb 21, 2011 at 12:30 PM, NopMap  wrote:
>
> Hi!
>
> It's great to hear that there is an internationalization module being done,
> even if it is still a little fragile.
>
> Doing the application is rather straightforward work, I guess, but what
> about the map features? It'll probably be a lot of extra work if they need
> to be fully duplicated and maintained for each and every language. But they
> contain a lot of strings that are directly shown in the GUI: Names,
> descriptions, categories...

Yeah, I've been pondering those. It looks like the translation
framework allows injection of translated strings into any attribute of
objects of arbitrary classes, and given that internally map_features
is parsed into various objects (e.g. Feature) that might be the route
to easy translation. The properties files could contain entries for
"likely" entries in map_features, such as transport, but obviously
this will need the issue of displaying fallback text when the
translation is missing to be resolved first since custom versions of
p2 can contain custom map_features files.

I certainly aim for the map_features files to be translated using this
system rather than having to maintain duplicate copies.

Cheers,
Andy

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


Re: [Potlatch-dev] i18n using babelFx

2011-02-21 Thread NopMap

Hi!

It's great to hear that there is an internationalization module being done,
even if it is still a little fragile.

Doing the application is rather straightforward work, I guess, but what
about the map features? It'll probably be a lot of extra work if they need
to be fully duplicated and maintained for each and every language. But they
contain a lot of strings that are directly shown in the GUI: Names,
descriptions, categories...

Any ideas for those yet?

bye
 Nop

PS: If you need help with a German translation, I'm game.

-- 
View this message in context: 
http://gis.638310.n2.nabble.com/Potlatch-dev-i18n-using-babelFx-tp6040153p6048524.html
Sent from the Potlatch mailing list archive at Nabble.com.

___
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev


[Potlatch-dev] i18n using babelFx

2011-02-18 Thread Andy Allan
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
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev