如何让 xliffmerge 与 angular 8 一起工作?
How to have xliffmerge work with angular 8?
如文档中所写,我已经安装了来自@ngx-i18nsupport 的工具:
设置所有内容并在 5 月 package.json 归档以下脚本:
"extract-i18n": "ng xi18n IOCheck --i18n-format xlf
--output-path i18n --i18n-locale fr && xliffmerge"
当 运行 脚本收到以下错误消息时:
An unhandled exception occurred: No projects support the 'extract-i18n' target.
See "/private/var/folders/3v/77qlrbxn15174h43y9qs7v8w0000gn/T/ng-TFnOne/angular-errors.log" for further details.
所以我检查了 angular.json,文件似乎没问题:
xliffmerge 在命令行中运行良好...
任何帮助将不胜感激。
谢谢
它的翻译工作基于这种方式
您现在会在 src/i18n
下找到 3 个文件
1)messages.xlf:包含在您的应用中找到的所有消息的主文件。
2)messages.de.xlf:德文版。
3)messages.en.xlf: 英文版(至今未译)
包裹:package.json
{
[...]
"scripts": {
[...]
"extract-i18n": ...,
"start-en": "ng serve --configuration=en"
}
[...]
}
angular: angular.json
.."build": {
"configurations": {
..
"en": {
"aot": true,
"outputPath": "dist/sampleapp-en",
"i18nFile": "src/i18n/messages.en.xlf",
"i18nFormat": "xlf",
"i18nLocale": "en"
}
.."serve": {
..
"configurations": {
..
"en": {
"browserTarget": "sampleapp:build:en"
}
运行
npm run start-en
有关详细信息,请查看此 link xliffmerge
如文档中所写,我已经安装了来自@ngx-i18nsupport 的工具:
设置所有内容并在 5 月 package.json 归档以下脚本:
"extract-i18n": "ng xi18n IOCheck --i18n-format xlf
--output-path i18n --i18n-locale fr && xliffmerge"
当 运行 脚本收到以下错误消息时:
An unhandled exception occurred: No projects support the 'extract-i18n' target.
See "/private/var/folders/3v/77qlrbxn15174h43y9qs7v8w0000gn/T/ng-TFnOne/angular-errors.log" for further details.
所以我检查了 angular.json,文件似乎没问题:
xliffmerge 在命令行中运行良好... 任何帮助将不胜感激。
谢谢
它的翻译工作基于这种方式
您现在会在 src/i18n
下找到 3 个文件1)messages.xlf:包含在您的应用中找到的所有消息的主文件。
2)messages.de.xlf:德文版。
3)messages.en.xlf: 英文版(至今未译)
包裹:package.json
{
[...]
"scripts": {
[...]
"extract-i18n": ...,
"start-en": "ng serve --configuration=en"
}
[...]
}
angular: angular.json
.."build": {
"configurations": {
..
"en": {
"aot": true,
"outputPath": "dist/sampleapp-en",
"i18nFile": "src/i18n/messages.en.xlf",
"i18nFormat": "xlf",
"i18nLocale": "en"
}
.."serve": {
..
"configurations": {
..
"en": {
"browserTarget": "sampleapp:build:en"
}
运行
npm run start-en
有关详细信息,请查看此 link xliffmerge