diff --git a/ui-ngx/angular.json b/ui-ngx/angular.json index a875eed727..5f43710552 100644 --- a/ui-ngx/angular.json +++ b/ui-ngx/angular.json @@ -140,7 +140,8 @@ "ace", "ace-builds", "diff-match-patch", - "tv4" + "tv4", + "@messageformat/parse" ] }, "configurations": { diff --git a/ui-ngx/src/app/core/translate/translate-default-compiler.ts b/ui-ngx/src/app/core/translate/translate-default-compiler.ts index 67074479ff..739621eaca 100644 --- a/ui-ngx/src/app/core/translate/translate-default-compiler.ts +++ b/ui-ngx/src/app/core/translate/translate-default-compiler.ts @@ -45,7 +45,7 @@ export class TranslateDefaultCompiler extends TranslateMessageFormatCompiler { if (typeof src !== 'object') { if (this.checkIsPlural(src)) { try { - return super.compile(src, lang); + return super.compile(src, lang.replace('_', '-')); } catch (e) { console.warn('Failed compile translate:', src, e); return src;