Skip to content

Commit

Permalink
(dep) update i18n internationalization lib according to the Migration…
Browse files Browse the repository at this point in the history
… guide
  • Loading branch information
guilhermeborgesbastos committed Jan 10, 2022
1 parent 48e0326 commit c72d1ac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
25 changes: 17 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -71,4 +71,4 @@
"tslint": "~5.18.0",
"typescript": "~4.0.8"
}
}
}

0 comments on commit c72d1ac

Please sign in to comment.