|
@@ -101,7 +101,7 @@ define([ "require", "utils/Globals", "pnotify", "utils/Messages", "utils/Enums",
|
|
|
modal.stack = myStack;
|
|
|
}
|
|
|
notify(_.extend({
|
|
|
- title: "Confirmation",
|
|
|
+ title: "确定",
|
|
|
hide: !1,
|
|
|
confirm: {
|
|
|
confirm: !0,
|
|
@@ -153,7 +153,7 @@ define([ "require", "utils/Globals", "pnotify", "utils/Messages", "utils/Enums",
|
|
|
} else skipDefaultError !== !0 && Utils.serverErrorHandler(error, defaultErrorMessage); else skipDefaultError !== !0 && Utils.serverErrorHandler(error, defaultErrorMessage);
|
|
|
}, Utils.serverErrorHandler = function(response, defaultErrorMessage) {
|
|
|
var responseJSON = response ? response.responseJSON : response, message = defaultErrorMessage ? defaultErrorMessage : Messages.defaultErrorMessage;
|
|
|
- response && responseJSON && (message = responseJSON.errorMessage || responseJSON.message || responseJSON.error || message);
|
|
|
+ response && responseJSON && (message = Utils.replaceToChinese(responseJSON.errorMessage) || responseJSON.message || responseJSON.error || message);
|
|
|
var existingError = $(".ui-pnotify-container.alert-danger .ui-pnotify-text").text();
|
|
|
existingError !== message && Utils.notifyError({
|
|
|
content: message
|
|
@@ -618,5 +618,11 @@ define([ "require", "utils/Globals", "pnotify", "utils/Messages", "utils/Enums",
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ Utils.replaceToChinese = function(name) {
|
|
|
+ return name
|
|
|
+ .replace("Names must consist of a letter followed by a sequence of letter, number, space, or _ characters","名称必须由一个字母和一系列字母、数字、空格或_字符组成")
|
|
|
+ .replace("invalid name for CLASSIFICATION.","分类的名称无效。")
|
|
|
+
|
|
|
+ },
|
|
|
Utils;
|
|
|
});
|