Add xliffmerge to update translated files (#3991)
To apply differences of `i18n/messages.xlf` into treanslated files, i.e. `messages.[locale].xlf` like `messages.fr.xlf` and `messages.ja.xlf`, introduce `xliffmerge` and run it after `ng xi18n`.
Showing
此差异已折叠。
此差异已折叠。
此差异已折叠。
... | ... | @@ -42,7 +42,7 @@ |
"check:frontend:scss": "./aio/scripts/format.sh --styles --check && ./node_modules/sass-lint/bin/sass-lint.js -c .sass-lint.yml 'src/app/frontend/**/*.scss' -v -q", | ||
"check:frontend:html": "./aio/scripts/format.sh --html --check", | ||
"check:license": "gulp check-license-headers", | ||
"check:i18n": "ng xi18n --outFile ../i18n/messages.xlf", | ||
"check:i18n": "ng xi18n --outFile ../i18n/messages.xlf && xliffmerge", | ||
"fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"", | ||
"fix:backend": "golangci-lint run -c .golangci.yml --fix src/app/backend/...", | ||
"fix:frontend": "concurrently \"npm run fix:frontend:ts\" \"npm run fix:frontend:scss\" \"npm run fix:frontend:html\"", | ||
... | ... | @@ -50,7 +50,7 @@ |
"fix:frontend:scss": "scssfmt -r 'src/**/*.scss'", | ||
"fix:frontend:html": "./aio/scripts/format.sh --html", | ||
"fix:license": "gulp update-license-headers", | ||
"fix:i18n": "ng xi18n --outFile ../i18n/messages.xlf", | ||
"fix:i18n": "ng xi18n --outFile ../i18n/messages.xlf && xliffmerge", | ||
"clean": "rm -rf .go_workspace .tmp coverage dist npm-debug.log", | ||
"postversion": "node aio/scripts/version.js", | ||
"postinstall": "node aio/scripts/version.js && ./node_modules/protractor/bin/webdriver-manager update --gecko=false --versions.standalone=3.141.59 && curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1" | ||
... | ... | @@ -78,6 +78,16 @@ |
"git add" | ||
] | ||
}, | ||
"xliffmergeOptions": { | ||
"srcDir": "i18n", | ||
"genDir": "i18n", | ||
"defaultLanguage": "en", | ||
"languages": [ | ||
"fr", | ||
"ja" | ||
], | ||
"beautifyOutput": true | ||
}, | ||
"dependencies": { | ||
"@angular/animations": "8.0.3", | ||
"@angular/cdk": "8.0.2", | ||
... | ... | @@ -154,6 +164,7 @@ |
"lodash": "4.17.11", | ||
"minimatch": "3.0.4", | ||
"minimist": "1.2.0", | ||
"ngx-i18nsupport": "^0.17.1", | ||
"node-gyp": "5.0.2", | ||
"node-sass": "4.12.0", | ||
"protractor": "5.4.1", | ||
... | ... |
想要评论请 注册 或 登录