UI: Fixed default translate compiler lang

This commit is contained in:
Vladyslav_Prykhodko 2023-03-03 18:05:01 +02:00
parent 62af087e1b
commit 47f74d9956
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -45,7 +45,7 @@ export class TranslateDefaultCompiler extends TranslateMessageFormatCompiler {
if (typeof src !== 'object') { if (typeof src !== 'object') {
if (this.checkIsPlural(src)) { if (this.checkIsPlural(src)) {
try { try {
return super.compile(src, lang); return super.compile(src, lang.replace('_', '-'));
} catch (e) { } catch (e) {
console.warn('Failed compile translate:', src, e); console.warn('Failed compile translate:', src, e);
return src; return src;