Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper).
------------------------------------------------------------------------------------ Key: OFBIZ-2148 URL: https://issues.apache.org/jira/browse/OFBIZ-2148 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Environment: any Reporter: Karim Rahimpur Fix For: SVN trunk *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karim Rahimpur updated OFBIZ-2148: ---------------------------------- Attachment: UelUtil.java.patch This modifies _BasicVariableMapper.resolveVariable(...)_ to take LocalizedMaps into account and retrieve the values for a given locale (if available in context). > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Fix For: SVN trunk > > Attachments: UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karim Rahimpur updated OFBIZ-2148: ---------------------------------- Attachment: HtmlFormRenderer.java.patch And this modifies HtmlFormRenderer.renderDropDownField(...) so that a currently selected value's description is retrieved from the values - possibly localized. > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-2148: -------------------------------------- Assignee: Jacques Le Roux > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-2148. ---------------------------------- Resolution: Fixed Thanks Karim, You slightly modified patch (I used a for loop instead of old styled iterator) is in trunk revision: 738870 > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668545#action_12668545 ] Karim Rahimpur commented on OFBIZ-2148: --------------------------------------- Many thanks Jacques, that was fast :) > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karim Rahimpur updated OFBIZ-2148: ---------------------------------- Attachment: HtmlFormRenderer.java.patch Just one small addition to exit the for loop as soon as the label is found. > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12668788#action_12668788 ] Jacques Le Roux commented on OFBIZ-2148: ---------------------------------------- Done in revision 739219. > Localized values are not retrieved from LocalizedMaps (through BasicVariableMapper). > ------------------------------------------------------------------------------------ > > Key: OFBIZ-2148 > URL: https://issues.apache.org/jira/browse/OFBIZ-2148 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: any > Reporter: Karim Rahimpur > Assignee: Jacques Le Roux > Fix For: SVN trunk > > Attachments: HtmlFormRenderer.java.patch, HtmlFormRenderer.java.patch, UelUtil.java.patch > > > *BasicVariableMapper* (from org.ofbiz.base.util.string.UelUtil) defines the method _resolveVariable(...)_ which retrieves the value for a given variable from the associated map _variables_. > Even if _variables_ is a LocalizedMap and a value for a given locale is available, resolveVariable does not return the localized value as it fails to check that case. > This results e.g. in descriptions for drop down options showing up only with their original description and not with those defined in the *EntityLabels.xml files: > See [https://127.0.0.1:8443/ordermgr/control/FindRequest] or [https://demo.hotwaxmedia.com/ordermgr/control/FindRequest] the options for Status Id in any language that offers translations for the request type. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |