From 42f15ce636e1e509b196d96055289d50adb0e5ad Mon Sep 17 00:00:00 2001 From: Yi DENG Date: Wed, 27 Mar 2019 14:19:32 +0800 Subject: [PATCH] =?UTF-8?q?CA=20Management:=20content=20bilingual=E3=80=82?= =?UTF-8?q?=20=20#202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yi DENG --- src/common/common.js | 11 ++++++++++ src/common/common_cn.js | 11 ++++++++++ src/components/content/CARegisterContent.jsx | 21 ++++++++++---------- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/common/common.js b/src/common/common.js index 6b563a9..c07f86a 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -58,7 +58,18 @@ Common.LOGIN_ORDERER_SSL_TARGET = 'Orderer SSL Target'; Common.LOGIN_CA_SERVER_URL = 'CA Server Url'; // user register page +Common.REGISTER = 'REGISTER'; Common.REGISTER_USERNAME = 'User Name'; +Common.REGISTER_AFFILIATION = 'Affiliation'; +Common.REGISTER_ROLE = 'Role'; +Common.REGISTER_OPTIONAL = 'Optional'; +Common.REGISTER_CONFIRM = 'Register'; + +Common.ENROLL = 'ENROLLMENT'; +Common.ENROLL_USERNAME = 'User Name'; +Common.ENROLL_PASSWORD = 'Password'; +Common.ENROLL_OPTIONAL = 'Optional'; +Common.ENROLL_CONFIRM = 'Get'; Common.WARN = { chaincodeName: 'chaincode name can not be null!', diff --git a/src/common/common_cn.js b/src/common/common_cn.js index 89776d6..504ed98 100644 --- a/src/common/common_cn.js +++ b/src/common/common_cn.js @@ -56,7 +56,18 @@ Common.LOGIN_ORDERER_SSL_TARGET = '排序节点SSL域名'; Common.LOGIN_CA_SERVER_URL = 'CA节点地址'; // user register page +Common.REGISTER = '注册'; Common.REGISTER_USERNAME = '用户名'; +Common.REGISTER_AFFILIATION = '组织归属'; +Common.REGISTER_ROLE = '角色类型'; +Common.REGISTER_OPTIONAL = '其他属性'; +Common.REGISTER_CONFIRM = '注册'; + +Common.ENROLL = '证书私钥获取'; +Common.ENROLL_USERNAME = '用户名'; +Common.ENROLL_PASSWORD = '密码'; +Common.ENROLL_OPTIONAL = '其他属性'; +Common.ENROLL_CONFIRM = '获取'; Common.WARN = { chaincodeName: '链码名称不能为空!', diff --git a/src/components/content/CARegisterContent.jsx b/src/components/content/CARegisterContent.jsx index 279745e..379869c 100644 --- a/src/components/content/CARegisterContent.jsx +++ b/src/components/content/CARegisterContent.jsx @@ -8,7 +8,6 @@ import { getFabricClientSingleton } from '../../util/fabric'; const { TextArea } = Input; const logger = require('electron-log'); -// TODO: 多语言支持 /** * register参数:用户名、affiliation, role等等 * enroll参数:用户名、密码 @@ -191,7 +190,7 @@ export default class CARegisterContent extends React.Component { return (
-
注册
+
{this.state.Common.REGISTER}
* {this.state.Common.REGISTER_USERNAME} @@ -199,20 +198,20 @@ export default class CARegisterContent extends React.Component {
* - 组织归属 + {this.state.Common.REGISTER_AFFILIATION}
* - 角色类型 + {this.state.Common.REGISTER_ROLE}
- 其他属性 + {this.state.Common.REGISTER_OPTIONAL}
- +