09-18-2011 12:30 PM
I need to create a custom translation for Nuxeo DM.
I created a bundle to deploy the files but append doesn't work.
I tried the following in deployment-fragment.xml:
<unzip from="${bundle.fileName}" to="/" prefix="web">
<include>/web/nuxeo.war/**</include>
</unzip>
<delete path="language.tmp" />
<mkdir path="language.tmp" />
<unzip from="${bundle.fileName}" to="language.tmp" prefix="web">
<include>/web/language/**</include>
</unzip>
<append from="language.tmp/language/messages_en.properties"
to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" />
<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.properties"
to="nuxeo.war/WEB-INF/classes/messages.properties" addNewLine="true" />
<append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_en.properties"
to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" />
----------------------------------------------------------
Deploying any of the above will unzip the contents to the right places, so the bundle works, I can even put new files on the deployment but no appending to existing files is done.
Supposely the append command should add the lines from the unzipped file to the messages properties files, but nothing happens although the files are correctly unzipped. There is no error in the server.log file.
I created the bundle following the cookbook example from nuxeo documentation, build the jar using maven and put the jar on the plugins folder.
I'm getting desperate, can you help me.
09-19-2011 09:23 AM
@patrek: Yes, I look into the file under nxserver/nuxeo.war/WEB-INF/classes/messages_en.properties and nothing changes.
Where do I need to put the
@Julien Carsique: I use the same code and nothing happens. The customized messages_en.properties file is in the following folder of the bundle structure:
/src/main/resources/OSGI-INF/l10n
I assume this is the correct location.
09-19-2011 01:05 AM
Did you look into the file under nxserver/nuxeo.war/WEB-INF/classes/messages_en.properties ?
Are you trying to override the translation? In that case, you need to add a <required>overriden.contribution</required> to make sure your translation appears after the original sentences.
09-19-2011 07:13 AM
Hello,
The following is appending translations from the bundle to "nuxeo.war/WEB-INF/classes/messages_en.properties":
<install>
<unzip from="${bundle.fileName}" to="/" prefix="web">
<include>web/nuxeo.war/**</include>
</unzip>
<!-- translations -->
<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_en.properties"
to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" />
<delete path="${bundle.fileName}.tmp" />
</install>
09-19-2011 09:23 AM
@patrek: Yes, I look into the file under nxserver/nuxeo.war/WEB-INF/classes/messages_en.properties and nothing changes.
Where do I need to put the
@Julien Carsique: I use the same code and nothing happens. The customized messages_en.properties file is in the following folder of the bundle structure:
/src/main/resources/OSGI-INF/l10n
I assume this is the correct location.
12-08-2011 10:10 PM
Where do I need to put the <required>overriden.contribution</required> sentence? Is it in the deployment-fragment.xml file?
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.