RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v2]
Alexey Ivanov
aivanov at openjdk.org
Wed Aug 9 13:47:37 UTC 2023
On Wed, 9 Aug 2023 06:02:30 GMT, Tejesh R <tr at openjdk.org> wrote:
> Re-opening the PR with proposed fix. After understanding the issue reported and analysis made, it is observed that on change of locale (mid-application) all others component labels were update with new locale provided, yet `New Folder` didn't. So if changing Locale mid-application is accepted, then updating the two fields `newFolderString` and `newFolderNextString` in `WindowsFileSystemView` class is required. (Yet other OS classes to be updated too)
I think the user would expect that if they change a string in UIManager, that string is used.
So, previously, the translations for "New Folder" couldn't be changed after `FileSystemView` is initialised. Now it uses whatever string is in `UIManager` when a new folder is created.
With this in mind, the test case could simply put new values to `UIManager` after `JFileChooser` is created and verify that new folders created using the UI that the file chooser provides use the new strings.
> Yet other OS classes to be updated too
Then you should update them.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15069#issuecomment-1671342991
More information about the client-libs-dev
mailing list