Re: problem with i18n in chameleon zpt

2011-06-01 Thread george hu
BTW, as Douglas points out in his reply "Note *the use of i18n:name for all the inline markup* (including break tags) and no newline at the end of the element with i18n:translate. " I couldn't find a exact place in the Chameleon document for it. On Wed, Jun 1, 2011 at 8:44 AM, george hu wrote: >

Re: problem with i18n in chameleon zpt

2011-06-01 Thread george hu
Thanks Malthe for pointing out the document. I'm using the version 1.3rc1 of Chameleon as the Babel throws out error when run extract_messages. On Wed, Jun 1, 2011 at 4:30 AM, Malthe Borch wrote: > On 1 June 2011 10:11, george hu wrote: > > Although the issue is fixed, but it reminds me the fol

Re: problem with i18n in chameleon zpt

2011-06-01 Thread Douglas Cerna
On Wed, Jun 1, 2011 at 5:30 AM, Malthe Borch wrote: > Which version of Chameleon is this? I've seen it in 1.2.3 and 1.3.0-rc1. I haven't been able to start pyramid with 2.0. > Try this: > > http://pagetemplates.org/docs/latest/reference.html#i18n-name Using this template: - mytemplate.pt

Re: problem with i18n in chameleon zpt

2011-06-01 Thread Malthe Borch
On 1 June 2011 10:11, george hu wrote: > Although the issue is fixed, but it reminds me the following points: > 1. Is there a better way to deal with this issue? Since it seems too tricky > to spot the problem, either it should be documented or there must be a fix > in the chameleon zpt. Which ve

Re: problem with i18n in chameleon zpt

2011-06-01 Thread george hu
Thank you Douglas! It fixed my problem! Under vim I joined the line with the line above and then deleted the space and then the extra space disappeared in the generated po file. But it is strange when I double check my template file, there is no space in the end of line, and when I press return an

Re: problem with i18n in chameleon zpt

2011-06-01 Thread Douglas Cerna
On Wed, Jun 1, 2011 at 12:23 AM, george hu wrote: > Nope, this will produce the following po text: > msgid "" > "Welcome to ${app}, an application generated by${break} the Pyramid web " > "application development framework. " > msgstr "" > and it doesn't work either. Weird, for me it generates:

Re: problem with i18n in chameleon zpt

2011-05-31 Thread george hu
Nope, this will produce the following po text: msgid "" "Welcome to ${app}, an application generated by${break} the Pyramid web " "application development framework. " msgstr "" and it doesn't work either. On Tue, May 31, 2011 at 9:48 PM, Douglas Cerna wrote: > 2011/5/31 Geo : > > but the other

Re: problem with i18n in chameleon zpt

2011-05-31 Thread Malthe Borch
It might be helpful if there was a debug-version of the (default) translation function which logged or recorded succesful and failed translations. \malthe On 1 June 2011 06:48, Douglas Cerna wrote: > 2011/5/31 Geo : >> but the other part, which is: >> >>   Welcome to ${project}> span>, an appli

Re: problem with i18n in chameleon zpt

2011-05-31 Thread Douglas Cerna
2011/5/31 Geo : > but the other part, which is: > >   Welcome to ${project} span>, an application generated by >   the Pyramid web application development framework. > Ah! I remember this one... Try: - %< - Welcome to ${project}, an application generated by the Pyramid web applicatio

Re: problem with i18n in chameleon zpt

2011-05-31 Thread Jan Dittberner
On 31 Mai, 03:06, Douglas Cerna wrote: > Make sure you specify the i18n namespace and your application domain > in the template. Something like: > > http://www.w3.org/1999/xhtml"; xml:lang="en" > xmlns:tal="http://xml.zope.org/namespaces/tal"; > xmlns:i18n="http://xml.zope.org/namespaces/i18n"; >

Re: problem with i18n in chameleon zpt

2011-05-31 Thread Geo
That partially solved the problem. For the following html code: Search documentation the corresponding text in po is: msgid "search-document" msgstr "Search it!" and that works fine, but the other part, which is: Welcome to ${project}, an application generated by the Pyramid web applicat

Re: problem with i18n in chameleon zpt

2011-05-30 Thread Douglas Cerna
On Mon, May 30, 2011 at 12:45 PM, Geo wrote: > 2. changed in the the mytemplate.pt: > Search documentation > ... >         >          Welcome to $ > {project}, an application generated by >          the Pyramid web application development framework. >         Make sure you specify the i18n namesp

problem with i18n in chameleon zpt

2011-05-30 Thread Geo
I'm having issue with activating the translation. I created a sample project with paster create -t pyramid_routesalchemy, and I gone through the following steps to setup the i18n: 1. changed the development.ini: default_locale_name = zh 2. changed in the the mytemplate.pt: Search documentation ..