On Thu, 15 Jan 2026 00:46:55 GMT, Alexander Matveev <[email protected]> 
wrote:

>> - Fixed plist file so translation works. It did not worked before.
>> - All strings which needs translations moved to .properties files.
>> - Added translated strings, since it is required to have all of them. We 
>> cannot have English strings in localized files, since different charset is 
>> required for each language.
>> - I tested all translations.
>> - Adding same license text for all translations is required.
>> - See JBS for screenshot of dialog. It is same except it now has drop down 
>> box with 4 languages we support. There are no way to remove it once 
>> translations implemented correctly in plist file.
>> - NOTE: License dialog for DMG was deprecated since macOS 12. Also, there 
>> are no alternative for it.
>
> Alexander Matveev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8374215: [macos] Clean "lic_template.plist" [v3]

Changes requested by asemenyuk (Reviewer).

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgLicense.java line 
43:

> 41: final class MacDmgLicense {
> 42: 
> 43:     public static void prepareLicense(MacDmgPackage pkg, BuildEnv env,

It is hard to tell from the method's signature what its inputs and outputs are. 
It is only clear that it somehow prepares the license. Sometimes it does not, 
but this becomes clear only after reading the code.

The `env` parameter is only used to create an `OveridableResource` instance.

That said, I suggest changing the signature to:

public static void prepareLicense(Path inputLicenseFile, Path 
outputLicenseFile) throws IOException;


And in the body replace 

env.createResource(DEFAULT_LICENSE_PLIST)
``` 
with 

new OverridableResource(DEFAULT_LICENSE_PLIST, ResourceLocator.class)


If the package is configured without the license, 
`MacDmgLicense.prepareLicense()` should not be called.

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacDmgLicense.java line 
107:

> 105:     }
> 106: 
> 107:     private static final String 
> DEFAULT_LICENSE_PLIST="lic_template.plist";

Missing spaces: `T="` -> `T = "`

-------------

PR Review: https://git.openjdk.org/jdk/pull/28959#pullrequestreview-3663496711
PR Review Comment: https://git.openjdk.org/jdk/pull/28959#discussion_r2692614897
PR Review Comment: https://git.openjdk.org/jdk/pull/28959#discussion_r2692616145

Reply via email to