[
https://issues.apache.org/jira/browse/MYFACES-4491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17633300#comment-17633300
]
Melloware commented on MYFACES-4491:
------------------------------------
As noted [~pcristof] will be adding TCK tests requested by BalusC so this can
be tested in Mojarra and MyFaces.
> Composite component does not reflect locale changes
> ----------------------------------------------------
>
> Key: MYFACES-4491
> URL: https://issues.apache.org/jira/browse/MYFACES-4491
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.3.10, 3.0.2, 4.0.0-RC3
> Reporter: Paulo Cristovão de Araújo Silva Filho
> Priority: Major
>
> *Bug*
> According to VDL documentation
> ([2.3|https://jakarta.ee/specifications/faces/2.3/vdldoc/overview-summary.html],
> [3.0|https://jakarta.ee/specifications/faces/3.0/vdldoc/], and
> [4.0|https://jakarta.ee/specifications/faces/4.0/vdldoc/]), "{_}[t]he normal
> localization rules for ResourceBundle would apply{_}" for composite
> components localized with <composite_component_name>.properties files that
> uses
> {code:java}
> #{cc.resourceBundleMap}
> {code}
> . As such, when using a composite component named custom_button.xhtml and its
> associated custom_button.properties and custom_button_fr.properties, the
> change in locale definition should change the displayed messages.
> In mojarra and myfaces (2.3, 2.3-next (myfaces), 3.0 and 4.0), the expected
> behaviour does not occur ([as recognized by BalusC in
> 2013|https://stackoverflow.com/questions/18134378/how-to-localize-jsf-composite-component]).
> His proposed hack still works for MyFaces, but I couldn't use it in recent
> versions of mojarra.
> *To reproduce*
> Example projects
> [localized-components|https://github.com/cristof/localized-components] and
> [localized-web|https://github.com/cristof/localized-web] are available to
> show the issue. Please install the first one into your local maven and then
> compile the second.
> You may deploy localized-web into a tomee-plus versions 8.0.13 (jakarta8) and
> 9.0.0-MX (jakarta9) and check the behavior. Go to
> localhost:8080/localized-web and change the language.
> Expected behavior
> The button label should change reflecting the desired language, but it
> doesn't.
> Solution
> I've opened four pull requests that fixes the issue for branches
> [2.3.x|https://github.com/apache/myfaces/pull/367],
> [2.3-next|https://github.com/apache/myfaces/pull/368],
> [3.0|https://github.com/apache/myfaces/pull/366] and
> [4.0|https://github.com/apache/myfaces/pull/369].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)