[Engine-devel] Fwd: Checkstyle- Webadmin & userportal localization
Alona Kaplan
alkaplan at redhat.com
Wed May 2 08:58:12 UTC 2012
Hi,
Yesterday some changes were made in oVirt's checkstyle (http://gerrit.ovirt.org/#change,3760)
1. Renaming built-tools to build-tools-root and separating it into two packages:
* checksyles- for checkstyle xml files.
* ovirt-checkstyle-extension- for adding new (not built-in) checkstyle checks.
2. Adding to the checkstyle.xml a new check- NlsCheck, which fails the compilation in case non-externalized strings appear in the code.
[To understand more about the need of this check, see http://gerrit.ovirt.org/#change,3612]
>From now on, all strings in the web-admin/user-portal java code should be one of the following:
- Externalized (in case the string should be localized)
- Have a "//$NON-NLS-N$" comment next to them (in case the string shouldn't be externalized, e.g. HashName of a component)
If there is a non externalized string in a web-admin/user-portal java file and
there is no "//$NON-NLS-N$" comment next to it, mvn compilation will fail.
Note: NlsCheck is currently configured to run only on web-admin/user-portal projects.
If you want NlsCheck check to run on another project, please add the following to the configuration of the checkstyle in the project's pom file:
<propertyExpansion>runNlsCheck=true</propertyExpansion>
Alona.
More information about the Engine-devel
mailing list