Browse Source

perf: 修改翻译 (#8543)

* perf: 修改翻译

* perf: 优化 flash msg page

* perf: 修改 i18n

* perf: 修改 i18n

Co-authored-by: ibuler <ibuler@qq.com>
pull/8551/head
fit2bot 2 years ago committed by GitHub
parent
commit
0f11ca9c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .gitignore
  2. 4
      apps/jumpserver/context_processor.py
  3. 4
      apps/jumpserver/urls.py
  4. 4
      apps/locale/ja/LC_MESSAGES/django.mo
  5. 47
      apps/locale/ja/LC_MESSAGES/django.po
  6. 4
      apps/locale/zh/LC_MESSAGES/django.mo
  7. 47
      apps/locale/zh/LC_MESSAGES/django.po
  8. 10
      apps/templates/_base_only_content.html
  9. 5
      apps/templates/_copyright.html
  10. 5
      apps/templates/_head_css_js.html
  11. 1
      apps/templates/flash_message_standalone.html

3
.gitignore vendored

@ -31,7 +31,6 @@ media
celerybeat.pid
django.db
celerybeat-schedule.db
data/static
docs/_build/
xpack
xpack.bak
@ -41,4 +40,4 @@ logs/*
release/*
releashe
/apps/script.py
data/certs
data/*

4
apps/jumpserver/context_processor.py

@ -10,8 +10,8 @@ default_interface = dict((
('login_image', static('img/login_image.jpg')),
('favicon', static('img/facio.ico')),
('login_title', _('JumpServer Open Source Bastion Host')),
('theme', 'classic'),
('primary_color', '#1ab394'),
('theme', 'classic_green'),
('theme_info', None),
))
default_context = {

4
apps/jumpserver/urls.py

@ -46,8 +46,8 @@ if settings.XPACK_ENABLED:
apps = [
'users', 'assets', 'perms', 'terminal', 'ops', 'audits', 'orgs', 'auth',
'applications', 'tickets', 'settings', 'xpack',
'users', 'assets', 'perms', 'terminal', 'ops', 'audits',
'orgs', 'auth', 'applications', 'tickets', 'settings', 'xpack',
'flower', 'luna', 'koko', 'ws', 'docs', 'redocs',
]

4
apps/locale/ja/LC_MESSAGES/django.mo

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:21921ae6acb8a8a8ea7bb3e1a24e0a730e6698d080fec98fa1416fbad925e8de
size 126420
oid sha256:ba75ec2955d452a16930dbd845c8091de4d3cbe0c5b5ccb18f8deb28d7bf3809
size 126865

47
apps/locale/ja/LC_MESSAGES/django.po

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-04 15:10+0800\n"
"POT-Creation-Date: 2022-07-06 16:47+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1993,11 +1993,11 @@ msgstr "パスワードが無効です"
msgid "Your password is too simple, please change it for security"
msgstr "パスワードがシンプルすぎるので、セキュリティのために変更してください"
#: authentication/errors/redirect.py:88 authentication/mixins.py:313
#: authentication/errors/redirect.py:87 authentication/mixins.py:313
msgid "You should to change your password before login"
msgstr "ログインする前にパスワードを変更する必要があります"
#: authentication/errors/redirect.py:97 authentication/mixins.py:320
#: authentication/errors/redirect.py:95 authentication/mixins.py:320
msgid "Your password has expired, please reset before logging in"
msgstr ""
"パスワードの有効期限が切れました。ログインする前にリセットしてください。"
@ -2210,7 +2210,7 @@ msgid "Need MFA for view auth"
msgstr "ビューオートのためにMFAが必要"
#: authentication/templates/authentication/_mfa_confirm_modal.html:20
#: templates/_modal.html:23 templates/flash_message_standalone.html:34
#: templates/_modal.html:23 templates/flash_message_standalone.html:37
#: users/templates/users/user_password_verify.html:20
msgid "Confirm"
msgstr "確認"
@ -2698,7 +2698,7 @@ msgstr "アカウントを正常に作成"
msgid "Your account has been created successfully"
msgstr "アカウントが正常に作成されました"
#: jumpserver/context_processor.py:17
#: jumpserver/context_processor.py:12
msgid "JumpServer Open Source Bastion Host"
msgstr "JumpServer オープンソースの要塞ホスト"
@ -4573,7 +4573,7 @@ msgstr "確認コードが送信されました"
msgid "Home page"
msgstr "ホームページ"
#: templates/flash_message_standalone.html:25 tickets/const.py:20
#: templates/flash_message_standalone.html:28 tickets/const.py:20
msgid "Cancel"
msgstr "キャンセル"
@ -4618,10 +4618,6 @@ msgstr ""
"Jmservisorはwindowsリモートアプリケーションパブリケーションサーバでリモートア"
"プリケーションを引き出すためのプログラムです"
#: templates/rest_framework/base.html:128
msgid "Filters"
msgstr "フィルター"
#: terminal/api/endpoint.py:26
msgid "Not found protocol query params"
msgstr "プロトコルクエリパラメータが見つかりません"
@ -6698,27 +6694,31 @@ msgstr "デフォルトの復元に成功しました。"
msgid "Interface settings"
msgstr "インターフェイスの設定"
#: xpack/plugins/interface/models.py:16
#: xpack/plugins/interface/models.py:22
msgid "Title of login page"
msgstr "ログインページのタイトル"
#: xpack/plugins/interface/models.py:20
#: xpack/plugins/interface/models.py:26
msgid "Image of login page"
msgstr "ログインページのイメージ"
#: xpack/plugins/interface/models.py:24
#: xpack/plugins/interface/models.py:30
msgid "Website icon"
msgstr "ウェブサイトのアイコン"
#: xpack/plugins/interface/models.py:28
#: xpack/plugins/interface/models.py:34
msgid "Logo of management page"
msgstr "管理ページのロゴ"
#: xpack/plugins/interface/models.py:32
#: xpack/plugins/interface/models.py:38
msgid "Logo of logout page"
msgstr "ログアウトページのロゴ"
#: xpack/plugins/interface/models.py:36
#: xpack/plugins/interface/models.py:40
msgid "Theme"
msgstr "テーマ"
#: xpack/plugins/interface/models.py:43
msgid "Interface setting"
msgstr "インターフェイスの設定"
@ -6749,3 +6749,18 @@ msgstr "究極のエディション"
#: xpack/plugins/license/models.py:77
msgid "Community edition"
msgstr "コミュニティ版"
#~ msgid "Classic green"
#~ msgstr "クラシックグリーン"
#~ msgid "Chinese red"
#~ msgstr "チャイナレッド"
#~ msgid "Tech blue"
#~ msgstr "テクノロジーブルー"
#~ msgid "Deep black"
#~ msgstr "深き黒"
#~ msgid "Filters"
#~ msgstr "フィルター"

4
apps/locale/zh/LC_MESSAGES/django.mo

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d2adfbe7d62b5a1b148450aeb6f327020a1f9fdf686cfa500db775032c3642e9
size 104353
oid sha256:bfbd815ff09d4b7c5f64af1eb745b81937a267d469ffbcba93c849feada2a8a8
size 104695

47
apps/locale/zh/LC_MESSAGES/django.po

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-04 15:10+0800\n"
"POT-Creation-Date: 2022-07-06 16:47+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -1973,11 +1973,11 @@ msgstr "您的密码无效"
msgid "Your password is too simple, please change it for security"
msgstr "你的密码过于简单,为了安全,请修改"
#: authentication/errors/redirect.py:88 authentication/mixins.py:313
#: authentication/errors/redirect.py:87 authentication/mixins.py:313
msgid "You should to change your password before login"
msgstr "登录完成前,请先修改密码"
#: authentication/errors/redirect.py:97 authentication/mixins.py:320
#: authentication/errors/redirect.py:95 authentication/mixins.py:320
msgid "Your password has expired, please reset before logging in"
msgstr "您的密码已过期,先修改再登录"
@ -2189,7 +2189,7 @@ msgid "Need MFA for view auth"
msgstr "需要 MFA 认证来查看账号信息"
#: authentication/templates/authentication/_mfa_confirm_modal.html:20
#: templates/_modal.html:23 templates/flash_message_standalone.html:34
#: templates/_modal.html:23 templates/flash_message_standalone.html:37
#: users/templates/users/user_password_verify.html:20
msgid "Confirm"
msgstr "确认"
@ -2668,7 +2668,7 @@ msgstr "创建账号成功"
msgid "Your account has been created successfully"
msgstr "你的账号已创建成功"
#: jumpserver/context_processor.py:17
#: jumpserver/context_processor.py:12
msgid "JumpServer Open Source Bastion Host"
msgstr "JumpServer 开源堡垒机"
@ -4506,7 +4506,7 @@ msgstr "验证码已发送"
msgid "Home page"
msgstr "首页"
#: templates/flash_message_standalone.html:25 tickets/const.py:20
#: templates/flash_message_standalone.html:28 tickets/const.py:20
msgid "Cancel"
msgstr "取消"
@ -4546,10 +4546,6 @@ msgid ""
"Remote Application publisher"
msgstr "Jmservisor 是在 windows 远程应用发布服务器中用来拉起远程应用的程序"
#: templates/rest_framework/base.html:128
msgid "Filters"
msgstr "过滤"
#: terminal/api/endpoint.py:26
msgid "Not found protocol query params"
msgstr ""
@ -6606,27 +6602,31 @@ msgstr "恢复默认成功!"
msgid "Interface settings"
msgstr "界面设置"
#: xpack/plugins/interface/models.py:16
#: xpack/plugins/interface/models.py:22
msgid "Title of login page"
msgstr "登录页面标题"
#: xpack/plugins/interface/models.py:20
#: xpack/plugins/interface/models.py:26
msgid "Image of login page"
msgstr "登录页面图片"
#: xpack/plugins/interface/models.py:24
#: xpack/plugins/interface/models.py:30
msgid "Website icon"
msgstr "网站图标"
#: xpack/plugins/interface/models.py:28
#: xpack/plugins/interface/models.py:34
msgid "Logo of management page"
msgstr "管理页面logo"
#: xpack/plugins/interface/models.py:32
#: xpack/plugins/interface/models.py:38
msgid "Logo of logout page"
msgstr "退出页面logo"
#: xpack/plugins/interface/models.py:36
#: xpack/plugins/interface/models.py:40
msgid "Theme"
msgstr "主题"
#: xpack/plugins/interface/models.py:43
msgid "Interface setting"
msgstr "界面设置"
@ -6658,5 +6658,20 @@ msgstr "旗舰版"
msgid "Community edition"
msgstr "社区版"
#~ msgid "Classic green"
#~ msgstr "经典绿"
#~ msgid "Chinese red"
#~ msgstr "中国红"
#~ msgid "Tech blue"
#~ msgstr "科技蓝"
#~ msgid "Deep black"
#~ msgstr "深邃黑"
#~ msgid "Filters"
#~ msgstr "过滤"
#~ msgid "Code is invalid, {}"
#~ msgstr "验证码无效: {}"

10
apps/templates/_base_only_content.html

@ -27,10 +27,12 @@
<div class="row">
<div class="col-md-12">
<div class="ibox-content">
<img src="{{ INTERFACE.logo_logout }}" style="margin: auto" width="50" height="50">
<h2 class="font-bold" style="display: inline">{% block title %}{% endblock %}</h2>
<h1></h1>
{% block content %} {% endblock %}
<h2 class="font-bold">
{% block title %}{% endblock %}
</h2>
<div style="margin: 10px 0">
{% block content %} {% endblock %}
</div>
</div>
</div>
</div>

5
apps/templates/_copyright.html

@ -1,2 +1,3 @@
{#{% load i18n %}#}
{#<strong>Copyright</strong> {{ COPYRIGHT }}#}
{% if not USE_XPACK %}
<strong>Copyright</strong> {{ COPYRIGHT }}
{% endif %}

5
apps/templates/_head_css_js.html

@ -22,5 +22,8 @@
</style>
<script>
document.documentElement.style.setProperty('--primary-color', "{{ INTERFACE.primary_color }}");
const theme = "{{ INTERFACE.theme }}";
if (theme && theme.colors && theme.colors['--color-primary']) {
document.documentElement.style.setProperty('--primary-color', theme.colors['--color-primary']);
}
</script>

1
apps/templates/flash_message_standalone.html

@ -46,7 +46,6 @@
<script>
var message = ''
var time = '{{ interval }}'
{% if error %}
message = '{{ error }}'
{% else %}

Loading…
Cancel
Save