On 15 Sep 2014, at 12:27, p...@highoctane.be wrote:

> With a .po bridge to/from I18N, wouldn't we have a pretty nice solution?

That is exactly what Gettext does. Once the translation dictionary is loaded 
into Pharo, it’s just string mapping.

How strings are translated (i.e. sending #translate or doing whatever) could be 
factored out. The Gettext template generator is a metaprogram that extracts the 
strings from your source code, and that could be parameterized. 

A question: without looking at the code of i18n, I notice the assumption that 
each ‘UI string’ is identified by a symbol. Is that correct or just how the 
example is presented?
In most cases, you construct ‘UI strings’ in your code as follows:

‘The user {name} clicked on item {number}’ translatedWith: { name -> self 
username . number -> self number }

So, I don’t know if i18n relies on the keys being symbols or not, but this kind 
of thing works with the Gettext translators. Normally, this should not be an 
issue since it just means using strings as the keys in the translation 
dictionaries. But it struck me because for a translator (i.e. a human) who just 
gets the thousand strings to translate, being able to translate this kind of 
sentences (instead of symbols) is essential.

I also agree 100% with Hilaire: Gettext is a standard where plenty of external 
tools can work with. Though it’s nice to have translation tools in the image, 
you will have to do everything yourself. Just take a look at everyhting that is 
done by poedit [1]. Do we really want to implement everything ourselves?

[1] http://poedit.net/

Johan


> 
> Phil
> 
> On Mon, Sep 15, 2014 at 11:35 AM, Hilaire <hila...@drgeo.eu> wrote:
> 
> Nice for project with a delimited scope.
> Problem: you cut yourself from translators aggregated in oneline free 
> software community. For example https://translations.launchpad.net/drgeo
> For DrGeo this is a show stopper.
> 
> Hilaire
> 
> Le 15/09/2014 10:23, Torsten Bergmann a écrit :
> Need an easy translation framework for your Pharo application
> with no external dependency?
> 
> Then check out the I18N project:
> 
>    http://smalltalkhub.com/#!/~TorstenBergmann/I18N
> 
> Docu and examples can be found on the same page, screenshot
> is attached.
> 
> Bye
> T.
> 
> 
> 
> -- 
> Dr. Geo - http://drgeo.eu
> iStoa - http://istao.drgeo.eu
> 
> 
> 
> 

Reply via email to