【问题标题】:Property i18n is not allowed不允许使用属性 i18n
【发布时间】:2021-04-04 01:48:56
【问题描述】:

当本地化 Angular 应用程序并在 angular.json 文件中添加属性时,它会给出以下警告。

项目下:不允许使用属性 i18n。

"i18n": {
    "sourceLocale": "en-US",
    "locales": {
        "ru": "src/i18n/messages.ru.xlf"
    }
}

在 project/architect/build/configurations 下:不允许本地化属性。

"ru": {
    "localize": ["ru"]
}

同时,ng serve 提供了这个错误。

Data path ".projects['xxx']" should NOT have additional properties(i18n).

【问题讨论】:

标签: angular angular-material angular-ui-router


【解决方案1】:

看起来您使用的是 Angular 9(或更高版本)的本地化教程,但您当前的存储库是 Angular 8(或更低版本)。

【讨论】:

    猜你喜欢
    • 2014-05-29
    • 2014-05-23
    • 1970-01-01
    • 1970-01-01
    • 2021-05-13
    • 2011-05-06
    • 2011-03-30
    • 2020-10-01
    • 2015-10-19
    相关资源
    最近更新 更多