Skip to content

Commit

Permalink
[FIX] Angular5 AOT bug and warning during publish
Browse files Browse the repository at this point in the history
[FIX] Missing Portuguese language translation
  • Loading branch information
Ebenezer Monney committed Dec 12, 2017
1 parent 3313612 commit 12ec05c
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/QuickApp/ClientApp/app/assets/locale/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"English": "الإنجليزية",
"French": "الفرنسية",
"German": "الألمانية",
"Portuguese": "البرتغالية",
"Arabic": "العربية",
"Korean": "الكورية",
"LanguageHint": "اختيار اللغة المفضلة لحسابك",
Expand Down
1 change: 1 addition & 0 deletions src/QuickApp/ClientApp/app/assets/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"English": "English",
"French": "Französisch",
"German": "Deutsch",
"Portuguese": "Portugiesisch",
"Arabic": "Arabisch",
"Korean": "Koreanisch",
"LanguageHint": "Die bevorzugte Anzeigesprache auswählen",
Expand Down
1 change: 1 addition & 0 deletions src/QuickApp/ClientApp/app/assets/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"English": "English",
"French": "French",
"German": "German",
"Portuguese": "Portuguese",
"Arabic": "Arabic",
"Korean": "Korean",
"LanguageHint": "Select the preferred language for your account",
Expand Down
1 change: 1 addition & 0 deletions src/QuickApp/ClientApp/app/assets/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"English": "Anglais",
"French": "Français",
"German": "Allemand",
"Portuguese": "Portugais",
"Arabic": "Arabe",
"Korean": "Coréen",
"LanguageHint": "Sélectionnez la langue préférée pour votre compte",
Expand Down
1 change: 1 addition & 0 deletions src/QuickApp/ClientApp/app/assets/locale/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"English": "영어",
"French": "프랑스 국민",
"German": "독일어",
"Portuguese": "포르투갈 인",
"Arabic": "아라비아 말",
"Korean": "한국어",
"LanguageHint": "계정의 기본 언어 선택",
Expand Down
2 changes: 1 addition & 1 deletion src/QuickApp/ClientApp/app/assets/locale/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
"English": "English",
"French": "Français",
"German": "Deutsche",
"Portuguese": "Português",
"Arabic": "عربى",
"Korean": "한국어",
"Portuguese": "Português",
"LanguageHint": "Selecione seu idioma",
"HomePage": "Principal:",
"Dashboard": "Painel de Controle",
Expand Down
2 changes: 1 addition & 1 deletion src/QuickApp/ClientApp/app/components/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class AppComponent implements OnInit, AfterViewInit {

storageManager.initialiseStorageSyncListener();

translationService.addLanguages(["en", "fr", "de", "ar", "ko", "pt"]);
translationService.addLanguages(["en", "fr", "de", "pt", "ar", "ko"]);
translationService.setDefaultLanguage('en');


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<option data-subtext="(Default)" value="en">{{'preferences.English' | translate}}</option>
<option value="fr">{{'preferences.French' | translate}}</option>
<option value="de">{{'preferences.German' | translate}}</option>
<option value="pt">{{'preferences.Portuguese' | translate}}</option>
<option value="ar">{{'preferences.Arabic' | translate}}</option>
<option value="ko">{{'preferences.Korean' | translate}}</option>
<option value="pt">{{'preferences.Portuguese' | translate}}</option>
</select>
</div>
<div class="col-sm-5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ export class TranslateLanguageLoader implements TranslateLoader {
return Observable.of(require("../assets/locale/fr.json"));
case "de":
return Observable.of(require("../assets/locale/de.json"));
case "pt":
return Observable.of(require("../assets/locale/pt.json"));
case "ar":
return Observable.of(require("../assets/locale/ar.json"));
case "ko":
return Observable.of(require("../assets/locale/ko.json"));
case "pt":
return Observable.of(require("../assets/locale/pt.json"));
default:
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/QuickApp/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const AotPlugin = require('@ngtools/webpack').AotPlugin;
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;

module.exports = (env) => {
Expand All @@ -25,7 +25,7 @@ module.exports = (env) => {
},
module: {
rules: [
{ test: /\.ts$/, use: isDevBuild ? ['awesome-typescript-loader?silent=true', 'angular2-template-loader'] : '@ngtools/webpack' },
{ test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, use: isDevBuild ? ['awesome-typescript-loader?silent=true', 'angular2-template-loader'] : '@ngtools/webpack' },
{ test: /\.html$/, use: 'html-loader?minimize=false' },
{ test: /\.css$/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize'] },
{ test: /\.scss$/, use: ['to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize', 'sass-loader'] },
Expand Down Expand Up @@ -54,7 +54,7 @@ module.exports = (env) => {
] : [
// Plugins that apply in production builds only
new webpack.optimize.UglifyJsPlugin(),
new AotPlugin({
new AngularCompilerPlugin({
tsConfigPath: './tsconfig.json',
entryModule: path.join(__dirname, 'ClientApp/app/app.module#AppModule')
})
Expand Down
2 changes: 1 addition & 1 deletion src/QuickApp/webpack.config.vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = (env) => {
plugins: [
new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery' }), // Maps these identifiers to the jQuery package (because Bootstrap expects it to be a global variable)
new webpack.ContextReplacementPlugin(/\@angular\b.*\b(bundles|linker)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/11580
new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)@angular/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898
new webpack.ContextReplacementPlugin(/angular(\\|\/)core(\\|\/)(@angular|esm5)/, path.join(__dirname, './ClientApp')), // Workaround for https://github.com/angular/angular/issues/14898
new webpack.IgnorePlugin(/^vertx$/) // Workaround for https://github.com/stefanpenner/es6-promise/issues/100
]
};
Expand Down

0 comments on commit 12ec05c

Please sign in to comment.