Seaside-Gettext sneak peak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside-Gettext sneak peak

Philippe Marschall
Hi

Up until now if you wanted to have a multilingual Seaside application
in Pharo you had to "roll your own" which can be a bit uncool. Hilaire
ported the gettext package from the OLPC to Pharo and I wrote a small
Seaside layer on top of it.

What you need:
1. update to the very latest Seaside 3.0
2. unzip the attached file in your image folder
3. load Gettext from PharoInbox
4. load Seaside-Gettext-Core from [1]
5. load Seaside-Gettext-Examples from [1]
6. go to http://127.0.0.1:8080/gettext

Usage:
Right now the API is:

html translate: 'text to translate'
html translate: 'other text to translate' to: aWALocale

which renders the translation. This has the problem that is doesn't
work for attributes, I'll need to come up with a solution for this,
API proposals are welcome.

Gettext Workflow:
1. write your application using the API above
2. register your domain. A domain is a way to group strings, you might
have Pier and a reporting application running in the same image and
want each to use it's own dictionary:
TextDomainManager registerCategoryPrefix: 'Seaside-Gettext-Examples'
domain: 'gettext'
3. export the template
WAGetTextExporter new exportTemplate
4. create the translation files e.g. using poedit [2]
5. put the translation files in locale/<locale>/LC_MESSAGES/<domain>.(po|mo)
6. done

One of the nice things about gettext is that there are external tools
like poedit [2] to manage the translation files which you can give to
your translators. No more need to mess around with Excel. There are
also tools [3] that display how much of your application is already
translated.

 [1] http://www.squeaksource.com/Seaside29Addons
 [2] http://www.poedit.net/
 [3] http://l10n.gnome.org/languages/de/gnome-office/ui/

Cheers
Philippe

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

locale.zip (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-Gettext sneak peak

Philippe Marschall
2010/5/9 Philippe Marschall <[hidden email]>:

> Hi
>
> Up until now if you wanted to have a multilingual Seaside application
> in Pharo you had to "roll your own" which can be a bit uncool. Hilaire
> ported the gettext package from the OLPC to Pharo and I wrote a small
> Seaside layer on top of it.
>
> What you need:
> 1. update to the very latest Seaside 3.0
> 2. unzip the attached file in your image folder
> 3. load Gettext from PharoInbox
> 4. load Seaside-Gettext-Core from [1]
> 5. load Seaside-Gettext-Examples from [1]
> 6. go to http://127.0.0.1:8080/gettext
>
> Usage:
> Right now the API is:
>
> html translate: 'text to translate'
> html translate: 'other text to translate' to: aWALocale
>
> which renders the translation. This has the problem that is doesn't
> work for attributes, I'll need to come up with a solution for this,
> API proposals are welcome.
>
> Gettext Workflow:
> 1. write your application using the API above
> 2. register your domain. A domain is a way to group strings, you might
> have Pier and a reporting application running in the same image and
> want each to use it's own dictionary:
> TextDomainManager registerCategoryPrefix: 'Seaside-Gettext-Examples'
> domain: 'gettext'
> 3. export the template
> WAGetTextExporter new exportTemplate
> 4. create the translation files e.g. using poedit [2]
> 5. put the translation files in locale/<locale>/LC_MESSAGES/<domain>.(po|mo)
> 6. done
>
> One of the nice things about gettext is that there are external tools
> like poedit [2] to manage the translation files which you can give to
> your translators. No more need to mess around with Excel. There are
> also tools [3] that display how much of your application is already
> translated.
>
>  [1] http://www.squeaksource.com/Seaside29Addons

That's now:
http://www.squeaksource.com/Seaside30Addons

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Seaside-Gettext sneak peak

Julian Fitzell-3
Ahh.... (been bothering me for a while :) )

On Mon, May 10, 2010 at 9:28 AM, Philippe Marschall <[hidden email]> wrote:
2010/5/9 Philippe Marschall <[hidden email]>:
> Hi
>
> Up until now if you wanted to have a multilingual Seaside application
> in Pharo you had to "roll your own" which can be a bit uncool. Hilaire
> ported the gettext package from the OLPC to Pharo and I wrote a small
> Seaside layer on top of it.
>
> What you need:
> 1. update to the very latest Seaside 3.0
> 2. unzip the attached file in your image folder
> 3. load Gettext from PharoInbox
> 4. load Seaside-Gettext-Core from [1]
> 5. load Seaside-Gettext-Examples from [1]
> 6. go to http://127.0.0.1:8080/gettext
>
> Usage:
> Right now the API is:
>
> html translate: 'text to translate'
> html translate: 'other text to translate' to: aWALocale
>
> which renders the translation. This has the problem that is doesn't
> work for attributes, I'll need to come up with a solution for this,
> API proposals are welcome.
>
> Gettext Workflow:
> 1. write your application using the API above
> 2. register your domain. A domain is a way to group strings, you might
> have Pier and a reporting application running in the same image and
> want each to use it's own dictionary:
> TextDomainManager registerCategoryPrefix: 'Seaside-Gettext-Examples'
> domain: 'gettext'
> 3. export the template
> WAGetTextExporter new exportTemplate
> 4. create the translation files e.g. using poedit [2]
> 5. put the translation files in locale/<locale>/LC_MESSAGES/<domain>.(po|mo)
> 6. done
>
> One of the nice things about gettext is that there are external tools
> like poedit [2] to manage the translation files which you can give to
> your translators. No more need to mess around with Excel. There are
> also tools [3] that display how much of your application is already
> translated.
>
>  [1] http://www.squeaksource.com/Seaside29Addons

That's now:
http://www.squeaksource.com/Seaside30Addons

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev