[Grok-dev] How do I extract i18n messages from zope.schema etc? (solution)

Sebastian Ware sebastian at urbantalk.se
Fri Jun 18 05:38:43 EDT 2010


Minor beware... I use poedit to translate files and it saves translation files as default.mo if you don't specify something else. You need to rename it to zope.mo etc. in order for i18n-machinery to find it.

Mvh Sebastian


18 jun 2010 kl. 10.59 skrev Sebastian Ware:

> Add another call to extract in 
> 
>  bin/i18nextract
> 
> something like
> 
>    z3c.recipe.i18n.i18nextract.main(['i18nextract', '-d', 'zope', '-s', '[/path/to/project]/parts/i18n/configure.zcml', '-o', '[/path/to/where/you/want/to/exract/message/pot/file]/locales_zope', '-p', 'zope.schema'])
> 
> where zope.schema is the egg you want to extract. The pot-file ends up in ".../locales_zope" and for the rest you can follow the instructions in:
> 
>  http://grok.zope.org/documentation/how-to/how-to-internationalize-your-application
> 
> I guess this could be added to the following section in buildout.cfg, but I am doing it manually since I only need to extract once anyway.
> 
>  # this section named so that the i18n scripts are called bin/i18n...
>  [i18n]
>  recipe = z3c.recipe.i18n:i18n
>  packages = yhguiden
>  eggs = yhguiden
>  domain = yhguiden
>  output = src/yhguiden/locales
>  zcml =
> 
> Mvh Sebastian
> 
> 
> 
> 17 jun 2010 kl. 17.23 skrev Sebastian Ware:
> 
>> I want to extract the message ids and then add the localisation files to my project. Is there some document describing this process?
>> 
>> I know how to do it for my local apps, just not how to do it for eggs.
>> 
>> Mvh Sebastian
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> https://mail.zope.org/mailman/listinfo/grok-dev
> 



More information about the Grok-dev mailing list