[Fix] Fixed requestErrorToMsg for missing values of i18n
This commit is contained in:
parent
fedc2824f6
commit
b1ff39501b
|
@ -367,10 +367,12 @@
|
||||||
|
|
||||||
if (response && response.i18n) {
|
if (response && response.i18n) {
|
||||||
var args = [response.i18n.key];
|
var args = [response.i18n.key];
|
||||||
Object.keys(response.i18n.values).forEach(function (key) {
|
if (response.i18n.values != null) {
|
||||||
args.push(key);
|
Object.keys(response.i18n.values).forEach(function (key) {
|
||||||
args.push(response.i18n.values[key]);
|
args.push(key);
|
||||||
});
|
args.push(response.i18n.values[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
msg = this.localize.apply(this, args);
|
msg = this.localize.apply(this, args);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -382,10 +384,12 @@
|
||||||
|
|
||||||
if (json && json.i18n) {
|
if (json && json.i18n) {
|
||||||
var args = [json.i18n.key];
|
var args = [json.i18n.key];
|
||||||
Object.keys(json.i18n.values).forEach(function (key) {
|
if (json.i18n.values != null) {
|
||||||
args.push(key);
|
Object.keys(json.i18n.values).forEach(function (key) {
|
||||||
args.push(json.i18n.values[key]);
|
args.push(key);
|
||||||
});
|
args.push(json.i18n.values[key]);
|
||||||
|
});
|
||||||
|
}
|
||||||
msg = this.localize.apply(this, args);
|
msg = this.localize.apply(this, args);
|
||||||
} else if (json.msg) {
|
} else if (json.msg) {
|
||||||
msg = json.msg;
|
msg = json.msg;
|
||||||
|
|
Loading…
Reference in New Issue