On Wed, 16 Apr 2025 23:30:38 GMT, Andy Goryachev <[email protected]> wrote:
>> I do not know if we do, as there is also non-public code that I don't have
>> access to. I've kept them as-is to make sure the change is focused and
>> doesn't break anything else.
>>
>> If I had to guess then probably not, if you can ask around and find out I'll
>> be happy to remove them.
>
> I'll double check and will let you know tomorrow.
>
> A code search shows that these are only used in 5 classes: ButtonBar,
> ButtonBarSkin, Dialog, DialogPane, Properties, so chances are it's a digital
> fossil.
I can confirm that we don't use these `//$NON-NLS-*` comments in javaFX.
`<rant>`
These comments were invented as a way to solve the localization problem. The
problem is real, but the "solution" was exactly the opposite. Instead of
marking the strings that don't need to be localized, what should have happened
is to mark the string that need to be localized - with the information
containing the context!
example:
// verb, as in "execute this test"
String run = "Run";
What I've done with some other projects was
String run = TXT.get("Class.LocalizedResourceID.verb, as in execute this test",
"Run");
`</rant>`
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1779#discussion_r2049645839