From ac975d8e9cb122bbd92c3a08110c74ca6b56b509 Mon Sep 17 00:00:00 2001 From: gplane Date: Fri, 30 Dec 2016 15:01:34 +0800 Subject: [PATCH] working on i18n of setup --- resources/lang/en/locale.js | 7 +++ resources/lang/en/setup.yml | 49 +++++++++++++++++++ resources/lang/zh-CN/locale.js | 7 +++ resources/lang/zh-CN/setup.yml | 49 +++++++++++++++++++ resources/views/admin/customize.tpl | 28 +++++------ resources/views/admin/index.tpl | 14 +++--- resources/views/admin/plugins.tpl | 30 ++++++------ resources/views/admin/update.tpl | 58 +++++++++++------------ resources/views/setup/locked.tpl | 6 +-- resources/views/setup/updates/master.tpl | 2 +- resources/views/setup/updates/success.tpl | 8 ++-- resources/views/setup/updates/welcome.tpl | 8 ++-- resources/views/setup/wizard/finish.tpl | 10 ++-- resources/views/setup/wizard/info.tpl | 20 ++++---- resources/views/setup/wizard/master.tpl | 2 +- resources/views/setup/wizard/welcome.tpl | 8 ++-- 16 files changed, 209 insertions(+), 97 deletions(-) diff --git a/resources/lang/en/locale.js b/resources/lang/en/locale.js index 8ce96f37..55d50081 100644 --- a/resources/lang/en/locale.js +++ b/resources/lang/en/locale.js @@ -128,6 +128,13 @@ pid: 'Texture ID', pidNotice: 'Please enter the tid of texture', changePlayerTexture: 'Change textures of :player' + + // Index + textureUpload: 'Texture Upload', + registration: 'Registration' + + // Plugins + deletionConfirmation: 'Really delete this plugin?' }, utils: { fatalError: 'Fatal Error (Please contact the author)' diff --git a/resources/lang/en/setup.yml b/resources/lang/en/setup.yml index 09d9d191..b8bce77b 100644 --- a/resources/lang/en/setup.yml +++ b/resources/lang/en/setup.yml @@ -1,5 +1,6 @@ database: connection-error: Unable to connect to MySQL server, please check your configuration. :msg + connection-success: Successfully connected to :server , just click NEXT to start installation. file: permission-error: Unable to create textures folder, please check the directory permissions or place one manually. @@ -7,3 +8,51 @@ file: permissions: storage: Unable to write to storage directory, please check the permissions. + +locked: + title: Installed + text: You appear to have already installed Blessing Skin Server. To reinstall please clear your old database tables first, or use a new database table prefix. + back-to-index: Back to index + +updates: + master: + title: Blessing Skin Server Updating Wizard + + welcome: + title: Just one step + tip-welcome: Welcome to updating Blessing Skin Server + tip-next: We need to update your database, just click NEXT. + button: Next + + success: + title: Updated successfully + tip-success: Database updated successfully. Welcome to Blessing Skin Server. + tip-update: Tips of updating + +wizard: + info: + title: Providing information + button: Start installation + tip-info: Please provide the following information. Don't worry, you can always change these settings later. + admin-email: E-mail address of administrator + super-admin: This is the only one administrator account, which can ADD or CANCEL other administrators. + password: Password + tip-important: 'Important:' + password-saving: You will need this password to log in. Please store it in a secure location. + password-confirmation: Confirm password + site-name: Site name + site-name-show: will be showed in index and title. + + welcome: + title: Welcom + button: Next + welcome: Welcome to Blessing Skin Server + + master: + title: Blessing Skin Server Installation + + finish: + title: Success! + success: Blessing Skin Server has been installed. Thank you, and enjoy! + email: E-mail + password: Password diff --git a/resources/lang/zh-CN/locale.js b/resources/lang/zh-CN/locale.js index 12d5bad8..177b33fe 100644 --- a/resources/lang/zh-CN/locale.js +++ b/resources/lang/zh-CN/locale.js @@ -128,6 +128,13 @@ pid: '材质 ID', pidNotice: '输入要更换的材质的 TID', changePlayerTexture: '更换角色 :player 的材质' + + // Index + textureUpload: '材质上传', + registration: '用户注册' + + // Plugins + deletionConfirmation: '真的要删除这个插件吗?' }, utils: { fatalError: '严重错误(请联系作者)' diff --git a/resources/lang/zh-CN/setup.yml b/resources/lang/zh-CN/setup.yml index 53d58c46..47ef9b4b 100644 --- a/resources/lang/zh-CN/setup.yml +++ b/resources/lang/zh-CN/setup.yml @@ -1,5 +1,6 @@ database: connection-error: 无法连接至 MySQL 服务器,请检查你的配置 :msg + connection-success: 成功连接至 MySQL 服务器 :server ,点击下一步以开始安装。 file: permission-error: textures 文件夹创建失败,请确认目录权限是否正确,或者手动放置一个。 @@ -7,3 +8,51 @@ file: permissions: storage: 无法写入 storage 目录,请检查目录权限是否正确 + +locked: + title: 已安装过 + text: 看起来已经安装妥当。如果想重新安装,请删除数据库中的旧数据表,或者换一个数据表前缀。 + back-to-index: 返回首页 + +updates: + master: + title: Blessing Skin Server 升级程序 + + welcome: + title: 还差一小步 + tip-welcome: 欢迎升级至 Blessing Skin Server + tip-next: 我们需要升级您的数据库,点击下一步以继续。 + button: 下一步 + + success: + title: 升级成功 + tip-success: 数据库升级成功,欢迎使用 Blessing Skin Server + tip-update: 升级提示: + +wizard: + info: + title: 填写信息 + button: 开始安装 + tip-info: 您需要填写一些基本信息。无需担心填错,这些信息以后可以再次修改。 + admin-email: 管理员邮箱 + super-admin: 这是唯一的超级管理员账号,可 添加/取消 其他管理员。 + password: 密码 + tip-important: 重要: + password-saving: 您将需要此密码来登录管理皮肤站,请将其保存在安全的位置。 + password-confirmation: 重复密码 + site-name: 站点名称 + site-name-show: 将会显示在首页以及标题栏 + + welcome: + title: 欢迎 + button: 下一步 + welcome: 欢迎使用 Blessing Skin Server + + master: + title: Blessing Skin Server 安装程序 + + finish: + title: 成功! + success: Blessing Skin Server 安装完成。您是否还沉浸在愉悦的安装过程中?很遗憾,一切皆已完成! :) + email: 邮箱 + password: 密码 diff --git a/resources/views/admin/customize.tpl b/resources/views/admin/customize.tpl index 479bd6b5..cce26c7e 100644 --- a/resources/views/admin/customize.tpl +++ b/resources/views/admin/customize.tpl @@ -25,64 +25,64 @@
-

