localization bug?

Hi There,

I'm trying to append a few labels to the dutch translation. However this does not work.

This is my messages_nl.properties which I need to append:

# lines for chat

label.context.menu.chat.with=Chat
label.context.menu.call.with=Bel

This is the part of my deployment-fragment.xml

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

It does work for messages_en.properties

Is this a bug?

Edit: extra info, I'm using Nuxeo 5.8 with HF's installed.

Thanks in advance, Bauke Roo

0 votes

2 answers

916 views

ANSWER



Hi,

Since Nuxeo 5.8, the messages files have moved from a two-letter scheme to a four-letter one. So your deployment-fragment.xml should look like:

<?xml version="1.0"?>
<fragment version="1">
   <require>org.nuxeo.ecm.platform.lang.ext</require>
   <install>
     <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_nl.properties"
            to="nuxeo.war/WEB-INF/classes/messages_nl.properties" addNewLine="true"/>
     <append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_nl.properties"
            to="nuxeo.war/WEB-INF/classes/messages_nl_NL.properties" addNewLine="true"/>
   </install>
</fragment>

As Anahide told me, adding the good require tag in the deployment-fragment should make sure the file you want to append text to is actually here. This is a first requirement for this to work :-)

The two letter file is used as a fallback in case the browser does not know what to do with a four letter code like nl_NL. They are both identical so you need to append your changes to both files to be consistent.

As for the english file, its behavior is a little different as it's maintained by Nuxeo. But it will soon use the same behavior.

0 votes



Hi Laurent,

Thanks, I didn't have the requiretag properly. (I had it like this, but that didn't work)

<require>org.nuxeo.ecm.platform.lang</require>

But with the following it works fine :-)

<require>org.nuxeo.ecm.platform.lang.ext</require>

Bauke Roo

0 votes