[jira] Created: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
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


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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3869:
-------------------------

    Attachment: SaveLabelsToXml.patch

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891692#action_12891692 ]

Jacques Le Roux commented on OFBIZ-3869:
----------------------------------------

Sorry Deyan,

But your patch is weird,  please follow Contributor best practices (I could do it by hand but then you would not learn for next time..)

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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12891944#action_12891944 ]

Deyan commented on OFBIZ-3869:
------------------------------

Hi Jacques ,

what do you mean by "weird" ?
Give me some hints, i'd be glad to modify it according to the best practices.

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3869:
-------------------------

    Attachment: SaveLabelsToXml_v2.patch

Fixed according to coding guidelines

> 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, SaveLabelsToXml_v2.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892194#action_12892194 ]

Deyan commented on OFBIZ-3869:
------------------------------

Thanks Jacques,

I fixed the patch and re-attached it.

> 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, SaveLabelsToXml_v2.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.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-3869) Service SaveLabelsToXmlFile omits labels for new locales that did not exist prior calling the service

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-3869.
----------------------------------

         Assignee: Jacques Le Roux
    Fix Version/s: SVN trunk
       Resolution: Fixed

Thanks Deyan,

Your patch is in trunk at r979204  


> 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
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: SaveLabelsToXml.patch, SaveLabelsToXml_v2.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.