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

Jacques Le Roux updated OFBIZ-5246:
-----------------------------------

    Description: 
With "zh" (chinese) locale, coutry-state associated list, if you choose a 
country there's no any associated state defined in system, the state filed does 
not change.

cause: incorrect translate of "CommonNoStatesProvinces" for "zh" locale. In 
that, it use full-width colone ":" instead of half one plus blank space(": ").

why half-width and blank space (": ")? see code snippet from 
"getDependentDropdownValues" function:


  was:
With "zh" (chinese) locale, coutry-state associated list, if you choose a 
country there's no any associated state defined in system, the state filed does 
not change.

cause: incorrect translate of "CommonNoStatesProvinces" for "zh" locale. In 
that, it use full-width colone ":" instead of half one plus blank space(": ").

why half-width and blank space (": ")? see code snippet from 
"getDependentDropdownValues" function:
{quote}
                    if (typeof value == 'string') {
                        values = value.split(': ');
                        if (values[1].indexOf(selected) >= 0 && selected.length 
> 0) {
                            optionList += "<option selected='selected' value = 
" + values[1] + " >" + values[0] + "</option>";
                        } else {
                            optionList += "<option value = " + values[1] + " >" 
+ values[0] + "</option>";
                        }
                    } 
{quote}


{code}
                    if (typeof value == 'string') {
                        values = value.split(': ');
                        if (values[1].indexOf(selected) >= 0 && selected.length 
> 0) {
                            optionList += "<option selected='selected' value = 
" + values[1] + " >" + values[0] + "</option>";
                        } else {
                            optionList += "<option value = " + values[1] + " >" 
+ values[0] + "</option>";
                        }
                    } 
{code}
                
> in zh locale, state does not change to "No States/Provinces exist" if select 
> a country without any state defined
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-5246
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5246
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Leon
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-5246.patch
>
>
> With "zh" (chinese) locale, coutry-state associated list, if you choose a 
> country there's no any associated state defined in system, the state filed 
> does not change.
> cause: incorrect translate of "CommonNoStatesProvinces" for "zh" locale. In 
> that, it use full-width colone ":" instead of half one plus blank space(": ").
> why half-width and blank space (": ")? see code snippet from 
> "getDependentDropdownValues" function:

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to