Author: shridharp Feature: Gulp task for 'en.json' and 'dv.json' creation Note: 'dv.json' is created for identifying which labels or places are left/skipped by developers for i18n changes. Steps To perform:-
-
While doing i18n, developers should do it with following mentioned pattern:- i. If i18n is done in curly braces like :- {{ $t('btn_confirm') }} Then it should be done with pattern:- {{ $t('##btn_confirm##@@Confirm@@') }}
ii. If i18n is done at attribute level in element like :- Then it should be done with pattern:-
iii. If i18n is done at script level like :- this.
toasted.error(this.
t('invalidUsername'), { theme: 'bubble', duration: 6000 }) Then it should be done with pattern:- this.toasted.error(this.
t('##invalidUsername##@@User name is invalid@@'), { theme: 'bubble', duration: 6000 }) -
After this just run command 'npm run geni18n'
-
This will create backup of current 'en.json'
-
Create new 'en.json' and 'dv.json'
-
Further the 'en.json' can be used to do i18n in any language at 'https://cs.mkcl.org'