Problems with internationalization in "user_preferences.xhtml" view

When I select locale=English, the dropbox menu options at right is showed in spanish and when I select locale=Spanish the dropbox menu options at right is showed in English. The action button is translated correctly but its options are not translate correctly.

Attached an image

alt text

I am using nuxeo 5.6 and certainly, you do not have translation for spanish. In my plugin I did this translation and in my messages.properties file I added those lines:

label.userPreferences.updateLocale=Edit Locale Settings
label.userPreferences.resetTimeZone=Reset time zone from

and in my messages_es.properties file, I added thoses lines:

label.userPreferences.updateLocale=Editar la configuración regional
label.userPreferences.resetTimeZone=Cambiar zona horaria

Deploy fragment:

<?xml version="1.0"?>

<fragment version="1">
  <require>org.nuxeo.ecm.webapp.core</require>
  <require>org.nuxeo.ecm.platform.lang</require>

  <install>

    <unzip from="${bundle.fileName}" to="/" prefix="web">
      <include>web/nuxeo.war/**</include>
    </unzip>

    <delete path="${bundle.fileName}.tmp" />
    <mkdir path="${bundle.fileName}.tmp" />
    <unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" />

    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_es.properties"
            to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_fr.properties" 
            to="nuxeo.war/WEB-INF/classes/messages_fr.properties" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages.properties" 
            to="nuxeo.war/WEB-INF/classes/messages.properties" addNewLine="true" />
    <delete path="${bundle.fileName}.tmp" />


  </install>
</fragment>

another question is: where can I translate this section in the view user_preferences.xhtml? Locale settings Español Time Zone Etc/UTC - Hora Universal Coordinada

0 votes

1 answers

1089 views

ANSWER

Hi,

Which version of Nuxeo do you use? I don't see any spanish translations for those 2 actions in a Nuxeo 5.6.

Are you working on internationalizing it?

04/25/2013

Hi, I edited my question
04/25/2013

Can you add the content of your deployment-fragment.xml file?
04/26/2013

done what you need
04/26/2013



You are adding your spanish translations to the wrong file (messages_en.properties). Here is a fixed deployment-fragment.xml:

<?xml version="1.0"?>

<fragment version="1">
  <require>org.nuxeo.ecm.webapp.core</require>
  <require>org.nuxeo.ecm.platform.lang</require>

  <install>

    <unzip from="${bundle.fileName}" to="/" prefix="web">
      <include>web/nuxeo.war/**</include>
    </unzip>

    <delete path="${bundle.fileName}.tmp" />
    <mkdir path="${bundle.fileName}.tmp" />
    <unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" />

    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_es.properties"
            to="nuxeo.war/WEB-INF/classes/messages_es.properties" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_fr.properties" 
            to="nuxeo.war/WEB-INF/classes/messages_fr.properties" addNewLine="true" />
    <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages.properties" 
            to="nuxeo.war/WEB-INF/classes/messages.properties" addNewLine="true" />
    <delete path="${bundle.fileName}.tmp" />

  </install>
</fragment>

The labels you are looking for to translate “Locale settings” and “Time Zone” are:

label.userpreferences.locale=Locale settings
label.userpreferences.timezone=Time Zone

The labels for the user preferences / user profile can be found in this file

0 votes



ohh thanks, and I found the other labels to translate
04/26/2013