Oups, sorry- I mixed up the values of the "languageX" keys in the
messages_fr.xml file sent with my previous message.

Here is a corrected version of messages_fr.xml for the i18n samples.

Olivier Lange

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


-----Message d'origine-----
De : Olivier Lange [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi, 19. avril 2002 02:25
À : [EMAIL PROTECTED]
Cc : Konstantin Piroumian
Objet : RE: Still problems with i18n for FRENCH Solution found


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>

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>

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

By the way I noticed that when I was running simple.xml, the third article
just showed:

"""
3. Article: Troisièmement
Hello
"""

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.

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... ;)

Olivier Lange

Le Petit Atelier de Génie logiciel
Frêne 11, 1004 Lausanne, +41-21-6487665, [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8"?>

<!-- CVS $Id: messages_de.xml,v 1.1 2002/01/03 12:31:42 giacomo Exp $ -->

<!-- French message catalogue file for cocoon2 sample webapp -->

<catalogue xml:lang="fr">
  <message key="count_title">Cette page a été invoquée {0} fois. Dernière invocation: {1}.</message>
  <message key="a_key">Ceci est la valeur d'une clé.</message>
  <message key="lang_id1">en</message>
  <message key="lang_id2">ru</message>
  <message key="lang_id3">pl</message>
  <message key="lang_id4">es</message>
  <message key="lang_id5">hy</message>
  <message key="lang_id6">de</message>
  <message key="language">Français</message>
  <message key="language1">Anglais</message>
  <message key="language2">Russe</message>
  <message key="language3">Polonais</message>
  <message key="language4">Espagnol</message>
  <message key="language5">Arménien</message>
  <message key="language6">Allemand</message>
  <message key="titletext">Bienvenue aux fonctions d'internationalisation!</message>
  <message key="doclink">Pour des informations détaillées, consulter la section i18n:</message>
  <message key="first">Premièrement</message>
  <message key="second">Deuxièmement</message>
  <message key="third">Troisièmement</message>
  <message key="forth">Quatrièmement</message>
  <message key="article">Article</message>
  <message key="article_text1">Ceci est un paragraphe auquel une transformation i18n a été appliquée.</message>
  <message key="article_text2">Ceci est autre un paragraphe auquel une transformation i18n a été appliquée et il s'en porte d'autant mieux!</message>
  <message key="copyright">Copyright © 2001 Konstantin Piroumian. Traduction française de Olivier Lange.</message>
  <message key="Hello, {0}! Glad to see you!">Salut {0}! Ravi de te rencontrer!</message>
  <message key="Kot">Tomcat</message>
  <message key="none">inconnu</message>
  <message key="one">un</message>
  <message key="two">deux</message>
</catalogue>

---------------------------------------------------------------------
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