提交 52df4fa9 编写于 作者: NoSubject's avatar NoSubject

增加英文语言包

上级 8642c161
......@@ -65,7 +65,7 @@ if (!window.Promise){
var _href = window.location.href;
var _debug = (_href.indexOf("debugger")!==-1);
var _par = _href.substr(_href.lastIndexOf("?")+1, _href.length);
var _lp = "zh-cn";
var _lp = navigator.language || "zh-cn";
if (_par){
var _parList = _par.split("&");
for (var i=0; i<_parList.length; i++){
......@@ -85,6 +85,10 @@ if (!window.Promise){
"isDebugger": _debug,
"path": "../o2_core/o2"
};
_lp = _lp.toLowerCase();
var supportedLanguages = ["zh-cn", "en"];
if (supportedLanguages.indexOf(_lp)==-1) _lp = "zh-cn";
this.o2.language = _lp;
this.o2.splitStr = /\s*(?:,|;)\s*/;
......
......@@ -140,6 +140,7 @@ o2.LP.desktop = {
"showMessage": "消息",
"logout": "注销",
"userConfig": "个人设置",
"userLanguage": "语言设置",
"application": "组件",
"widget": "小工具",
"process": "应用",
......
......@@ -524,6 +524,13 @@ o2.xDesktop.Default = new Class({
var img = this.path+this.options.style+"/icons/config.png";
this.userMenu.addMenuItem(o2.LP.desktop.userConfig, "click", function(e){this.userConfig(e);}.bind(this), img);
// var lpMenu = new o2.xDesktop.Menu(this.userInforNode, {
// "event": "click", "style": "flatUser", "offsetX": 30, "offsetY":6, "container": this.node
// });
//
// img = this.path+"/lp/zh-cn.png";
// var lp = this.userMenu.addMenuMenu(o2.LP.desktop.userLanguage, "click", function(e){this.userConfig(e);}.bind(this), img);
this.userMenu.addMenuLine();
img = this.path+this.options.style+"/icons/logout.png";
......
......@@ -67,7 +67,7 @@
}
.o2_profile_inforIconChange {
margin: 22px 10px;
margin: 16px 10px;
cursor: pointer;
float: left;
border: 1px solid #999;
......
......@@ -61,29 +61,29 @@
float: left;
}
.o2_profile_inforIconContent {
width: 100px;
height: 100px;
width: 80px;
height: 80px;
margin: auto;
}
.o2_profile_inforIconContentImg {
border: 0px;
width: 100px;
height: 100px;
width: 80px;
height: 80px;
border-radius: 166.67px;
}
.o2_profile_inforIconChange {
cursor: pointer;
margin: 22px auto;
margin: 16px auto;
width: 90px;
height: 36px;
height: 30px;
border: 1px solid #4A90E2;
border-radius: 100px;
font-family: MicrosoftYaHei;
font-size: 14px;
color: #4A90E2;
line-height: 36px;
line-height: 30px;
text-align: center;
}
.o2_profile_inforContent {
......@@ -110,18 +110,24 @@
.o2_profile_inforContentInput {
background-color: #FFF;
background: #FFFFFF;
border: 1px solid #DEDEDE;
border-radius: 100px;
width:77%;
min-width: 300px;
height: 32px;
font-family: MicrosoftYaHei;
font-size: 14px;
color: #666666;
padding: 0 0 0 8px;
outline:none;
}
.o2_profile_inforContentSelect {
border: 1px solid #DEDEDE;
border-radius: 100px;
height: 32px;
font-size: 14px;
color: #666666;
padding: 0 0 0 8px;
}
.o2_profile_signature{
......
......@@ -67,6 +67,12 @@
<input class="o2_profile_inforContentInput" value="{{$.data.ipAddress}}" placeholder="{{$.lp.ipAddressPlaceHolder}}"/>
</div>
</div>
<div class="o2_profile_inforLine">
<div class="o2_profile_inforTitle">{{ $.lp.language }}</div>
<div class="o2_profile_inforContent">
<input class="o2_profile_inforContentInput" value="{{$.data.ipAddress}}" placeholder="{{$.lp.ipAddressPlaceHolder}}"/>
</div>
</div>
<div class="o2_profile_inforLine">
<div class="o2_profile_saveInforAction">{{ $.lp.saveInfor }}</div>
......
......@@ -68,6 +68,15 @@
</div>
</div>
<div class="o2_profile_inforLine">
<div class="o2_profile_inforTitle">{{ $.lp.language }}</div>
<div class="o2_profile_inforContent">
<select class="o2_profile_inforContentSelect">
<option>简体中文</option>
</select>
</div>
</div>
<div class="o2_profile_inforLine">
<div class="o2_profile_saveInforAction">{{ $.lp.saveInfor }}</div>
</div>
......
......@@ -71,7 +71,7 @@ MWF.xApplication.Profile.Main = new Class({
this.getSiblings().map(function(otabNode) {
otabNode.getChildren().removeClass("mainColor_color");
})
});
}.bind(tabNode));
}.bind(this));
......@@ -131,6 +131,14 @@ MWF.xApplication.Profile.Main = new Class({
this.removeClass("mainColor_border mainColor_color");
});
this.languageSelectNode = this.tab.pages[0].contentNode.getElement("select");
this.languageSelectNode.empty();
if (!this.personData.language) this.personData.language = "zh-cn";
Object.keys(this.lp.lps).each(function(key){
var option = new Element("option", {"value": key, "text": this.lp.lps[key]}).inject(this.languageSelectNode);
if (this.personData.language === key) option.set("selected", true);
}.bind(this));
this.content.getElement(".o2_profile_saveInforAction").addEvent("click", function(){
this.savePersonInfor();
}.bind(this));
......@@ -840,6 +848,8 @@ MWF.xApplication.Profile.Main = new Class({
this.personData.qq = this.qqInputNode.get("value");
this.personData.ipAddress = this.ipAddressInputNode.get("value");
this.personData.signature = this.signatureInputNode.get("value");
this.personData.language = this.languageSelectNode.options[this.languageSelectNode.selectedIndex].value;
this.action.updatePerson(this.personData, function(){
this.notice(this.lp.saveInforOk, "success");
}.bind(this));
......
......@@ -4,101 +4,107 @@ MWF.xApplication.Profile.LP = {
"layoutConfig": "UI",
"ideaConfig": "Opinion",
"passwordConfig": "Password",
"facelogin": "Face Login",
"openFaceSet": "Open FaceSet",
"ssoConfig": "SSO",
"facelogin": "FaceLogin",
"openFaceSet": "click here, Open FaceSet",
"clear": "清除界面数据",
"setDefault": "设置为默认界面",
"clearDefault": "清除默认界面",
"setForce": "设置强制打开应用",
"clearForce": "清除强制打开应用",
"setDefaultOk": "已设置为默认界面",
"setForceOk": "已设置强制打开应用",
"clearok": "桌面缓存记录已清除",
"saveIdea": "保存常用意见",
"saveIdeaDefault": "保存为默认常用意见",
"ideaSaveOk": "常用意见保存完成",
"clear": "Clear ui config data",
"setDefault": "Set as the default ui config",
"clearDefault": "Clear default ui config data",
"setForce": "Set force to open the application",
"clearForce": "Clear forced open application",
"setDefaultOk": "The default ui config has been set",
"setForceOk": "Forced to open the app has been set",
"clearok": "Desktop cache record has been cleared",
"saveIdea": "Save frequently opinions",
"saveIdeaDefault": "Save as default opinions",
"ideaSaveOk": "Frequently opinions saved",
"icon": "头像",
"changeIcon": "更换头像",
"name": "姓名",
"employee": "工号",
"display": "昵称",
"officePhone": "办公电话",
"mail": "邮件地址",
"mobile": "手机号码",
"weixin": "微信号",
"icon": "Avatar",
"changeIcon": "Change",
"name": "Name",
"employee": "Employee",
"display": "Nickname",
"officePhone": "OfficePhone",
"mail": "Mail",
"mobile": "Cellphone",
"weixin": "Wechat",
"QQ": "QQ",
"signature": "个人签名",
"saveInfor": "保存个人信息",
"saveInforOk": "保存个人信息成功",
"ipAddress" : "登录IP",
"ipAddressPlaceHolder" : "如果不为空,匹配的ip地址才能登录该账号,用“,”分隔多值",
"ipAddressIncorrectNotice" : "IP地址格式不正确:",
"signature": "Signature",
"saveInfor": "Save personal information",
"saveInforOk": "Personal information saved successfully",
"ipAddress" : "Login IP",
"ipAddressPlaceHolder" : "If it is not empty, only the matching ip address can log in to the account. Separate multiple values with \",\"",
"ipAddressIncorrectNotice" : "IP address format is incorrect:",
"language": "Language",
"lps": {
"zh-cn": "简体中文",
"en": "English(US)"
},
"passwordRule" : "密码规则",
"oldPassword": "原密码",
"password": "新密码",
"morePassword": "确认密码",
"passwordNotMatch": "新密码与确认密码不一致",
"changePasswordOk": "密码修改成功",
"passwordRule" : "Password rules",
"oldPassword": "Old password",
"password": "New password",
"morePassword": "Confirm password",
"passwordNotMatch": "The new password does not match the confirmed password",
"changePasswordOk": "Password reset complete",
"changePersonIcon": "修改个人头像",
"changePersonIcon": "Change Avatar",
"layoutAction": "界面操作",
"desktopBackground": "桌面背景",
"paswordRule" : "6位以上,包含数字和字母.",
"weak" : "",
"middle" : "",
"high" : "",
"layoutAction": "UI operation",
"desktopBackground": "Desktop background",
"paswordRule" : "6 or more digits, including numbers and letters.",
"weak" : "weak",
"middle" : "middle",
"high" : "high",
"empower":{
"fromPerson":"人员",
"fromIdentity":"身份",
"toPerson":"委托人员",
"toIdentity":"委托身份",
"application":"应用",
"applicationName":"应用名称",
"applicationAlias":"应用别名",
"process":"流程ID",
"processName":"流程名称",
"processAlias":"流程别名",
"type":"授权类型",
"startTime":"授权开始时间",
"completedTime":"授权结束时间",
"emPowerConfig": "外出授权",
"addEmPower": "新增",
"myEmPower": "我的委托",
"receiveEmPower": "收到的委托",
"ok":"保存",
"cancel":"关闭",
"noData":"暂时没有委托",
"withdraw":"撤回",
"alert1":"请选择流程或应用",
"alert2":"请联系管理员添加身份信息!",
"withdrawOk":"撤回委托成功",
"selectEmPower":"请选择委托",
"saveOk":"保存成功",
"type_all":"全部",
"type_application":"应用",
"type_process":"流程",
"type_filter":"文件类型",
"saveNotAll":"部分保存失败",
"title":"标题",
"activityName":"状态",
"createTime":"委托时间",
"edit":"编辑",
"editEmpower":"编辑外出授权",
"enable":"启用",
"disable":"禁用"
"fromPerson":"Person",
"fromIdentity":"Identity",
"toPerson":"EmpoweredPerson",
"toIdentity":"EmpoweredIdentity",
"application":"Application",
"applicationName":"Application Name",
"applicationAlias":"Application Alias",
"process":"Process",
"processName":"Process Name",
"processAlias":"Process Alias",
"type":"Type",
"startTime":"Start Time",
"completedTime":"Completed Time",
"emPowerConfig": "Empowerment",
"addEmPower": "create",
"myEmPower": "My Empowerment",
"receiveEmPower": "Empowered to me",
"ok":"Save",
"cancel":"Cancel",
"noData":"No Empowerment",
"withdraw":"Withdraw",
"alert1":"Please select a process or application",
"alert2":"Please contact the administrator to add identity information!",
"withdrawOk":"Withdraw the empowerment successfully",
"selectEmPower":"Select the empowerment",
"saveOk":"Saved successfully",
"type_all":"All",
"type_application":"Application",
"type_process":"Process",
"type_filter":"File type",
"saveNotAll":"Partial save failed",
"title":"Title",
"activityName":"Activity",
"createTime":"Commission time",
"edit":"Edit",
"editEmpower":"Edit empowerment",
"enable":"Enable",
"disable":"Disable"
},
"emPowerConfig": "外出授权",
"addEmPower": "新增",
"myEmPower": "我的委托",
"receiveEmPower": "收到的委托",
"myEmPowerLog": "委托的待办",
"receiveEmPowerLog": "收到的待办",
"ok":"保存",
"cancel":"关闭"
"emPowerConfig": "Empower",
"addEmPower": "create",
"myEmPower": "My Empowerment",
"receiveEmPower": "Empowered to me",
"myEmPowerLog": "Empowered Task",
"receiveEmPowerLog": "Empowered Task received",
"ok":"Save",
"cancel":"Cancel"
};
......@@ -6,7 +6,7 @@ MWF.xApplication.Profile.LP = {
"passwordConfig": "修改密码",
"ssoConfig": "单点登录",
"facelogin": "人脸登录",
"openFaceSet": "打开人脸登录设置",
"openFaceSet": "点击此处,打开人脸登录设置",
"clear": "清除界面数据",
"setDefault": "设置为默认界面",
......@@ -36,6 +36,11 @@ MWF.xApplication.Profile.LP = {
"ipAddress" : "登录IP",
"ipAddressPlaceHolder" : "如果不为空,匹配的ip地址才能登录,用,分隔多值",
"ipAddressIncorrectNotice" : "IP地址格式不正确:",
"language": "语言设置",
"lps": {
"zh-cn": "简体中文",
"en": "English(US)"
},
"passwordRule" : "密码规则",
"oldPassword": "原密码",
......
......@@ -17,7 +17,7 @@
// },
{
"title": "代理配置",
"title": MWF.xApplication.service.ServiceManager.LP.agent.name,
"id": "1.1",
"action": "agentConfig",
"icon": "agent_script.png",
......@@ -25,7 +25,7 @@
"sub": []
},
{
"title": "接口配置",
"title": MWF.xApplication.service.ServiceManager.LP.invoke.name,
"id": "1.1",
"action": "invokeConfig",
"icon": "agent_script.png",
......
MWF.xApplication.service = MWF.xApplication.service || {};
MWF.xApplication.service.ServiceManager = MWF.xApplication.service.ServiceManager || {};
MWF.xApplication.service.ServiceManager.LP = {
"title": "Service Platform",
"categoryTitle": "Category",
"description": "Description",
"deleteItems": "Delete selected element",
"copy": "Copy",
"copyto": "Copyto...",
"copyInfor": "Select multiple elements, press Ctrl+C to copy the elements, press Ctrl+V to paste elements into the current application",
"copyed": "The selected element has been copied",
"copyConfirmTitle": "Copy element confirmation",
"copyConfirmInfor": "The target area already contains the same elements:",
"copySource": "Original file:",
"copyTarget": "Copy files:",
"copyConfirm_overwrite": "Replace",
"copyConfirm_new": "Create",
"copyConfirm_skip": "Skip",
"copyConfirm_cancel": "Cancel",
"copynew": "New",
"edit": "Edit",
"save": "Save",
"cancel": "Cancel",
"phone": "Phone",
"mail": "Mail",
"deleteElementTitle": "Delete design confirmation",
"deleteElement": "Are you sure you want to delete the selected design element?",
"agent": {
"name": "Agent",
"create": "Create Agent",
"search": "Search Agent",
"searchText": "Please enter key words",
"noAgentNoticeText": "There is no Agent, you can click here to create a new Agent",
"loaded": "Agent loaded",
"deleteProcessTitle": "Delete Agent confirmation",
"deleteProcess": "Are you sure you want to delete the current Agent?",
"noPermission" : "You are not an administrator and cannot view Agents."
},
"invoke": {
"name": "Service",
"create": "Create Service",
"search": "Search Service",
"searchText": "Please enter key words",
"noAgentNoticeText": "There is no Service, you can click here to create a new Service",
"loaded": "Service loaded",
"deleteProcessTitle": "Delete Service confirmation",
"deleteProcess": "Are you sure you want to delete the current Service?",
"noPermission" : "You are not an administrator and cannot view Service."
},
// "application": {
// "inputApplicationName": "Enter the data application name",
// "property": "数据应用属性",
// "name": "数据应用名称",
// "alias": "数据应用别名",
// "description": "数据应用描述",
// "type": "数据应用类型",
// "icon": "数据应用图标",
// "id": "数据应用标识",
// "firstPage": "数据应用主页",
// "controllerList": "管理者",
// "available": "可用范围"
// },
// "createSelectTemplate": "新建:选择模板",
// "templateCategory": "模板分类:",
"all": "All",
"agentConfig" : "Agent Config",
"interfaceConfig" : "Service Config",
"disable" : "Disabled"
};
\ No newline at end of file
......@@ -30,6 +30,7 @@ MWF.xApplication.service.ServiceManager.LP = {
"deleteElement": "是否确定要删除选中的设计元素?",
"agent": {
"name": "代理配置",
"create": "新建代理",
"search": "搜索代理",
"searchText": "请输入关键字",
......@@ -46,6 +47,7 @@ MWF.xApplication.service.ServiceManager.LP = {
},
"invoke": {
"name": "接口配置",
"create": "新建接口",
"search": "搜索接口",
"searchText": "请输入关键字",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册