更改配色

+

{{ trans('admin.customize.change-color') }}

- + - + - + - + - + - + - + - + - + - + - + - +
蓝色主题(默认){{ trans('admin.customize.color.blue') }}
蓝色主题-白色侧边栏{{ trans('admin.customize.color.blue-white-sidebar') }}
黄色主题{{ trans('admin.customize.color.yellow') }}
黄色主题-白色侧边栏{{ trans('admin.customize.color.yellow-white-sidebar') }}
绿色主题{{ trans('admin.customize.color.green') }}
绿色主题-白色侧边栏{{ trans('admin.customize.color.green-white-sidebar') }}
基佬紫{{ trans('admin.customize.color.purple') }}
紫色主题-白色侧边栏{{ trans('admin.customize.color.purple-white-sidebar') }}
喜庆红(笑){{ trans('admin.customize.color.red') }}
红色主题-白色侧边栏{{ trans('admin.customize.color.red-white-sidebar') }}
高端黑{{ trans('admin.customize.color.black') }}
黑色主题-白色侧边栏{{ trans('admin.customize.color.black-white-sidebar') }}
diff --git a/resources/views/admin/index.tpl b/resources/views/admin/index.tpl index d87b3324..9b2908b4 100644 --- a/resources/views/admin/index.tpl +++ b/resources/views/admin/index.tpl @@ -25,7 +25,7 @@
- 注册用户 + {{ trans('admin.index.users-count') }} {{ App\Models\User::all()->count() }}
@@ -37,7 +37,7 @@
- 角色总数 + {{ trans('admin.index.players-count') }} {{ App\Models\Player::all()->count() }}
@@ -48,7 +48,7 @@
- 上传材质总数 + {{ trans('admin.index.textures-count') }} {{ \Database::table('textures')->getRecordNum() }}
@@ -56,7 +56,7 @@
- 占用空间大小 + {{ trans('admin.index.usage') }} fetchArray("SELECT SUM(`size`) AS total_size FROM `{table}` WHERE 1")['total_size'] ?: 0; ?> {{ $size > 1024 ? round($size / 1024, 1)."MB" : $size."KB" }}
@@ -65,7 +65,7 @@
-

概览

+

{{ trans('admin.index.overview') }}

