Hi, Olivier!

> From: Olivier Lange [mailto:[EMAIL PROTECTED]] 
> 
> Konstantin
> 
> While playing with the i18n transformations, I did write a 
> french message
> file messages_fr.xml for the i18n samples. You will find a 
> copy of the file
> herewith, as well as an updated version of the sample files 
> simple.xml and
> simple.xsp. For these files, I added the items and links 
> (lang_id6) for the
> new language:
> 
>       <item>
>         <link>
>           
> <href>simple.xsp?locale=<i18n:text>lang_id6</i18n:text></href>
>           <title>
>             <i18n:text>language6</i18n:text>
>           </title>
>         </link>
>       </item>

Cool! I just was going to the it myself ;)

> 
> I added the 2 following keys to message_fr.xml; but all the 
> other message
> files need also the new keys for the new language, which I 
> did not fix:
> 
> <message key="lang_id6">fr</message>
> <message key="language6">Français</message>

Ok. I think that I'll move out the language links from the sample files and
use aggregation instead. Also, I'm going to change the links to display the
language name in its native language, so it will eliminate the need to
translate them, like: English | Русский | ... | Français.

> 
> ... If Kurt also submits these files: feel free to choose the ones you
> prefer!

I don't speak French, so I can't choose the best translation, but I'll
choose one of them anyway ;)

> 
> By the way I noticed that when I was running simple.xml, the 
> third article
> just showed:
> 
> """
> 3. Article: Troisièmement
> Hello
> """

I thought that I've fixed that a while ago... Thanks for reporting.

> 
> This is the corresponding code fragment from simple.xml:
> 
>       <i18n:translate>
>         <i18n:text>Hello</i18n:text>
>         <i18n:param name="username">
>           <i18n:text>Kot</i18n:text>
>         </i18n:param>
>       </i18n:translate>
> 
> I thought the second line should rather be:
> 
>         <i18n:text>Hello {0}</i18n:text>
> 
> and fixed it in the attached files.

It's not needed, if you use just 'Hello' as key for your translation, which
should be 'Hello {0}'.

> 
> On the same subject, I am not sure about the expected outcome of this
> fragment from simple.xsp:
> 
>         <i18n:translate>
>           <i18n:text>Hello, {0}! Glad to see you!</i18n:text>
>           <i18n:param name="username">
>               <xsp-request:get-parameter name="user" default="none"
> as="string"/>
>           </i18n:param>
>         </i18n:translate>
> 
> It translates to:
> 
> """
> Salut none! Ravi de te voir!
> """
> 
> There is a key "none" in messages_XX.xml; from 
> messages_fr.xml for instance:
> 
>   <message key="none">inconnu</message>
> 
> I thought that the translation was not the expected outcome 
> and did patch
> simple.xsp with the following code:
> 
>         <i18n:translate>
>           <i18n:text>Hello, {0}! Glad to see you!</i18n:text>
>           <i18n:param name="username">
>               <i18n:text><xsp-request:get-parameter name="user"
> default="none" as="string"/></i18n:text>
>           </i18n:param>
>         </i18n:translate>
> 
> which not translates to:
> 
> """
> Salut inconnu! Ravi de te voir!
> """
> 
> I hope these nano-patches are somewhat useful... ;)

Sure they are usuful! Keep fixing ;)

Konstantin

> 
> Olivier Lange
> 
> Le Petit Atelier de Génie logiciel
> Frêne 11, 1004 Lausanne, +41-21-6487665, [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to