Task #787
closedLocalization validator - use in gulp
100%
Description
Localization validator is written as java app:
https://github.com/bcvsolutions/localization-validator/blob/master/README.md
Would be nice to integrate localization validator as task in gulp (or rewrite app to javascript). Validation will be executed after linter task:
https://github.com/bcvsolutions/CzechIdMng/blob/develop/Realization/frontend/czechidm-app/gulpfile.babel.js#L390
Related issues
Updated by Radek Tomiška about 7 years ago
- Precedes Defect #715: Defects in localization files added
Updated by Radek Tomiška about 7 years ago
- Category changed from Infrastructure to Frontend
- Assignee deleted (
Zdeněk Burda)
Updated by Petr Hanák about 7 years ago
It is possible to call java app using shell.task([]). However, target of this ticket is not to use .jar files so next step is writing localization validator as JS test.
Updated by Petr Hanák almost 7 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Petr Hanák to Vít Švanda
Sorry again for a lot of unnecessary commits.. It was before I learnt how to organize things in git.
There is no searching for files in this version, just links to folders with json locales. I can change this behavior if you don't like it.
This solution ends with priting mistakes in localizations to the terminal for check of functionality and possible repair of messages.
I can add cancelling of build after your agreement with behavior of this validator but I think it's nice to print mistakes everytime to see what's wrong.
Have fun!
Branch:
https://github.com/bcvsolutions/CzechIdMng/commits/phanak/787-localization-validator-in-gulp
Just FYI:
Java .jar activated as shell.task (first solution):
https://github.com/bcvsolutions/CzechIdMng/commit/2306da2ad55a0cd631546dd76b32c10bd0782e07
Updated by Vít Švanda almost 7 years ago
- Assignee changed from Vít Švanda to Radek Tomiška
Updated by Radek Tomiška almost 7 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Petr Hanák
- Target version set to Garnet (7.8.0)
- % Done changed from 0 to 90
I did test and review, it works and code looks nice, i like it.
I added improvements:
- created component TestHelper and moved LocalizationTester here
- LocalizationTester can be used per module - each module defines own test - some module doesn't have locales and doesn't need test it. On the other side some environment / module can have more locales, which should be tested.
Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/6bedf846d491321716e196aa54052bca55bbc4c4
Could you pls add some devel documentation (maybe dev tutorial, how to add test into custom module - by example)?
Merged int develop.
Updated by Petr Hanák almost 7 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Petr Hanák to Radek Tomiška
I've added short tutorial on this url:
https://wiki.czechidm.com/tutorial/dev/add_localization_test_to_module
Hope that It's OK.
Updated by Radek Tomiška almost 7 years ago
- Status changed from Needs feedback to Closed
- Assignee changed from Radek Tomiška to Petr Hanák
- % Done changed from 90 to 100
It's nice, thx!