diff --git a/angular.json b/angular.json index 270566b61..c9a13c67d 100644 --- a/angular.json +++ b/angular.json @@ -9,6 +9,19 @@ "root": "", "sourceRoot": "src", "prefix": "app", + "i18n": { + "sourceLocale": "en-US", + "locales": { + "pt": { + "translation": "src/locales/messages.pt.xlf", + "baseHref": "" + }, + "en": { + "translation": "src/locales/messages.en.xlf", + "baseHref": "" + } + } + }, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", @@ -66,17 +79,13 @@ ] }, "en": { - "aot": true, - "i18nFile": "src/locales/messages.en.xlf", - "i18nFormat": "xlf", - "i18nLocale": "en", + "localize": ["en"], + "outputPath": "dist/en/", "i18nMissingTranslation": "error" }, "pt": { - "aot": true, - "i18nFile": "src/locales/messages.pt.xlf", - "i18nFormat": "xlf", - "i18nLocale": "pt", + "localize": ["pt"], + "outputPath": "dist/pt/", "i18nMissingTranslation": "error" }, "es5": { diff --git a/package.json b/package.json index 0ebce90f8..49d34fd69 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "lint": "ng lint", "e2e": "ng e2e", "int:extract": "ng xi18n --output-path src/locales", - "build-locale:en": "ng build --aot --prod --i18n-locale=en --i18n-format=xlf --i18n-file=src/locales/messages.en.xlf --output-path=dist/en --base-href /en/", - "build-locale:pt": "ng build --aot --prod --i18n-locale=pt --i18n-format=xlf --i18n-file=src/locales/messages.pt.xlf --output-path=dist/pt --base-href /pt/", + "build-locale:en": "ng build --prod --configuration=en", + "build-locale:pt": "ng build --prod --configuration=pt", "build-locale": "npm run build-locale:en && npm run build-locale:pt" }, "private": true, @@ -71,4 +71,4 @@ "tslint": "~5.18.0", "typescript": "~4.0.8" } -} \ No newline at end of file +}