-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a unit test to check if all the translation in messages_{LOCALE}.properties files are synchronized with the default one #3196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer the static methods in class NLS
(e.g. checkMessageFileDifferences
) to be in the unit test class since they are not used outside that test.
When I run the test class it fails on one test. If differences are detected it's OK to print that, but a unit test failure will fail a build of Phoebus. I think we should avoid it in this case.
OK, no problem, I understand, what I can do is :
Katy |
Yes, I think this is what should be changed. |
print a warning message instead of build failure.
Now I am a bit confused... the static methods used in the test class should not be in |
Ah OK, I understand the invert, sorry, it's my bad. I will move all the code in NLSMessagesTest.java |
It should be OK now, NLS.java is revert to the original version. |
Interesting to see that with a change in Locale, |
As it mentioned in the last CS-meeting with @georgweiss
Function checkMessageFilesDifferences added in org.phoebus.framework.nls.NLS class in core-framework module.
It lists the differences between all the existing messages_{LOCALE}.properties and messages.properties file.
If there is a missing Key in the messages_{LOCALE}.properties or if a key should be removed.
A unit test in org.phoebus.framework.nls.NLSMessagesTest is added .
checkAllMessagesResources() lists all the differences in all the Phoebus project.
Using this unit test, all the messages_fr.properties are updated now.