I just came to realize that it is possible for the Eclipse compiler to track the missing NON-NLS entries, ie it can detect non-externalized strings.
Please consider opening your Eclipse, go to the preferences, then open Java>Compiler>Error/warnings and look for the option “Non-externalized strings”.
Please push that option so that it issues warnings whenever it finds a non-externalized string.
Otherwise, I’ll keep sending people to the cross-project list, or I’ll ask the AC to consider setting the non-externalized string flag as an error when compiling the Galileo RCs. I hope I won’t have to do that.
PDE also have a setting for this if you go to the Plug-in Development compiler warnings page. Catch your missing NLS entries in MANIFEST.MF and plugin.xml files.
Antoine> setting the non-externalized string flag as an error when compiling
If a project is meant to be internationalised, *shouldn’t* a non-externalised string should be an error?
Chris> PDE also have a setting for this…
I didn’t know about that one, thanks Chris!
Hey Sean, well I wanted to be nice. I think the level of error should be raised depending on the phase of development you are in.
If you need to externalize before you can run your code, you are doomed to failure. You also may want to avoid externalizing the code for the tests.
True and true. Shouldn’t force the developer to externalise strings (in the code under test) before running unit tests, for instance.
However, I think it’s reasonable to expect externalised strings before checking code in. (And the wizards (or quick-fix) make it pretty easy to “ignore” non-externalised strings in test code, in bulk.)
The ugly truth, at least from my own experience, is that some manual testing is required and that requirements themselves change over time as we discover more of the solution. Also, with CVS, you have no choice but to check-in, while with Git you can commit changes locally every so often, so you keep your focus. I hate having modified files hanging around on my local copy.
So we tend to have I-builds provided to QA that aren’t externalized. Externalization is an effort that requires a lot of time from devs, and we are ready to commit to that effort when the code is mature.
It all depends on the development process of the company you work for I suppose.
Okay, that makes sense. Externalisation can be non-trivial, especially when trying to choose good keys in the resource bundles.
But I still like the idea of NON-NLS sledgehammers in RC builds.
Let’s open a bug against the AC, see where it goes.
OK, here it is:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=261766