Commit fba08e91 authored by Lu Xu's avatar Lu Xu 👀 Committed by Rafael Monnerat

slapos_jio: fix untranslated words

parent 82328d7f
......@@ -33,6 +33,7 @@
data-i18n=Monitoring Status
data-i18n=Supplied Softwares
data-i18n=Computer:
data-i18n=Associated Tickets
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
......
......@@ -235,7 +235,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.16656.9604.44475</string> </value>
<value> <string>983.7927.45169.51575</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -253,7 +253,7 @@
</tuple>
<state>
<tuple>
<float>1583944820.18</float>
<float>1588211147.74</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -116,7 +116,8 @@
"Current Project",
"Monitoring Status",
"Supplied Softwares",
"Computer:"
"Computer:",
"Associated Tickets"
];
// Follow up changeState API but it is requires to actually
......@@ -337,7 +338,7 @@
"search_column_list": ticket_column_list,
"sort_column_list": ticket_column_list,
"sort": [["title", "ascending"]],
"title": "Associated Tickets",
"title": results[2][32],
"type": "ListBox"
}
}},
......
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.32516.46874.3959</string> </value>
<value> <string>983.35495.60634.48964</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -276,7 +276,7 @@
</tuple>
<state>
<tuple>
<float>1584116948.47</float>
<float>1588211215.95</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -15,9 +15,9 @@
.declareAcquiredMethod("jio_get", "jio_get")
.declareAcquiredMethod("jio_putAttachment", "jio_putAttachment")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("getTranslationList", "getTranslationList")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("translate", "translate")
/////////////////////////////////////////////////////////////////
// declared methods
......@@ -43,7 +43,7 @@
});
})
.push(function () {
return gadget.notifySubmitted({message: 'New service created.', status: 'success'})
return gadget.notifySubmitted({message: gadget.message_tranlation, status: 'success'})
.push(function () {
// Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change",
......@@ -62,7 +62,24 @@
// (gadget.redirect is actually waiting indefinitely) so that parent is
// happy and doesn't try to call render again
.declareMethod("render", function (options) {
return this.changeState(options);
var gadget = this,
translation_list = [
"New service created.",
"Intent not supported",
"Requesting a service…",
"Instance"
];
return new RSVP.Queue()
.push(function () {
gadget.change.changeState(options);
gadget.getTranslationList(translation_list);
})
.push(function (result) {
gadget.message_tranlation = result[1][0];
gadget.error_translation = result[1][1];
gadget.page_title_translation = result[1][2];
gadget.software_title_translation = result[1][3];
});
})
.onStateChange(function (options) {
this.deferRender(options);
......@@ -70,12 +87,12 @@
.declareJob("deferRender", function (options) {
var gadget = this;
if (options.intent !== "request") {
throw new Error(gadget.translate("Intent not supported"));
throw new Error(gadget.error_translation);
}
return new RSVP.Queue()
.push(function () {
return gadget.updateHeader({
page_title: gadget.translate("Requesting a service...")
page_title: gadget.page_title_translation
});
})
.push(function () {
......@@ -107,7 +124,7 @@
url = result[2],
doc = {
url_string: software_release.url_string,
title: options.software_title || "Instance {uid}",
title: options.software_title ? options.software_title: gadget.software_title_translation + "{uid}",
relative_url: options.jio_key
};
if (options.software_type) {
......@@ -143,7 +160,7 @@
url + doc.relative_url + "/SoftwareRelease_requestHostingSubscription?" + query.join("&"));
})
.push(function (key) {
return gadget.notifySubmitted({message: gadget.translate("New service created."), status: 'success'})
return gadget.notifySubmitted({message: gadget.message_tranlation, status: 'success'})
.push(function () {
// Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change",
......@@ -152,4 +169,4 @@
});
});
});
}(window, rJS, RSVP));
\ No newline at end of file
}(window, rJS, RSVP));
......@@ -274,7 +274,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.28174.43584.33024</string> </value>
<value> <string>983.44175.11938.2184</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -292,7 +292,7 @@
</tuple>
<state>
<tuple>
<float>1583839613.96</float>
<float>1588645400.87</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html manifest="gadget_erp5.appcache">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ERP5</title>
<link rel="shortcut icon" href="favicon.ico">
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="URI.js" type="text/javascript"></script>
<script src="jquery.js" type="text/javascript"></script>
<script src="vkbeautify.js" type="text/javascript"></script>
<script src="gadget_erp5_page_slap_parameter_form.js" type="text/javascript"></script>
<link href="gadget_erp5_page_slap_parameter_form.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div>
<fieldset id="software-type">
<div class="field" title="software_type">
<label> 软件类型 </label>
<div class="input">
<select size="1" name="software_type" class="slapos-software-type">
</select>
</div>
</div>
<div class="field" title="serialisation_type">
<div class="input">
<input type=hidden name="serialisation_type" class="slapos-serialisation-type">
</div>
</div>
<div class="field" title="hide_show_button">
<div class="input">
<button type="button" class="slapos-show-form hidden-button"> 展开参数表格 </button>
<button type="button" class="slapos-show-raw-parameter"> 展开参数XML</button>
</div>
</div>
</fieldset>
<fieldset id="parameter-main"> </fieldset>
<fieldset id="parameter-optional"> </fieldset>
<fieldset id="parameter-xml">
<input type=hidden name="parameter_hash" class="parameter_hash_output">
<input type=hidden name="shared" class="parameter_shared">
<input type=hidden name="schema_url" class="parameter_schema_url">
</fieldset>
</div>
<div class="loadschema"
data-gadget-url="gadget_erp5_page_slap_load_schema.html"
data-gadget-scope="loadschema" >
</div>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_slap_parameter_form.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Parameter</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_page_slap_parameter_form_zh_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>zh</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget for show parameter form</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -55,6 +55,7 @@
"Records": "Records",
"Logins": "Logins",
"Equal to": "Equal to",
"Error page": "Error page",
"Invalid DateTime": "Invalid DateTime",
"Destroy Hosting Subscription:": "Destroy Hosting Subscription:",
"Menu": "Menu",
......@@ -143,6 +144,7 @@
"Enabled": "Enabled",
"Dashboard": "Dashboard",
"The Date": "The Date",
"Associated Persons": "Associated Persons",
"Associated Tickets": "Associated Tickets",
"History": "History",
"Software Installation: ": "Software Installation: ",
......@@ -158,6 +160,7 @@
"Instance Parameter": "Instance Parameter",
"Computer:": "Computer:",
"You are offline.": "You are offline.",
"You are not allowed to access this content, please login with an user which has the right permission": "You are not allowed to access this content, please login with an user which has the right permission",
"Sites": "Sites",
"Submit": "Submit",
"Subscription": "Subscription",
......@@ -170,6 +173,7 @@
"Pending Tickets to Process": "Pending Tickets to Process",
"Greater than or Equal to": "Greater than or Equal to",
"New Ticket created.": "New Ticket created.",
"Site": "Site",
"Site:": "Site:",
"Configuration Parameter": "Configuration Parameter",
"3/3 Request Service:": "3/3 Request Service:",
......@@ -203,6 +207,7 @@
"Value": "Value",
"New Network": "New Network",
"Transfer Computer Network": "Transfer Computer Network",
"Computer Network": "Computer Network",
"Computer Network is transferred.": "Computer Network is transferred.",
"Delete Network:": "Delete Network:",
"Support Request": "Support Request",
......@@ -255,7 +260,6 @@
"RSS Critical": "RSS Critical",
"Jumps": "Jumps",
"Stop": "Stop",
"The name of a document in ER5": "The name of a document in ER5",
"Modules": "Modules",
"Software Type": "Software Type",
"Worklist": "Worklist",
......@@ -383,7 +387,7 @@
"Proceed to Supply Software": "进行软件提供。",
"Software Products": "软件产品",
"State": "状态",
"New Ticket related to": "新的集合关联至",
"New Ticket related to": "新的工单关联至",
"SlapOS Master Web UI": "SlapOS主网络用户界面",
"Your Token": "您的令牌",
"No records": "没有记录",
......@@ -410,6 +414,7 @@
"Records": "记录",
"Logins": "登录账号",
"Equal to": "等于",
"Error page": "页面错误",
"Invalid DateTime": "无效的日期或时间",
"Destroy Hosting Subscription:": "销毁托管订阅:",
"Menu": "菜单",
......@@ -417,7 +422,7 @@
"Target Computer Reference": "目标计算机编号",
"Login:": "Login:",
"Supply": "供应",
"Ticket Type": "集合类型",
"Ticket Type": "工单类型",
"This person has no certificate to revoke.": "该用户没有可吊销的证书。",
"Contains": "包含",
"Software Release URL": "软件发行URL",
......@@ -460,7 +465,7 @@
"Regularisation Request:": "正则要求:",
"Trade Condition": "贸易条款",
"Previous": "上一页",
"Network": "Network",
"Network": "网络",
"Organisation": "组织",
"Your Account": "您的登录账号",
"Login is Disabled.": "不可登录。",
......@@ -474,7 +479,7 @@
"Editable": "可编辑",
"Your Message": "您的消息",
"Report": "报表",
"New Ticket": "新的集合",
"New Ticket": "新的工单",
"Terms of Service": "服务条款",
"ascending": "升序",
"Delete": "删除",
......@@ -483,7 +488,7 @@
"Jump": "前往",
"Currency": "货币",
"Input is required but no input given.": "有必输入项未填写",
"Current Location": "Current Location",
"Current Location": "当前地点",
"Supplied Softwares": "提供的软件",
"Request New Certificate": "请求新的证书",
"Delete Project:": "删除项目:",
......@@ -498,7 +503,8 @@
"Enabled": "已启用",
"Dashboard": "仪表板",
"The Date": "日期",
"Associated Tickets": "相关联的集合",
"Associated Persons": "相关联的人员",
"Associated Tickets": "相关联的工单",
"History": "历史记录",
"Software Installation: ": "软件安装:",
"New Organisation": "新组织",
......@@ -511,8 +517,9 @@
"Cancel": "取消",
"Command Line to Run": "执行命令行",
"Instance Parameter": "实例参数",
"Computer:": "Computer:",
"Computer:": "计算机:",
"You are offline.": "您已离线。",
"You are not allowed to access this content, please login with an user which has the right permission": "您没有权限查看此内容,请以有权限的用户登录。",
"Sites": "站点",
"Submit": "提交",
"Subscription": "订阅",
......@@ -524,7 +531,8 @@
"Show All Tickets": "显示所有工单",
"Pending Tickets to Process": "待处理工单",
"Greater than or Equal to": "大于等于",
"New Ticket created.": "新的集合已创建。",
"New Ticket created.": "新的工单已创建。",
"Site": "站点",
"Site:": "站点:",
"Configuration Parameter": "配置参数",
"3/3 Request Service:": "3/3 请求服务:",
......@@ -532,9 +540,9 @@
"Link to the Computer": "连接到该计算机",
"Service is Destroyed.": "服务已销毁。",
"SLA": "SLA",
"Close Ticket": "终止集合",
"Close Ticket": "终止工单",
"Actions": "操作",
"Instances": "Instances",
"Instances": "实例",
"Export": "导出",
"Software Releases": "软件发布",
"RSS": "订阅消息",
......@@ -558,6 +566,7 @@
"Value": "",
"New Network": "新的网络",
"Transfer Computer Network": "转移计算机网络",
"Computer Network": "计算机网络",
"Computer Network is transferred.": "计算机网络已转移。",
"Delete Network:": "删除网络:",
"Support Request": "客户支持请求",
......@@ -567,7 +576,7 @@
"Explore the Search Result List": "浏览结果列表",
"Source": "来源",
"New Project": "新的项目",
"Future Location": "Future Location",
"Future Location": "将来的地点",
"All work caught up!": "所有的工作都完成了!",
"Related Computer or Service": "相关联的计算机或服务",
"Aggregate": "合计",
......@@ -581,7 +590,7 @@
"Google Login:": "谷歌登录:",
"Action succeeded.": "操作成功。",
"Return to Invoice List": "返回账单列表",
"Computer": "Computer",
"Computer": "计算机",
"Monitoring": "监控",
"Stop Hosting Subscription:": "停止托管订阅:",
"Open for Personal use only": "开启(仅个人)",
......@@ -602,7 +611,7 @@
"Invite User": "邀请用户",
"Your Certificate": "您的证书",
"Token is Requested.": "令牌已请求。",
"Transfer": "传递",
"Transfer": "转移",
"Add Login": "添加登录",
"Critical RSS": "重要订阅消息",
"Sort": "排序",
......@@ -610,7 +619,6 @@
"RSS Critical": "重要订阅消息",
"Jumps": "前往",
"Stop": "停止",
"The name of a document in ER5": "The name of a document in ER5",
"Modules": "模块",
"Software Type": "软件类型",
"Worklist": "工作列表",
......@@ -677,6 +685,8 @@
"Preferences": "偏好设置",
"Access Monitor": "访问监控台",
"submit": "提交",
"Subscription": "订阅",
"Subscriptions": "订阅",
"Hosting Subscription:": "托管订阅:",
"Computer Network:": "计算机网络:",
"Slapos": "Slapos",
......@@ -717,4 +727,4 @@
"City": "城市"
}
};
}(window));
\ No newline at end of file
}(window));
......@@ -233,7 +233,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>983.34974.47419.7731</string> </value>
<value> <string>983.48431.41868.27426</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -251,7 +251,7 @@
</tuple>
<state>
<tuple>
<float>1588180184.16</float>
<float>1588980555.44</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -83,6 +83,7 @@ web_page_module/rjs_gadget_erp5_page_slap_organisation_view_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js
web_page_module/rjs_gadget_erp5_page_slap_parameter_form_zh_html
web_page_module/rjs_gadget_erp5_page_slap_payment_result_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_html
web_page_module/rjs_gadget_erp5_page_slap_person_add_erp5_login_js
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment