[Plone-conference] Templer Sprint - i18n script

Mark van Lent mark.van.lent at edition1.nl
Mon Oct 15 12:17:22 UTC 2012


Hi Harald,

On 10/15/12 1:42 PM, Harald Friessnegger wrote:
> hi mark
>
> the script attached more or less does the same things but takes slightly different approaches
>
> * it does not need the language list ( LANGUAGES="en fi de").
>    as you're crating the folder structure with templer anyway this makes  the script less error-prone:
>
>    creating a news language with templer and not adding it to the list here would result in new ids not beeing synced to this language's po file

The language list is, as far as I know, only used to initially create 
the right directory structure in the locales directory. The actual 
syncing of the .po files is done by using "find" to get all the 
languages that are present. (What I had in mind in for a 'fancy' version 
of the localcommand was that the LANGUAGES list would automatically be 
updated. Not out of necessity but to avoid confusion.)

But I agree that the responsibility of creating the directory structure 
can indeed be left to the localcommand just to make things more clear 
for the new user.


> * as i personally have a policy, types and them package in our comany's projects there is support for collecting msgids of different packages
>    into one central package.
>
>    i think this use-case is very common for other developers too
> 	
>    there might be more elegant solutions for this. plone has to do the same for plone.app.locales, so there might already be a more generic solution for this

I'm curious how others do this, because I have a separate domain for my 
policy, content types and theme packages. I'll see if I can get more 
information on this one. (Thanks for the plone.app.locales tip.)


> * it also uses the i18n/manual.pt to sync new translations for the plone domain (i know, the i18n directory is not needed for this anymore, we can put these into  lang_code/LC_MESSAGES/plone.po now.
>    however, the script could/should offer a soluton to extract and sync translations for the plone domain, too. so we can translate document actions and the like.

This is indeed something that I intend to achieve with the new version 
of the script.

Thanks for your insights and script!
Mark



More information about the Plone-conference mailing list