From 62918ee526161515cd2700dc49b4ee611942e4ef Mon Sep 17 00:00:00 2001 From: phecho Date: Wed, 11 Nov 2015 10:50:26 +0800 Subject: [PATCH 1/5] Improved zh-CN localization --- resources/lang/zh-CN/auth.php | 28 +++++++++++++++++++++++++++ resources/lang/zh-CN/passwords.php | 31 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 resources/lang/zh-CN/auth.php create mode 100755 resources/lang/zh-CN/passwords.php diff --git a/resources/lang/zh-CN/auth.php b/resources/lang/zh-CN/auth.php new file mode 100644 index 00000000..63dd644a --- /dev/null +++ b/resources/lang/zh-CN/auth.php @@ -0,0 +1,28 @@ + '登录凭证无效。', + 'throttle' => '登录次数过多,请于 :seconds 秒后再试。', + +]; diff --git a/resources/lang/zh-CN/passwords.php b/resources/lang/zh-CN/passwords.php new file mode 100755 index 00000000..5368a7ce --- /dev/null +++ b/resources/lang/zh-CN/passwords.php @@ -0,0 +1,31 @@ + '密码至少应有六个字符 并且与“确认密码”相匹配', + 'user' => '未找到使用该邮箱地址的用户', + 'token' => '该密码重置凭据无效', + 'sent' => '已经发送密码重置提示信息!', + 'reset' => '密码已重置!', + +]; From 37011ad1ffff8f091b5bce50411237906eb9bac0 Mon Sep 17 00:00:00 2001 From: phecho Date: Wed, 11 Nov 2015 10:53:36 +0800 Subject: [PATCH 2/5] Improved zh-CN localization --- resources/lang/zh-CN/cachet.php | 33 +++++++++++++++++++++++------- resources/lang/zh-CN/dashboard.php | 32 ++++++++++++++--------------- resources/lang/zh-CN/errors.php | 25 ---------------------- resources/lang/zh-CN/forms.php | 8 ++++---- resources/lang/zh-CN/reminders.php | 31 ---------------------------- resources/lang/zh-CN/setup.php | 2 +- 6 files changed, 47 insertions(+), 84 deletions(-) delete mode 100644 resources/lang/zh-CN/errors.php delete mode 100755 resources/lang/zh-CN/reminders.php diff --git a/resources/lang/zh-CN/cachet.php b/resources/lang/zh-CN/cachet.php index 6365340e..e10092ce 100755 --- a/resources/lang/zh-CN/cachet.php +++ b/resources/lang/zh-CN/cachet.php @@ -30,9 +30,9 @@ return [ 'scheduled' => '计划维护', 'scheduled_at' => ',计划于 :timestamp', 'status' => [ - 0 => '计划中的', // TODO: Hopefully remove this. + 0 => '计划中', // TODO: Hopefully remove this. 1 => '调查中', - 2 => '已定位', + 2 => '已确认', 3 => '观察中', 4 => '已修复', ], @@ -46,15 +46,15 @@ return [ 'api' => [ 'regenerate' => '重新生成 API 密钥', - 'revoke' => '吊销 API 密钥', + 'revoke' => '注销 API 密钥', ], // Metrics 'metrics' => [ 'filter' => [ - 'hourly' => 'Last 12 Hours', - 'weekly' => 'Week', - 'monthly' => 'Month', + 'hourly' => '最近12小时', + 'weekly' => '周', + 'monthly' => '月', ], ], @@ -64,7 +64,7 @@ return [ 'button' => '订阅', 'email' => [ 'subscribe' => '订阅电子邮件更新。', - 'subscribed' => '你已经订阅电子邮件通知,请检查您的电子邮件,确认您的订阅。', + 'subscribed' => '您已经订阅电子邮件通知,请检查您的电子邮件,确认您的订阅。', 'verified' => '您的电子邮件订阅已确认。谢谢!', 'unsubscribe' => '取消电子邮件订阅。', 'unsubscribed' => '您的电子邮件订阅已被取消。', @@ -87,6 +87,25 @@ return [ ], ], + 'users' => [ + 'email' => [ + 'invite' => [ + 'text' => "您已被邀请加入 :app_name 团队的状态页, 请点击以下链接进行注册。\n:link\n谢谢, :app_name", + 'html-preheader' => '您已被邀请加入 :app_name.', + 'html' => '

您已被邀请加入 :app_name 团队的状态页, 请点击以下链接进行注册。

:link

谢谢, :app_name

', + ], + ], + ], + + 'signup' => [ + 'title' => '注册', + 'username' => '用户名', + 'email' => '邮箱', + 'password' => '密码', + 'success' => '您的账号已注册成功。', + 'failure' => '注册失败。', + ], + // Other 'powered_by' => ':app 应用状态页面由 Cachet提供支持。', 'about_this_site' => '关于此站点', diff --git a/resources/lang/zh-CN/dashboard.php b/resources/lang/zh-CN/dashboard.php index 0c1a91c9..60a0d332 100755 --- a/resources/lang/zh-CN/dashboard.php +++ b/resources/lang/zh-CN/dashboard.php @@ -21,12 +21,12 @@ return [ 'incident-create-template' => '创建模板', 'incident-templates' => '事件模板', 'add' => [ - 'title' => '添加一个事件', + 'title' => '添加事件', 'success' => '事件已添加', 'failure' => '事件添加失败。', ], 'edit' => [ - 'title' => '编辑一个事件', + 'title' => '编辑事件', 'success' => '事件已更新。', 'failure' => '事件编辑失败。', ], @@ -35,7 +35,7 @@ return [ 'templates' => [ 'title' => '事件模板', 'add' => [ - 'title' => '创建一个事件模板', + 'title' => '添加事件模板', 'success' => '模板已创建。', 'failure' => '创建模板失败。', ], @@ -49,7 +49,7 @@ return [ // Incident Maintenance 'schedule' => [ - 'schedule' => '计划维护', + 'schedule' => '维护计划', 'scheduled_at' => '计划在 :timestamp', 'add' => [ 'title' => '添加维护计划', @@ -62,7 +62,7 @@ return [ 'failure' => '计划更新失败。', ], 'delete' => [ - 'success' => '维护计划已被删除,它将从你的状态页上消失。', + 'success' => '维护计划已被删除,它将从您的状态页上消失。', 'failure' => '无法删除该维护计划。请再试一次。', ], ], @@ -73,24 +73,24 @@ return [ 'component_statuses' => '组件状态', 'listed_group' => '根据 :name 分组', 'add' => [ - 'title' => '添加一个组件', - 'message' => '你应该添加一个组件。', - 'success' => '组件已创建。', + 'title' => '添加组件', + 'message' => '您应该添加一个组件。', + 'success' => '组件已添加。', 'failure' => '组件添加失败。', ], 'edit' => [ - 'title' => '编辑一个组件', + 'title' => '编辑组件', 'success' => '组件已更新。', 'failure' => '组件编辑失败。', ], // Component groups 'groups' => [ - 'groups' => '部件分组|部件分组', + 'groups' => '组件分组|组件分组', 'no_components' => '您应添加一个组件分组。', 'add' => [ - 'title' => '添加一个分组。', - 'success' => '部件分组已添加。', + 'title' => '添加组件分组', + 'success' => '组件分组已添加。', 'failure' => '分组添加失败。', ], 'edit' => [ @@ -105,7 +105,7 @@ return [ 'metrics' => [ 'metrics' => '图表', 'add' => [ - 'title' => '添加一个图表', + 'title' => '添加图表', 'success' => '图表已创建。', 'failure' => '图表创建失败。', ], @@ -123,7 +123,7 @@ return [ 'verified' => '已认证', 'not_verified' => '未认证', 'add' => [ - 'title' => '添加一个订阅者', + 'title' => '添加订阅者', 'success' => '订阅者已添加成功.', 'failure' => '订阅者添加失败.', ], @@ -141,7 +141,7 @@ return [ 'profile' => '更改资料', 'description' => '团队成员将能够添加、修改和编辑组件和事件。', 'add' => [ - 'title' => '添加一个新团队成员', + 'title' => '添加团队成员', 'success' => '团队成员已添加。', 'failure' => '添加组件失败。', ], @@ -167,7 +167,7 @@ return [ 'app-setup' => [ 'app-setup' => '系统设置', 'images-only' => '只能上传图像。', - 'too-big' => '你上传的文件太大了。上传的图像大小应小于:size', + 'too-big' => '您上传的文件太大了。上传的图像大小应小于:size', ], 'analytics' => [ 'analytics' => '第三方统计', diff --git a/resources/lang/zh-CN/errors.php b/resources/lang/zh-CN/errors.php deleted file mode 100644 index c2234cb9..00000000 --- a/resources/lang/zh-CN/errors.php +++ /dev/null @@ -1,25 +0,0 @@ - [ - 'code' => '404', - 'title' => '这个页面失踪了!', - 'message' => '抱歉,但我们无法找到您要访问的的页面。请检查你的 URL,然后重试。', - 'link' => '返回主页', - ], - 'unauthorized' => [ - 'code' => '401', - 'title' => '未授权', - 'message' => '很抱歉,您需要管理员权限才能看到此页面。', - 'link' => '返回主页', - ], -]; diff --git a/resources/lang/zh-CN/forms.php b/resources/lang/zh-CN/forms.php index 1609c4bc..65e8c18a 100755 --- a/resources/lang/zh-CN/forms.php +++ b/resources/lang/zh-CN/forms.php @@ -49,7 +49,7 @@ return [ 'public' => '公共可见', 'logged_in_only' => '仅登录用户可见', 'templates' => [ - 'name' => '事件名', + 'name' => '事件模板名', 'template' => '模板', ], ], @@ -58,12 +58,12 @@ return [ 'components' => [ 'name' => '组件名', 'status' => '状态', - 'group' => '部件分组', + 'group' => '组件分组', 'description' => '描述', 'link' => '链接', 'tags' => '标签', 'tags-help' => '以逗号分隔。', - 'enabled' => 'Component enabled?', + 'enabled' => '启用', 'groups' => [ 'name' => '组名', @@ -140,7 +140,7 @@ return [ 'help' => '启用双因素身份验证会增加您的帐户安全。您将需要下载 Google Authenticator 或类似的应用到您的移动设备。当您登录时将会要求您提供由应用程序生成的一个短码。', ], 'team' => [ - 'description' => '请输入你要邀请的团队成员的邮件地址:', + 'description' => '请输入您要邀请的团队成员的邮件地址:', 'email' => 'Email #:id', ], ], diff --git a/resources/lang/zh-CN/reminders.php b/resources/lang/zh-CN/reminders.php deleted file mode 100755 index cd1c02d0..00000000 --- a/resources/lang/zh-CN/reminders.php +++ /dev/null @@ -1,31 +0,0 @@ - '密码至少应有六个字符 并且与“确认密码”相匹配', - 'user' => '我们没有找到使用这个邮箱地址的用户', - 'token' => '这个密码重置凭据是无效的', - 'sent' => '已经发送密码重置提示信息!', - 'reset' => '密码已重置!', - -]; diff --git a/resources/lang/zh-CN/setup.php b/resources/lang/zh-CN/setup.php index b2f1e531..f231a8a5 100755 --- a/resources/lang/zh-CN/setup.php +++ b/resources/lang/zh-CN/setup.php @@ -10,7 +10,7 @@ */ return [ - 'setup' => '设置', + 'setup' => '安装设置', 'title' => '安装 Cachet', 'service_details' => '服务细节', 'env_setup' => '环境设置', From be1fccd682a272c1e6dd062198b8727a23d19100 Mon Sep 17 00:00:00 2001 From: phecho Date: Wed, 11 Nov 2015 14:57:02 +0800 Subject: [PATCH 3/5] Fixed translations of dashboard page title --- .../Controllers/Dashboard/ComponentController.php | 2 +- .../Controllers/Dashboard/IncidentController.php | 1 - .../Controllers/Dashboard/ScheduleController.php | 7 +++++-- .../Controllers/Dashboard/SettingsController.php | 12 ++++++------ resources/lang/zh-CN/dashboard.php | 10 +++++----- resources/views/dashboard/components/add.blade.php | 2 +- resources/views/dashboard/components/edit.blade.php | 2 +- resources/views/dashboard/components/index.blade.php | 2 +- resources/views/dashboard/index.blade.php | 2 +- resources/views/dashboard/partials/sidebar.blade.php | 4 ++-- .../views/dashboard/partials/welcome-modal.blade.php | 2 +- 11 files changed, 24 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/Dashboard/ComponentController.php b/app/Http/Controllers/Dashboard/ComponentController.php index 2907121f..bab78c83 100644 --- a/app/Http/Controllers/Dashboard/ComponentController.php +++ b/app/Http/Controllers/Dashboard/ComponentController.php @@ -49,7 +49,7 @@ class ComponentController extends Controller 'components' => [ 'title' => trans('dashboard.components.components'), 'url' => route('dashboard.components.index'), - 'icon' => 'ion-outlet', + 'icon' => 'ion-ios-browsers', 'active' => false, ], 'groups' => [ diff --git a/app/Http/Controllers/Dashboard/IncidentController.php b/app/Http/Controllers/Dashboard/IncidentController.php index 81aa4082..deba5960 100644 --- a/app/Http/Controllers/Dashboard/IncidentController.php +++ b/app/Http/Controllers/Dashboard/IncidentController.php @@ -70,7 +70,6 @@ class IncidentController extends Controller public function showIncidents() { $incidents = Incident::notScheduled()->orderBy('created_at', 'desc')->get(); - return View::make('dashboard.incidents.index') ->withPageTitle(trans('dashboard.incidents.incidents').' - '.trans('dashboard.dashboard')) ->withIncidents($incidents); diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php index 3bab83a6..2199d681 100644 --- a/app/Http/Controllers/Dashboard/ScheduleController.php +++ b/app/Http/Controllers/Dashboard/ScheduleController.php @@ -69,8 +69,9 @@ class ScheduleController extends Controller public function showIndex() { $schedule = Incident::scheduled()->orderBy('created_at')->get(); - - return View::make('dashboard.schedule.index')->withSchedule($schedule); + return View::make('dashboard.schedule.index') + ->withPageTitle(trans('dashboard.schedule.schedule').' - '.trans('dashboard.dashboard')) + ->withSchedule($schedule); } /** @@ -83,6 +84,7 @@ class ScheduleController extends Controller $incidentTemplates = IncidentTemplate::all(); return View::make('dashboard.schedule.add') + ->withPageTitle(trans('dashboard.schedule.add.title').' - '.trans('dashboard.dashboard')) ->withIncidentTemplates($incidentTemplates); } @@ -123,6 +125,7 @@ class ScheduleController extends Controller $incidentTemplates = IncidentTemplate::all(); return View::make('dashboard.schedule.edit') + ->withPageTitle(trans('dashboard.schedule.edit.title').' - '.trans('dashboard.dashboard')) ->withIncidentTemplates($incidentTemplates) ->withSchedule($schedule); } diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index da02d47e..1945275e 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -100,7 +100,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['setup']['url']); return View::make('dashboard.settings.app-setup') - ->withPageTitle('Application Setup - Dashboard') + ->withPageTitle(trans('dashboard.settings.app-setup.app-setup').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu); } @@ -116,7 +116,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['analytics']['url']); return View::make('dashboard.settings.analytics') - ->withPageTitle('Analytics - Dashboard') + ->withPageTitle(trans('dashboard.settings.analytics.analytics').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu); } @@ -132,7 +132,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['localization']['url']); return View::make('dashboard.settings.localization') - ->withPageTitle('Localization - Dashboard') + ->withPageTitle(trans('dashboard.settings.localization.localization').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu); } @@ -148,7 +148,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['theme']['url']); return View::make('dashboard.settings.theme') - ->withPageTitle('Theme - Dashboard') + ->withPageTitle(trans('dashboard.settings.theme.theme').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu); } @@ -166,7 +166,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['security']['url']); return View::make('dashboard.settings.security') - ->withPageTitle('Security - Dashboard') + ->withPageTitle(trans('dashboard.settings.security.security').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu) ->withUnsecureUsers($unsecureUsers); } @@ -183,7 +183,7 @@ class SettingsController extends Controller Session::flash('redirect_to', $this->subMenu['stylesheet']['url']); return View::make('dashboard.settings.stylesheet') - ->withPageTitle('Stylesheet - Dashboard') + ->withPageTitle(trans('dashboard.settings.stylesheet.stylesheet').' - '.trans('dashboard.dashboard')) ->withSubMenu($this->subMenu); } diff --git a/resources/lang/zh-CN/dashboard.php b/resources/lang/zh-CN/dashboard.php index 60a0d332..b2c64d15 100755 --- a/resources/lang/zh-CN/dashboard.php +++ b/resources/lang/zh-CN/dashboard.php @@ -53,13 +53,13 @@ return [ 'scheduled_at' => '计划在 :timestamp', 'add' => [ 'title' => '添加维护计划', - 'success' => '计划已添加。', - 'failure' => '计划添加失败。', + 'success' => '维护计划已添加。', + 'failure' => '维护计划添加失败。', ], 'edit' => [ 'title' => '编辑维护计划', - 'success' => '计划已更新!', - 'failure' => '计划更新失败。', + 'success' => '维护计划已更新!', + 'failure' => '维护计划更新失败。', ], 'delete' => [ 'success' => '维护计划已被删除,它将从您的状态页上消失。', @@ -183,7 +183,7 @@ return [ 'stylesheet' => '自定义样式', ], 'theme' => [ - 'theme' => '主题', + 'theme' => '主题设置', ], 'edit' => [ 'success' => '设置已保存。', diff --git a/resources/views/dashboard/components/add.blade.php b/resources/views/dashboard/components/add.blade.php index baf29f8c..e17413b2 100644 --- a/resources/views/dashboard/components/add.blade.php +++ b/resources/views/dashboard/components/add.blade.php @@ -6,7 +6,7 @@ - {{ trans('dashboard.components.components') }} + {{ trans('dashboard.components.components') }} > {{ trans('dashboard.components.add.title') }} diff --git a/resources/views/dashboard/components/edit.blade.php b/resources/views/dashboard/components/edit.blade.php index 48fba310..f160e24c 100644 --- a/resources/views/dashboard/components/edit.blade.php +++ b/resources/views/dashboard/components/edit.blade.php @@ -6,7 +6,7 @@ - {{ trans('dashboard.components.components') }} + {{ trans('dashboard.components.components') }} > {{ trans('dashboard.components.edit.title') }} diff --git a/resources/views/dashboard/components/index.blade.php b/resources/views/dashboard/components/index.blade.php index d4a1970e..cb63323b 100644 --- a/resources/views/dashboard/components/index.blade.php +++ b/resources/views/dashboard/components/index.blade.php @@ -8,7 +8,7 @@
diff --git a/resources/views/dashboard/partials/sidebar.blade.php b/resources/views/dashboard/partials/sidebar.blade.php index 9f36fd3b..628a7113 100644 --- a/resources/views/dashboard/partials/sidebar.blade.php +++ b/resources/views/dashboard/partials/sidebar.blade.php @@ -26,7 +26,7 @@
  • - + {{ trans('dashboard.dashboard') }}
  • @@ -45,7 +45,7 @@
  • - + {{ trans('dashboard.components.components') }} {{ $component_count }} diff --git a/resources/views/dashboard/partials/welcome-modal.blade.php b/resources/views/dashboard/partials/welcome-modal.blade.php index 2c2396e7..3253a0dc 100644 --- a/resources/views/dashboard/partials/welcome-modal.blade.php +++ b/resources/views/dashboard/partials/welcome-modal.blade.php @@ -18,7 +18,7 @@
    From 3b2359db1d7d30f1683ed59e0b7111984020c07d Mon Sep 17 00:00:00 2001 From: phecho Date: Wed, 11 Nov 2015 15:10:57 +0800 Subject: [PATCH 4/5] Fixed translations of dashboard page title --- app/Http/Controllers/Dashboard/IncidentController.php | 1 + app/Http/Controllers/Dashboard/ScheduleController.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Http/Controllers/Dashboard/IncidentController.php b/app/Http/Controllers/Dashboard/IncidentController.php index deba5960..e1b484ea 100644 --- a/app/Http/Controllers/Dashboard/IncidentController.php +++ b/app/Http/Controllers/Dashboard/IncidentController.php @@ -70,6 +70,7 @@ class IncidentController extends Controller public function showIncidents() { $incidents = Incident::notScheduled()->orderBy('created_at', 'desc')->get(); + return View::make('dashboard.incidents.index') ->withPageTitle(trans('dashboard.incidents.incidents').' - '.trans('dashboard.dashboard')) ->withIncidents($incidents); diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php index 2199d681..dd66fe5f 100644 --- a/app/Http/Controllers/Dashboard/ScheduleController.php +++ b/app/Http/Controllers/Dashboard/ScheduleController.php @@ -69,6 +69,7 @@ class ScheduleController extends Controller public function showIndex() { $schedule = Incident::scheduled()->orderBy('created_at')->get(); + return View::make('dashboard.schedule.index') ->withPageTitle(trans('dashboard.schedule.schedule').' - '.trans('dashboard.dashboard')) ->withSchedule($schedule); From 76a6500c26280866944159a496ede4958be49133 Mon Sep 17 00:00:00 2001 From: phecho Date: Wed, 11 Nov 2015 15:31:11 +0800 Subject: [PATCH 5/5] Fixed translations of dashboard page title --- app/Http/Controllers/Dashboard/IncidentController.php | 2 +- app/Http/Controllers/Dashboard/ScheduleController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Dashboard/IncidentController.php b/app/Http/Controllers/Dashboard/IncidentController.php index e1b484ea..81aa4082 100644 --- a/app/Http/Controllers/Dashboard/IncidentController.php +++ b/app/Http/Controllers/Dashboard/IncidentController.php @@ -70,7 +70,7 @@ class IncidentController extends Controller public function showIncidents() { $incidents = Incident::notScheduled()->orderBy('created_at', 'desc')->get(); - + return View::make('dashboard.incidents.index') ->withPageTitle(trans('dashboard.incidents.incidents').' - '.trans('dashboard.dashboard')) ->withIncidents($incidents); diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php index dd66fe5f..c43f1af1 100644 --- a/app/Http/Controllers/Dashboard/ScheduleController.php +++ b/app/Http/Controllers/Dashboard/ScheduleController.php @@ -69,7 +69,7 @@ class ScheduleController extends Controller public function showIndex() { $schedule = Incident::scheduled()->orderBy('created_at')->get(); - + return View::make('dashboard.schedule.index') ->withPageTitle(trans('dashboard.schedule.schedule').' - '.trans('dashboard.dashboard')) ->withSchedule($schedule);