Browse Source

UI: Fixed default translate compiler lang

pull/8170/head
Vladyslav_Prykhodko 4 years ago
parent
commit
47f74d9956
  1. 3
      ui-ngx/angular.json
  2. 2
      ui-ngx/src/app/core/translate/translate-default-compiler.ts

3
ui-ngx/angular.json

@ -140,7 +140,8 @@
"ace",
"ace-builds",
"diff-match-patch",
"tv4"
"tv4",
"@messageformat/parse"
]
},
"configurations": {

2
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;

Loading…
Cancel
Save