-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8291978: jpackage: allow to override primary l10n files on Windows #9780
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
Conversation
👋 Welcome back akasko! A progress list of the required criteria for merging this PR into |
Webrevs
|
@akashche This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 49 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@alexeysemenyukoracle, @sashamatveev, @naotoj) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Thanks for the review! |
/integrate |
@@ -34,6 +34,7 @@ resource.executable-properties-template=Template for creating executable propert | |||
resource.setup-icon=setup dialog icon | |||
resource.post-app-image-script=script to run after application image is populated | |||
resource.post-msi-script=script to run after msi file for exe installer is created | |||
resource.wxl-file=WiX localization file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to all WinResources*.properties files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We have a discussion of how l10n files should be changed at #9753. Can you confirm that if some property is missing in a resource bundle its value is picked from the English resource bundle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just pushed the commit with EN entries for all files before reading the latest comment. I'll verify the behaviour with .wxl
and .properties
files and will comment in this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe for the .properties
case, modifications for the localized files are not required, as ResourceBundles fall back to the root (English) bundle.
/sponsor |
@alexeysemenyukoracle The PR has been updated since the change author (@akashche) issued the |
Sorry for delay, I've found multiple problems while checking l10n handling manually. Overview:
This is caused because when
when
It is not clear, why exactly this is happening, I've found it is possible to fix this by using
I've found that if encoding is specified to std streams in -jpackage laucher here](
If these streams are changed to:
then redirected output in the file is correct. I am not sure whether this change makes sense (I understand that this is a console output, and console encoding handling will depend on Windows system locale, I used only |
Thank you for the deep investigation and detailed report! #2 issue was an oversight in #7 I'm 100% sure not specifying character encoding in PrintWriter ctor was an oversight. The solution with specifying utf8 encoding looks good to me. Please file a separate CR for this issue. |
Thanks for the review! I assume this PR still needs a l10n review from @naotoj before integrating it? |
Agree. It would be good if @naotoj will look at it on more time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry for the delay.
/integrate |
/sponsor |
Going to push as commit 543163a.
Your commit was automatically rebased without conflicts. |
@alexeysemenyukoracle @akashche Pushed as commit 543163a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
About the point "7." above, I've experimented (on Windows Server 2016) with For both
Then if I set default JVM locale to If I set the Windows system "Language for non-Unicode programs" to Japanese, then, after the reboot, active codepage in
In this case running both So I assume that existing behaviour is intended one and not filing the Jira issue now. Please let me know if it is still makes sense to file such Jira issue for |
I don't think it is good that the encoding of jpackage output depends on the default jvm encoding. It is convenient to know that the output is always in a specific encoding regardless of the values of Let's keep jpackage aligned with other JDK tools. Could you please check the behavior of |
That's the expected behavior. Historically, we only support where user's locale and the system' locale match, otherwise such a garbled text would generate. Since Windows 10, they offer UTF-8 as the system encoding (still they claim it is beta), then all the out put is in UTF-8. |
This change is a follow-up to this comment.
Override implementation is based on this comment.
As suggested in this comment only English translation is provided for new
resource.wxl-file
label.getTempdirectory
utility was moved fromBasicTest
toWindowsHelper
to be able to provide--temp
and inspect the contents ofconfig
dir in verifier. It is not clear ifWindowsHelper
is an appropriate place for this utility (BasicTest
is not Windows-specific), I've assumed that--temp
flag itself is only used on Windows.Testing:
WinL10nTest
adding checks for-loc
arguments tolight.exe
and additional@Parameter
run that overrides one of the primary.wxl
filesBasicTest
in unpack modeProgress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9780/head:pull/9780
$ git checkout pull/9780
Update a local copy of the PR:
$ git checkout pull/9780
$ git pull https://git.openjdk.org/jdk pull/9780/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9780
View PR using the GUI difftool:
$ git pr show -t 9780
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9780.diff