UI: Fixed default translate compiler lang
This commit is contained in:
parent
62af087e1b
commit
47f74d9956
@ -140,7 +140,8 @@
|
|||||||
"ace",
|
"ace",
|
||||||
"ace-builds",
|
"ace-builds",
|
||||||
"diff-match-patch",
|
"diff-match-patch",
|
||||||
"tv4"
|
"tv4",
|
||||||
|
"@messageformat/parse"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user