You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Crum (JIRA)" <ji...@apache.org> on 2008/03/08 20:09:49 UTC

[jira] Commented: (OFBIZ-1698) Locale labels in language different from the fallback sometime are not displayed

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

Adrian Crum commented on OFBIZ-1698:
------------------------------------

I spent some time checking into this and it appears to me the system is working correctly even though the result seems wrong.

The UI labels are loaded in the eCommerce CommonScreens.xml file as follows:

<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>

The framework searches for the UI label in sequence from the top down, so EcommerceUiLabels is checked first. If the user's locale is italian, the framework will search for a matching italian label. If that isn't found, it searches for a matching english label. If that isn't found, it moves on to the ContentUiLabels properties file and the process repeats.

In the example you gave, the EcommerceCartSummary UI label exists in the EcommerceUiLabels file, but there is no translation for italian. Since a translation exists for english, that one is used. Since a matching label is found, the process stops - so the italian translation in the OrderUiLabels properties file is never found.

The solution is to include the italian translation in the EcommerceUiLabels properties file.


> Locale labels in language different from the fallback sometime are not displayed
> --------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1698
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1698
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Bruno Busco
>
> A label is not displayed in the selected language but in the fallback one when ALL the following are true:
> - A language different from the one specified as "locale.properties.fallback" in framework/common/config/general.properties is selected
> - The label is defined in more than one XXXUiLabels.XML file (say File1UiLabels.xml and File2UiLabels.xml)
> - The screen includes first File1UiLabels.xml and then File2UiLabels.xml
> - In File1UiLabels.xml there is NO translation for the selected language
> - In File2UiLabels.xml there is the translation for the selected language
> This bug was not present in Release 4.0 and i think could have been introduced with the new locale system.
> You can check the bug going in the trunk demo in the ecommerce main page and selecting italian. -> Labels "Cart Summary" and "Special Offers" are not translated.
> In the R4.0 demo it is all OK

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.