From 6c30ab46434cbeeb88d2951174f25586cfc25283 Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 8 Jan 2020 13:56:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9i18n=E7=9A=84=E5=86=99?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i18n/zh_cn.properties | 2 +- private/i18n.ts | 2 +- .../pages/connection/list/list_item/list_item.model.ts | 2 +- src/modules/pages/maintain/forms/form.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/i18n/zh_cn.properties b/i18n/zh_cn.properties index 64b350f..33db53d 100644 --- a/i18n/zh_cn.properties +++ b/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= 月初 diff --git a/private/i18n.ts b/private/i18n.ts index 8c93ffa..97b308f 100644 --- a/private/i18n.ts +++ b/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': '月初', diff --git a/src/modules/pages/connection/list/list_item/list_item.model.ts b/src/modules/pages/connection/list/list_item/list_item.model.ts index 608a428..efc02ca 100644 --- a/src/modules/pages/connection/list/list_item/list_item.model.ts +++ b/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); diff --git a/src/modules/pages/maintain/forms/form.ts b/src/modules/pages/maintain/forms/form.ts index 72159a0..6eec4d3 100644 --- a/src/modules/pages/maintain/forms/form.ts +++ b/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; }