|
Some .po files with translations of Plone 4.0.2,
and quite likely other versions, do not include in the .po header a line indicating the translations target language -- something like "Language-Code: XX\n" , with XX replaced by a language code While the eggified structure of directories, with a directory for each language, serves nicely to Plone to associate the .po files with the intended language, the missing Language-Code: line in the .po make difficult to deal with the translations out of the eggs folder structure (i.e. to incorporate all the translations in a translations program, like my Plone translations application athttp://www.modeldd.org/). I have attached the list of files with missing or wrong Language-Code: line. Also attached a python script to cure most of the cases, by replacing or inserting a "Language-Code:" line with a language code derived from the directories structure. But, if would be nice if contributors to Plone translations could actually fix the .po files. Cheers, Antonio Carrasco Valero Model Driven Development, sl Valencia, Spain -- Antonio Carrasco Valero [hidden email] Model Driven Development, sl Valencia España (Spain) www.ModelDD.org ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Plone-i18n mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-i18n |
|
Hi.
On Thu, Mar 3, 2011 at 10:31 AM, Antonio Carrasco Valero on gmail <[hidden email]> wrote: > Some .po files with translations of Plone 4.0.2, > and quite likely other versions, > do not include in the .po header a line indicating the translations target > language > -- something like "Language-Code: XX\n" , with XX replaced by a language > code And they shouldn't. We just haven't fixed our tools yet to avoid adding it. The "Language-Code" header is not part of the gettext standard but an invention of some old Zope code. It was only required to support the non-standard i18n folder layout we used in older versions. These days it has no effect and only confuses people - it therefor should be removed. The same applies to the Language-Name and Domain headers. > the missing Language-Code: line in the .po > make difficult to deal with the translations out of the eggs folder > structure > (i.e. to incorporate all the translations in a translations program, > like my Plone translations application athttp://www.modeldd.org/). If you want to import the translations files into a different service / program, you should adjust your scripts to read the information from the directory structure. This is the canonical place for the information and the one actually used by our code. Hanno ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Plone-i18n mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-i18n |
|
Thanks a lot, Hanno.
I understand. I shall not depend upon those header lines. I drop my suggestion. Cheers, ACV Antonio Carrasco Valero [hidden email] Model Driven Development, sl Valencia España (Spain) www.ModelDD.org On 03/03/2011 10:46, Hanno Schlichting wrote: > Hi. > > On Thu, Mar 3, 2011 at 10:31 AM, Antonio Carrasco Valero on gmail > <[hidden email]> wrote: >> Some .po files with translations of Plone 4.0.2, >> and quite likely other versions, >> do not include in the .po header a line indicating the translations target >> language >> -- something like "Language-Code: XX\n" , with XX replaced by a language >> code > And they shouldn't. We just haven't fixed our tools yet to avoid > adding it. The "Language-Code" header is not part of the gettext > standard but an invention of some old Zope code. It was only required > to support the non-standard i18n folder layout we used in older > versions. These days it has no effect and only confuses people - it > therefor should be removed. The same applies to the Language-Name and > Domain headers. > >> the missing Language-Code: line in the .po >> make difficult to deal with the translations out of the eggs folder >> structure >> (i.e. to incorporate all the translations in a translations program, >> like my Plone translations application athttp://www.modeldd.org/). > If you want to import the translations files into a different service > / program, you should adjust your scripts to read the information from > the directory structure. This is the canonical place for the > information and the one actually used by our code. > > Hanno ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Plone-i18n mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/plone-i18n |
| Powered by Nabble | Edit this page |
