[
https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891951#action_12891951
]
Jacques Le Roux commented on OFBIZ-3869:
----------------------------------------
Hi Deyan,
# Read
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
# here is your patch
{code}
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww28300\viewh17040\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\f0\fs24 \cf0 Index:
framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java\
===================================================================\
---
framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java
(revision 962606)\
+++
framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java
(working copy)\
@@ -81,6 +81,11 @@\
Map<String, LabelInfo> labels = factory.getLabels();\
Set<String> labelsList = factory.getLabelsList();\
Set<String> localesFound = factory.getLocalesFound();\
+ for (String localeName : localeNames) \{\
+ if (!localesFound.contains(localeName)) \{\
+ localesFound.add(localeName);\
+ \}\
+ \}\
// Remove a Label\
if (UtilValidate.isNotEmpty(removeLabel)) \{\
labels.remove(key + LabelManagerFactory.keySeparator +
fileName);\
}
{code}
* There should not be no lines before the "index" line (\f0\fs24 \cf0 Index:
framework/webtools/src/org/ofbiz/webtools/labelmanager/SaveLabelsToXmlFile.java\)
and no header characters before the word index
* There should not be any \ at end of lines
* You should nto use tabs but 4 spaces (in java files, 2 spaces in FTL files or
even XML files, see coding convention)
Have a look at any other patch submitted...
Thanks
> Service SaveLabelsToXmlFile omits labels for new locales that did not exist
> prior calling the service
> -----------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-3869
> URL: https://issues.apache.org/jira/browse/OFBIZ-3869
> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Reporter: Deyan
> Attachments: SaveLabelsToXml.patch
>
>
> 1) Use LabelManagerFactory and try to add labels for a locale that does not
> exist in the resource bundles - for example en_US.
> 2) Invoke the service SaveLabelsToXmlFile
> Expected behavior: the resource bundle should contain the newly added locales
> Experienced behavior: the resource bundle does not contain the labels for the
> newly added locales.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.