directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: $NON-NLS-1$ usage...
Date Mon, 04 May 2015 22:21:08 GMT
Le 04/05/15 21:29, Stefan Seelmann a écrit :
> On 05/04/2015 09:18 PM, Emmanuel Lécharny wrote:
>> Le 04/05/15 19:30, Stefan Seelmann a écrit :
>>> On 05/04/2015 02:37 PM, Emmanuel Lécharny wrote:
>>>> Hi guys,
>>>>
>>>> in Studio, we have thousands of "// $NON-NLS-1$" comments in Studio's
>>>> code. Those comments were used to shut down some warnings in eclipse.
>>>> This is now totally superflouous, as we already have ignored such a
>>>> warning in the formatter we are using.
>>>>
>>>> I woudl suggest we remove all those comments in the code.
>>>>
>>>> Thoughts ?
>>>>
>>> They have another meaning: They are marker of the "Externalize Strings"
>>> tool/wizard. So if we want to continue to support NLS I think usage of
>>> the tool and the markers are essential.
>> Ah, good to know.
>>
>> What about the markers that are after Strings that are already read from
>> Properties, like in :
>>         toolkit.createLabel( serverIdComposite, Messages.getString(
>> "OpenLDAPOverviewPage.ServerID" ) ); //$NON-NLS-1$
>> ?
> Yes, because this "ID" should not be externalized again.
>
>
>> Also should I add it when I use a String ?
> In general yes. Either you add them manually. Or you just code and at
> some point you select right-click on a single file or package or the src
> whole project and choos "Source -> Externalize Strings..." and follow
> the wizard. There you can also choose "Ignore" for Strings not to
> externalize, it adds the $NON-NLS-X$ for you. I'd recommend to commit
> before doing this because the wizard handling is a bit uncommon.

Ok, will do that.

Thanks Stefan !


Mime
View raw message