Commit 28cdfca1 authored by BaiJiangJie's avatar BaiJiangJie Committed by 老广

[Update] 优化 License (#2420)

* [Update] License - 1.添加标签过滤器

* [Update] License - 2.添加翻译信息
parent 202aba04
...@@ -97,6 +97,14 @@ def is_bool_field(field): ...@@ -97,6 +97,14 @@ def is_bool_field(field):
return False return False
@register.filter
def is_image_field(field):
if isinstance(field, forms.ImageField):
return True
else:
return False
@register.filter @register.filter
def to_dict(data): def to_dict(data):
return dict(data) return dict(data)
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n" "Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-21 15:53+0800\n" "POT-Creation-Date: 2019-02-21 18:23+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n" "Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n" "Language-Team: Jumpserver team<ibuler@qq.com>\n"
...@@ -464,6 +464,7 @@ msgid "Reachable" ...@@ -464,6 +464,7 @@ msgid "Reachable"
msgstr "可连接" msgstr "可连接"
#: assets/models/asset.py:119 assets/models/base.py:36 #: assets/models/asset.py:119 assets/models/base.py:36
#: xpack/plugins/license/models.py:75
msgid "Unknown" msgid "Unknown"
msgstr "未知" msgstr "未知"
...@@ -579,7 +580,7 @@ msgstr "优先级可选范围为1-100,1最低优先级,100最高优先级" ...@@ -579,7 +580,7 @@ msgstr "优先级可选范围为1-100,1最低优先级,100最高优先级"
#: assets/models/cmd_filter.py:50 #: assets/models/cmd_filter.py:50
#: assets/templates/assets/cmd_filter_rule_list.html:59 #: assets/templates/assets/cmd_filter_rule_list.html:59
#: xpack/plugins/license/models.py:27 #: xpack/plugins/license/models.py:29
msgid "Content" msgid "Content"
msgstr "内容" msgstr "内容"
...@@ -923,7 +924,7 @@ msgstr "其它" ...@@ -923,7 +924,7 @@ msgstr "其它"
#: users/templates/users/user_pubkey_update.html:76 #: users/templates/users/user_pubkey_update.html:76
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33 #: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35 #: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35
#: xpack/plugins/interface/templates/interface/interface.html:50 #: xpack/plugins/interface/templates/interface/interface.html:88
msgid "Reset" msgid "Reset"
msgstr "重置" msgstr "重置"
...@@ -956,7 +957,7 @@ msgstr "重置" ...@@ -956,7 +957,7 @@ msgstr "重置"
#: users/templates/users/user_password_update.html:72 #: users/templates/users/user_password_update.html:72
#: users/templates/users/user_profile_update.html:64 #: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_pubkey_update.html:77 #: users/templates/users/user_pubkey_update.html:77
#: xpack/plugins/interface/templates/interface/interface.html:51 #: xpack/plugins/interface/templates/interface/interface.html:89
msgid "Submit" msgid "Submit"
msgstr "提交" msgstr "提交"
...@@ -1173,7 +1174,7 @@ msgstr "创建日期" ...@@ -1173,7 +1174,7 @@ msgstr "创建日期"
#: terminal/templates/terminal/session_detail.html:81 #: terminal/templates/terminal/session_detail.html:81
#: users/templates/users/user_detail.html:138 #: users/templates/users/user_detail.html:138
#: users/templates/users/user_profile.html:146 #: users/templates/users/user_profile.html:146
#: xpack/plugins/license/templates/license/license_detail.html:81 #: xpack/plugins/license/templates/license/license_detail.html:94
msgid "Quick modify" msgid "Quick modify"
msgstr "快速修改" msgstr "快速修改"
...@@ -1221,7 +1222,7 @@ msgstr "创建资产" ...@@ -1221,7 +1222,7 @@ msgstr "创建资产"
#: assets/templates/assets/asset_list.html:73 #: assets/templates/assets/asset_list.html:73
#: users/templates/users/user_list.html:7 #: users/templates/users/user_list.html:7
#: xpack/plugins/license/templates/license/license_detail.html:89 #: xpack/plugins/license/templates/license/license_detail.html:102
msgid "Import" msgid "Import"
msgstr "导入" msgstr "导入"
...@@ -1688,7 +1689,7 @@ msgstr "文件名" ...@@ -1688,7 +1689,7 @@ msgstr "文件名"
#: audits/models.py:22 audits/templates/audits/ftp_log_list.html:76 #: audits/models.py:22 audits/templates/audits/ftp_log_list.html:76
#: ops/templates/ops/command_execution_list.html:64 #: ops/templates/ops/command_execution_list.html:64
#: ops/templates/ops/task_list.html:39 users/models/authentication.py:73 #: ops/templates/ops/task_list.html:39 users/models/authentication.py:73
#: users/templates/users/user_detail.html:458 xpack/plugins/cloud/api.py:61 #: users/templates/users/user_detail.html:458 xpack/plugins/cloud/api.py:62
msgid "Success" msgid "Success"
msgstr "成功" msgstr "成功"
...@@ -2721,6 +2722,7 @@ msgid "Validity period" ...@@ -2721,6 +2722,7 @@ msgid "Validity period"
msgstr "有效期" msgstr "有效期"
#: perms/templates/perms/asset_permission_detail.html:66 #: perms/templates/perms/asset_permission_detail.html:66
#: xpack/plugins/license/templates/license/license_detail.html:68
msgid "User count" msgid "User count"
msgstr "用户数量" msgstr "用户数量"
...@@ -2729,6 +2731,7 @@ msgid "User group count" ...@@ -2729,6 +2731,7 @@ msgid "User group count"
msgstr "用户组列表" msgstr "用户组列表"
#: perms/templates/perms/asset_permission_detail.html:74 #: perms/templates/perms/asset_permission_detail.html:74
#: xpack/plugins/license/templates/license/license_detail.html:64
msgid "Asset count" msgid "Asset count"
msgstr "资产数量" msgstr "资产数量"
...@@ -2986,6 +2989,7 @@ msgstr "验证码" ...@@ -2986,6 +2989,7 @@ msgstr "验证码"
#: users/templates/users/login.html:27 users/templates/users/login_otp.html:27 #: users/templates/users/login.html:27 users/templates/users/login_otp.html:27
#: users/templates/users/new_login.html:56 #: users/templates/users/new_login.html:56
#: users/templates/users/reset_password.html:25 #: users/templates/users/reset_password.html:25
#: xpack/plugins/interface/models.py:36
msgid "Welcome to the Jumpserver open source fortress" msgid "Welcome to the Jumpserver open source fortress"
msgstr "欢迎使用Jumpserver开源堡垒机" msgstr "欢迎使用Jumpserver开源堡垒机"
...@@ -4490,7 +4494,7 @@ msgstr "MFA 解绑成功" ...@@ -4490,7 +4494,7 @@ msgstr "MFA 解绑成功"
msgid "MFA disable success, return login page" msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面" msgstr "MFA 解绑成功,返回登录页面"
#: xpack/plugins/cloud/api.py:60 xpack/plugins/cloud/providers/base.py:84 #: xpack/plugins/cloud/api.py:61 xpack/plugins/cloud/providers/base.py:84
msgid "Account unavailable" msgid "Account unavailable"
msgstr "账户无效" msgstr "账户无效"
...@@ -4701,49 +4705,49 @@ msgstr "同步实例任务列表" ...@@ -4701,49 +4705,49 @@ msgstr "同步实例任务列表"
msgid "Create sync Instance task" msgid "Create sync Instance task"
msgstr "创建同步实例任务" msgstr "创建同步实例任务"
#: xpack/plugins/interface/forms.py:11 xpack/plugins/interface/models.py:15 #: xpack/plugins/interface/forms.py:16 xpack/plugins/interface/models.py:15
msgid "Title of login page" msgid "Title of login page"
msgstr "登录页面标题" msgstr "登录页面标题"
#: xpack/plugins/interface/forms.py:13 #: xpack/plugins/interface/forms.py:18
msgid "" msgid ""
"Tips: This will be displayed on the enterprise user login page. (eg: Welcome " "Tips: This will be displayed on the enterprise user login page. (eg: Welcome "
"to the Jumpserver open source fortress)" "to the Jumpserver open source fortress)"
msgstr "提示:将会显示在企业版用户登录页面(eg: 欢迎使用Jumpserver开源堡垒机)" msgstr "提示:将会显示在企业版用户登录页面(eg: 欢迎使用Jumpserver开源堡垒机)"
#: xpack/plugins/interface/forms.py:19 xpack/plugins/interface/models.py:19 #: xpack/plugins/interface/forms.py:24 xpack/plugins/interface/models.py:19
msgid "Image of login page" msgid "Image of login page"
msgstr "登录页面图片" msgstr "登录页面图片"
#: xpack/plugins/interface/forms.py:21 #: xpack/plugins/interface/forms.py:26
msgid "" msgid ""
"Tips: This will be displayed on the enterprise user login page. (suggest " "Tips: This will be displayed on the enterprise user login page. (suggest "
"image size: 635px*472px)" "image size: 635px*472px)"
msgstr "提示:将会显示在企业版用户登录页面(建议图片大小为: 635px*472px)" msgstr "提示:将会显示在企业版用户登录页面(建议图片大小为: 635px*472px)"
#: xpack/plugins/interface/forms.py:27 xpack/plugins/interface/models.py:23 #: xpack/plugins/interface/forms.py:32 xpack/plugins/interface/models.py:23
msgid "Website icon" msgid "Website icon"
msgstr "网站图标" msgstr "网站图标"
#: xpack/plugins/interface/forms.py:29 #: xpack/plugins/interface/forms.py:34
msgid "Tips: website icon. (suggest image size: 16px*16px)" msgid "Tips: website icon. (suggest image size: 16px*16px)"
msgstr "提示:网站图标(建议图片大小为: 16px*16px)" msgstr "提示:网站图标(建议图片大小为: 16px*16px)"
#: xpack/plugins/interface/forms.py:34 xpack/plugins/interface/models.py:27 #: xpack/plugins/interface/forms.py:39 xpack/plugins/interface/models.py:27
msgid "Logo of management page" msgid "Logo of management page"
msgstr "管理页面logo" msgstr "管理页面logo"
#: xpack/plugins/interface/forms.py:36 #: xpack/plugins/interface/forms.py:41
msgid "" msgid ""
"Tips: This will appear at the top left of the administration page. (suggest " "Tips: This will appear at the top left of the administration page. (suggest "
"image size: 185px*55px)" "image size: 185px*55px)"
msgstr "提示:将会显示在管理页面左上方(建议图片大小为: 185px*55px)" msgstr "提示:将会显示在管理页面左上方(建议图片大小为: 185px*55px)"
#: xpack/plugins/interface/forms.py:42 xpack/plugins/interface/models.py:31 #: xpack/plugins/interface/forms.py:47 xpack/plugins/interface/models.py:31
msgid "Logo of logout page" msgid "Logo of logout page"
msgstr "退出页面logo" msgstr "退出页面logo"
#: xpack/plugins/interface/forms.py:44 #: xpack/plugins/interface/forms.py:49
msgid "" msgid ""
"Tips: This will be displayed on the enterprise user logout page. (suggest " "Tips: This will be displayed on the enterprise user logout page. (suggest "
"image size: 82px*82px)" "image size: 82px*82px)"
...@@ -4762,12 +4766,22 @@ msgstr "界面设置" ...@@ -4762,12 +4766,22 @@ msgstr "界面设置"
msgid "Interface" msgid "Interface"
msgstr "界面" msgstr "界面"
#: xpack/plugins/license/meta.py:11 xpack/plugins/license/views.py:27 #: xpack/plugins/license/meta.py:11
#: xpack/plugins/license/templates/license/license_detail.html:51
#: xpack/plugins/license/views.py:31
msgid "License" msgid "License"
msgstr "许可证" msgstr "许可证"
#: xpack/plugins/license/models.py:71
msgid "Standard edition"
msgstr ""
#: xpack/plugins/license/models.py:73
msgid "Enterprise edition"
msgstr "企业版"
#: xpack/plugins/license/templates/license/_license_import_modal.html:4 #: xpack/plugins/license/templates/license/_license_import_modal.html:4
#: xpack/plugins/license/templates/license/license_detail.html:87 #: xpack/plugins/license/templates/license/license_detail.html:100
msgid "Import license" msgid "Import license"
msgstr "导入许可证" msgstr "导入许可证"
...@@ -4792,39 +4806,42 @@ msgid " expired." ...@@ -4792,39 +4806,42 @@ msgid " expired."
msgstr " 过期。" msgstr " 过期。"
#: xpack/plugins/license/templates/license/license_detail.html:37 #: xpack/plugins/license/templates/license/license_detail.html:37
#: xpack/plugins/license/views.py:28 #: xpack/plugins/license/views.py:32
msgid "License detail" msgid "License detail"
msgstr "许可证详情" msgstr "许可证详情"
#: xpack/plugins/license/templates/license/license_detail.html:53 #: xpack/plugins/license/templates/license/license_detail.html:52
msgid "No license"
msgstr "暂无许可证"
#: xpack/plugins/license/templates/license/license_detail.html:56
msgid "Corporation" msgid "Corporation"
msgstr "公司" msgstr "公司"
#: xpack/plugins/license/templates/license/license_detail.html:57 #: xpack/plugins/license/templates/license/license_detail.html:60
msgid "Expired" msgid "Expired"
msgstr "过期时间" msgstr "过期时间"
#: xpack/plugins/license/templates/license/license_detail.html:61 #: xpack/plugins/license/templates/license/license_detail.html:65
msgid "Count" #: xpack/plugins/license/templates/license/license_detail.html:69
msgstr "数量" #: xpack/plugins/license/templates/license/license_detail.html:73
#: xpack/plugins/license/templates/license/license_detail.html:77
#: xpack/plugins/license/templates/license/license_detail.html:63
msgid "Unlimited" msgid "Unlimited"
msgstr "无限制" msgstr "无限制"
#: xpack/plugins/license/templates/license/license_detail.html:67 #: xpack/plugins/license/templates/license/license_detail.html:76
msgid "Concurrent connections"
msgstr "并发连接"
#: xpack/plugins/license/templates/license/license_detail.html:81
msgid "Edition" msgid "Edition"
msgstr "版本" msgstr "版本"
#: xpack/plugins/license/templates/license/license_detail.html:69 #: xpack/plugins/license/templates/license/license_detail.html:106
msgid "Enterprise edition"
msgstr "企业版"
#: xpack/plugins/license/templates/license/license_detail.html:93
msgid "Technology consulting" msgid "Technology consulting"
msgstr "技术咨询" msgstr "技术咨询"
#: xpack/plugins/license/templates/license/license_detail.html:96 #: xpack/plugins/license/templates/license/license_detail.html:109
msgid "Consult" msgid "Consult"
msgstr "咨询" msgstr "咨询"
......
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