JDK-8088397 : [Dialog] ButtonType text not updated when Locale changes
Type:Bug
Component:javafx
Sub-Component:controls
Affected Version:8u40
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2015-04-28
Updated:2020-01-31
Resolved:2015-10-06
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Since the ButtonTypes are public static final fields in the ButtonType class they can't be changed every time the application receives a new locale while running.
Comments
Looks like the same patch, so +1
04-03-2016
Webrev for backport to 8u-dev: http://cr.openjdk.java.net/~leifs/8088397/webrev.8u.00/
Please review.
Webrev for review: http://cr.openjdk.java.net/~leifs/8088397/webrev.00/
The fix does not add new API and does not automatically change button labels when the default locale changes. It does allow the app to reconstruct the dialog and get the correct labels for the current locale.
06-10-2015
This could be fixed by storing the key as an immutable field in ButtonType (rather than the localized text) and looking it up every time it is needed. I don't know whether there are other places in the code that have the same issue, but any time you cache the result of looking up a localized resource you will run into a problem like this.
Targeting to 9.