cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lange" <ola...@petit-atelier.ch>
Subject TR: RE: Still problems with i18n for FRENCH Solution found
Date Fri, 19 Apr 2002 00:46:21 GMT
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:olange@petit-atelier.ch


-----Message d'origine-----
De : Olivier Lange [mailto:olange@petit-atelier.ch]
Envoyé : vendredi, 19. avril 2002 02:25
À : cocoon-users@xml.apache.org
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, olange@petit-atelier.ch

Mime
View raw message