@@ -113,7 +113,7 @@ labels: {!! json_encode($labels) !!}, datasets: [ { - label: "材质上传", + label: trans("admin.textureUpload"), fillColor: "rgba(210, 214, 222, 1)", strokeColor: "rgba(210, 214, 222, 1)", pointColor: "rgba(210, 214, 222, 1)", @@ -123,7 +123,7 @@ data: {!! json_encode($data['texture_upload']) !!} }, { - label: "用户注册", + label: trans("admin.registration"), fillColor: "rgba(60,141,188,0.9)", strokeColor: "rgba(60,141,188,0.8)", pointColor: "#3b8bba", diff --git a/resources/views/admin/plugins.tpl b/resources/views/admin/plugins.tpl index aac2804f..02d49696 100644 --- a/resources/views/admin/plugins.tpl +++ b/resources/views/admin/plugins.tpl @@ -32,12 +32,12 @@ td#description { - - - - - - + + + + + + @@ -50,33 +50,33 @@ td#description { @empty - + @endforelse @@ -105,7 +105,7 @@ td#description { function deletePlugin(name) { swal({ - text: '真的要删除这个插件吗?', + text: trans('admin.deletionConfirmation'), type: 'warning', showCancelButton: true }).then(function() { diff --git a/resources/views/admin/update.tpl b/resources/views/admin/update.tpl index 7f4f92bb..5908e780 100644 --- a/resources/views/admin/update.tpl +++ b/resources/views/admin/update.tpl @@ -27,67 +27,67 @@
-

更新信息

+

{{ trans('admin.update.update-info') }}

@if ($info['new_version_available']) -
有更新可用。
+
{{ trans('admin.update.update-available') }}
名称描述作者版本状态操作{{ trans('admin.plugins.name') }}{{ trans('admin.plugins.description') }}{{ trans('admin.plugins.author') }}{{ trans('admin.plugins.version') }}{{ trans('admin.plugins.status') }}{{ trans('admin.plugins.opration') }}
{{ $plugin->version }} @if ($plugin->isEnabled()) - 已启用 + {{ trans('admin.plugins.enabled') }} @else - 已禁用 + {{ trans('admin.plugins.disabled') }} @endif @if ($plugin->isEnabled()) - 禁用插件 + {{ trans('admin.plugins.disable-plugin') }} @else - 启用插件 + {{ trans('admin.plugins.enable-plugin') }} @endif @if ($plugin->isEnabled() && $plugin->hasConfigView()) - 插件配置 + {{ trans('admin.plugins.plugin-config') }} @else - 插件配置 + {{ trans('admin.plugins.no-config') }} @endif - 删除插件 + {{ trans('admin.plugins.delete-plugin') }}
0无结果{{ trans('admin.plugins.no-result') }} (´・ω・`)
- + - + - + - + - + @if($info['pre_release']) -
本次更新为预发布版,请谨慎选择是否更新。
+
{{ trans('admin.update.pre-release-warning') }}
@endif
最新版本:{{ trans('admin.update.latest-version') }} v{{ $info['latest_version'] }}
当前版本:{{ trans('admin.update.current-version') }} v{{ $info['current_version'] }}
发布时间:{{ trans('admin.update.release-time') }} {{ Utils::getTimeFormatted($info['release_time']) }}
更新日志:{{ trans('admin.update.change-log') }} - {!! nl2br($info['release_note']) ?: "无内容" !!} + {!! nl2br($info['release_note']) ?: "{{ trans('admin.update.no-log') }}" !!}
下载地址:{{ trans('admin.update.download-link') }} - 点击下载完整安装包 + {{ trans('admin.update.download-full') }}
@else -
已更新至最新版本。
+
{{ trans('admin.update.latest-now') }}
- + - + @@ -96,18 +96,18 @@ @endif
-

注意事项

+

{{ trans('admin.update.caution') }}

-

请根据你的主机所在位置(国内/国外)选择更新源。

-

如错选至相对于你的主机速度较慢的源,可能会造成检查/下载更新页面长时间无响应。

+

{{ trans('admin.update.choose-source') }}

+

{{ trans('admin.update.choose-wrong') }}

@@ -115,7 +115,7 @@
-

更新选项

+

{{ trans('admin.update.update-options') }}

@@ -128,40 +128,40 @@ Option::set($key, $value); } - echo '
设置已保存。
'; + echo '
{{ trans('admin.update.config-saved') }}
'; } try { $response = file_get_contents(option('update_source')); } catch (Exception $e) { - echo '
无法访问当前更新源。详细信息:'.$e->getMessage().'
'; + echo '
{{ trans('admin.update.connection-error') }}'.$e->getMessage().'
'; } ?>
当前版本:{{ trans('admin.update.current-version') }} v{{ $info['current_version'] }}
发布时间:{{ trans('admin.update.release-time') }} @if (isset($info['release_time'])) {{ Utils::getTimeFormatted($info['release_time']) }} @else - 当前版本为未发布测试版 + {{ trans('admin.update.pre-release') }} @endif
- + - +
检查更新{{ trans('admin.update.check-update') }}
更新源{{ trans('admin.update.source') }} -

可用的更新源列表可以在这里查看:@GitHub Wiki

+

{{ trans('admin.update.source-list') }}@GitHub Wiki

@@ -176,10 +176,10 @@