Browse Source

fix: 修改i18n的写法

research/10.0
alan 5 years ago
parent
commit
6c30ab4643
  1. 2
      i18n/zh_cn.properties
  2. 2
      private/i18n.ts
  3. 2
      src/modules/pages/connection/list/list_item/list_item.model.ts
  4. 4
      src/modules/pages/maintain/forms/form.ts

2
i18n/zh_cn.properties

@ -110,7 +110,7 @@ Dec-Dcm_Connection_Deleted=该数据连接已被删除,无法进行操作
Dec-Dcm_Connection_Click_Connect_Database=点击连接数据库
Dec-Dcm_Connection_Read_Mode_List=以读取模式列表
Dec-Dcm_Connection_NO_Connection_Pool=无数据连接,可在数据连接管理页面添加
Dec-Dcm_Connection_Cannot_Too_Lang=文本长度不能大于150个字符
Dec-Dcm_Connection_Cannot_Too_Lang=文本长度不能大于{R1}个字符
Dec-Dcm_Login_Error=登录信息已失效,请重新登录
BI-Multi_Date_Quarter_End= 季度末
BI-Multi_Date_Month_Begin= 月初

2
private/i18n.ts

@ -109,7 +109,7 @@ export default {
'Dec-Dcm_Connection_Click_Connect_Database': '点击连接数据库',
'Dec-Dcm_Connection_Read_Mode_List': '以读取模式列表',
'Dec-Dcm_Connection_NO_Connection_Pool': '无数据连接,可在数据连接管理页面添加',
'Dec-Dcm_Connection_Cannot_Too_Lang': '文本长度不能大于150个字符',
'Dec-Dcm_Connection_Cannot_Too_Lang': '文本长度不能大于{R1}个字符',
'Dec-Dcm_Login_Error': '登录信息已失效,请重新登录',
'BI-Multi_Date_Quarter_End': '季度末',
'BI-Multi_Date_Month_Begin': '月初',

2
src/modules/pages/connection/list/list_item/list_item.model.ts

@ -67,7 +67,7 @@ export class ListItemModel extends Model<{
}
if (getChartLength(newName) > NAME_MAX_LENGTH) {
return new Promise(resolve => {
resolve({ errorCode: '1', errorMsg: 'Dec-Dcm_Connection_Cannot_Too_Lang' });
resolve({ errorCode: '1', errorMsg: BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang', NAME_MAX_LENGTH) });
});
}
const hasNamed = this.model.connections.some(item => item.connectionName === newName);

4
src/modules/pages/maintain/forms/form.ts

@ -188,7 +188,7 @@ export class MaintainForm extends BI.Widget {
}
}
if (getChartLength(value.connectionName) > NAME_MAX_LENGTH) {
this.setFromError(BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang'));
this.setFromError(BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang', NAME_MAX_LENGTH));
return false;
}
@ -222,7 +222,7 @@ export class MaintainForm extends BI.Widget {
return;
}
if (getChartLength(formValue.connectionName) > NAME_MAX_LENGTH) {
this.setFromError(BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang'));
this.setFromError(BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang', NAME_MAX_LENGTH));
return false;
}

Loading…
Cancel
Save