-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composite component does not reflect locale changes #5160
Comments
Quick review: I noticed that the |
Moved the method as requested in all branches, changing the name to getLocalizedPaths because it will return a list of a single path even if the target path is not a properties resource - so it will be the one and only localized path. |
Changed localized-web project so it is easier to test the issue and the fix. Added readme with instructions there. As this is my first contribution to mojarra, I'm struggling on how I could add a test into the project. |
Tests should be added in one of the faces* subfolders here https://github.com/jakartaee/faces/tree/master/tck E.g.: In this specific case, add to faces23. |
Do I have to open another issue there, or I can use this one as reference for pull requests? |
@cristof i think you are safe to refernence this issue and also the MyFaces issue you opened in the TCK test. It would be a great addition since then MyFaces and Mojarra would have to pass the test! |
Created the TCK test and made the pull request, as previously asked. |
Nice work! |
Bug
According to VDL documentation (2.3, 3.0, and 4.0), "[t]he normal localization rules for ResourceBundle would apply" for composite components localized with <composite_component_name>.properties files that uses #{cc.resourceBundleMap}. 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.) His proposed hack still works for MyFaces, but I couldn't use it in recent versions of mojarra.
To reproduce
Example project localized-components and 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-plume versions 8.0.13 (profile jakarta8) and 9.0.0-MX (profile 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'm opening three pull requests that fixes the issue for branches 2.3.18, 3.0.2 and 4.0
The text was updated successfully, but these errors were encountered: