use of io.github.ihongs.CoreLocale in project HongsCORE by ihongs.
the class DBAction method getRspMsg.
/**
* 获取返回消息
* @param helper
* @param ett
* @param opr
* @param num
* @return
* @throws HongsException
*/
protected String getRspMsg(ActionHelper helper, Model ett, String opr, int num) throws HongsException {
ActionRunner runner = (ActionRunner) helper.getAttribute(ActionRunner.class.getName());
String mod = runner.getModule();
String ent = runner.getEntity();
String cnt = Integer.toString(num);
CoreLocale locale = CoreLocale.getInstance().clone();
locale.fill(mod);
String key = "fore." + opr + "." + ent + ".success";
if (!locale.containsKey(key)) {
key = "fore." + opr + /**/
".success";
}
return locale.translate(key, null, cnt);
}
Aggregations