Project

General

Profile

Actions

Task #787

closed

Localization validator - use in gulp

Added by Radek Tomiška about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Petr Hanák
Category:
Frontend
Target version:
Start date:
10/24/2017
Due date:
% Done:

100%

Estimated time:
24.00 h
Owner:

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

Precedes IdStory Identity Manager - Defect #715: Defects in localization filesClosedRadek Tomiška10/25/201710/25/2017

Actions
Actions #1

Updated by Radek Tomiška about 7 years ago

  • Precedes Defect #715: Defects in localization files added
Actions #2

Updated by Radek Tomiška about 7 years ago

  • Category changed from Infrastructure to Frontend
  • Assignee deleted (Zdeněk Burda)
Actions #3

Updated by Vladimír Kotýnek about 7 years ago

  • Assignee set to Petr Hanák
Actions #4

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.

Actions #5

Updated by Petr Hanák almost 7 years ago

  • Status changed from New to In Progress
Actions #6

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

Actions #7

Updated by Vít Švanda almost 7 years ago

  • Assignee changed from Vít Švanda to Radek Tomiška
Actions #8

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.

Actions #9

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.

Actions #10

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!

Actions

Also available in: Atom PDF