-
Notifications
You must be signed in to change notification settings - Fork 25
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 XQuery test to check for missing entries in language files #454
Conversation
I've also added the new check "check-language-files" to the Github actions:
|
When I run the test, I get an error because I don't have the right libraries for ant: |
I have added some basic information regarding dependencies in the Readme: Lines 104 to 110 in 3e57257
|
3e57257
to
faee0e0
Compare
faee0e0
to
91794f3
Compare
pinging @bwbohl and @roewenstrunk for reviewing |
Ok, I successfully tested the lang-test by doing the following:
This reported nothing and when changing the name of one entry it reported the original term missing in the modified file and the modified term in the other file. Everything as expected, very nice! |
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.
Just a short follow-up: Should we also check add/data/xslt/i18n
?
91794f3
to
f7ca4f5
Compare
Thanks for imrproving! |
Just trying to fix the files and realised maybe we should also cover duplicates in the error report. Currently this would be the result for a duplicate entry in one file: <key missing="" available="en de">csl</key> |
Regarding duplicates: Shall I add proper output for that case or is the current (undocumented) way of surfacing duplicates ok for now? |
I’d prefer making it clean now, so e.g. <key missing="" available="en de" duplicate="de">csl</key> |
7c0c01f
to
3758100
Compare
added explicit warning for duplicate keys. Output looks like: <results>
<key duplicates="de en">controller.window.Window_renderingView</key>
<key missing="en" available="de">global_execute</key>
<key duplicates="de">controller.window.Window_summaryView</key>
<key missing="de" available="en">global_execue</key>
</results> |
After retesting I have to report that it works fine for the files in Moreover if there˚s a duplicate in one of the |
with path to Saxon-HE.jar, see https://packages.ubuntu.com/focal/all/libsaxonhe-java/filelist
which already exists in the English version
Co-authored-by: Benjamin W. Bohl <[email protected]>
Co-authored-by: Benjamin W. Bohl <[email protected]>
Co-authored-by: Benjamin W. Bohl <[email protected]>
Co-authored-by: Benjamin W. Bohl <[email protected]>
644a754
to
4fc2890
Compare
Thank you very much @bwbohl for the thorough review! Works on my machine but it'd be great if you could have yet another (last) look. |
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.
Added some minor code linting.
Works like a charm, great implementation work, love it!
…m#454) * add xquery to check for missing entries in language files * add new check to ant build file * some cleanup * add new test to GIthub actions * add dependency * Install libsaxonhe-java for XQuery support * add lib parameter to ant call with path to Saxon-HE.jar, see https://packages.ubuntu.com/focal/all/libsaxonhe-java/filelist * add missing entry to German language file which already exists in the English version * add information about dependencies for running tests * fix typo * remove duplicate xml:ids * add support for language files at `/add/data/xslt/i18n` * aligning i18n langfiles * explicitly check for duplicate keys * Update add/data/xslt/i18n/en.xml Co-authored-by: Benjamin W. Bohl <[email protected]> * Update add/data/xslt/i18n/en.xml Co-authored-by: Benjamin W. Bohl <[email protected]> * translate term * fix grouping key for i18n files Co-authored-by: Benjamin W. Bohl <[email protected]> * run tests in parallel Co-authored-by: Benjamin W. Bohl <[email protected]> * be very specific about data types * minor code linting --------- Co-authored-by: bwbohl <[email protected]>
Description, Context and related Issue
This PR introduces a new XQuery based check for missing entries in language files
Refs #154
How Has This Been Tested?
Checked locally by modifying language files and checking results of running
ant check-language-files
Types of changes
Checklist