From 70a876744b09aaf993279e69adb0910952f69e7c Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 1 Dec 2014 16:37:37 +0000 Subject: [PATCH] Move lang into en/cachet.php where possible. Lang everything. --- app/lang/en/cachet.php | 31 ++++++++++++++++++++++++ app/lang/en/component.php | 10 -------- app/lang/en/incident.php | 10 -------- app/lang/en/overview.php | 6 ----- app/models/Component.php | 2 +- app/models/Incident.php | 2 +- app/view-composers.php | 4 +-- app/views/imports/support-link.blade.php | 2 +- app/views/index.blade.php | 8 ++++-- 9 files changed, 42 insertions(+), 33 deletions(-) create mode 100644 app/lang/en/cachet.php delete mode 100644 app/lang/en/component.php delete mode 100644 app/lang/en/incident.php delete mode 100644 app/lang/en/overview.php diff --git a/app/lang/en/cachet.php b/app/lang/en/cachet.php new file mode 100644 index 00000000..145536ee --- /dev/null +++ b/app/lang/en/cachet.php @@ -0,0 +1,31 @@ + array( + 'status' => array( + 1 => 'Operational', + 2 => 'Performance Issues', + 3 => 'Partial Outage', + 4 => 'Major Outage' + ) + ), + // Incidents + 'incident' => array( + 'status' => array( + 1 => 'Investigating', + 2 => 'Identified', + 3 => 'Watching', + 4 => 'Fixed' + ) + ), + // Service Status + 'service' => array( + 'good' => 'All systems are functional.', + 'bad' => 'Some systems are experiencing issues.', + ), + // Other + 'powered_by' => ':app Status Page is powered by Cachet.', + 'logout' => 'Logout', + 'dashboard_link' => 'You\'re logged in.', +); diff --git a/app/lang/en/component.php b/app/lang/en/component.php deleted file mode 100644 index 8ca3b927..00000000 --- a/app/lang/en/component.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 1 => 'Operational', - 2 => 'Performance Issues', - 3 => 'Partial Outage', - 4 => 'Major Outage' - ) -); diff --git a/app/lang/en/incident.php b/app/lang/en/incident.php deleted file mode 100644 index 0f3ec6c6..00000000 --- a/app/lang/en/incident.php +++ /dev/null @@ -1,10 +0,0 @@ - array( - 1 => 'Investigating', - 2 => 'Identified', - 3 => 'Watching', - 4 => 'Fixed' - ) -); \ No newline at end of file diff --git a/app/lang/en/overview.php b/app/lang/en/overview.php deleted file mode 100644 index b5f8cb9a..00000000 --- a/app/lang/en/overview.php +++ /dev/null @@ -1,6 +0,0 @@ - 'All systems are functional.', - 'bad' => 'Some systems are experiencing issues.', -); \ No newline at end of file diff --git a/app/models/Component.php b/app/models/Component.php index e2e467e6..302816e9 100644 --- a/app/models/Component.php +++ b/app/models/Component.php @@ -26,7 +26,7 @@ class Component extends Eloquent implements \Dingo\Api\Transformer\Transformable * @return string */ public function getHumanStatusAttribute() { - return Lang::get('component.status.' . $this->status); + return Lang::get('cachet.component.status.' . $this->status); } /** diff --git a/app/models/Incident.php b/app/models/Incident.php index 00d926fe..e8677625 100644 --- a/app/models/Incident.php +++ b/app/models/Incident.php @@ -32,7 +32,7 @@ class Incident extends Eloquent implements \Dingo\Api\Transformer\TransformableI * @return string */ public function getHumanStatusAttribute() { - $statuses = Lang::get('incident.status'); + $statuses = Lang::get('cachet.incident.status'); return $statuses[$this->status]; } diff --git a/app/view-composers.php b/app/view-composers.php index 8f5290b8..82ebb5a1 100644 --- a/app/view-composers.php +++ b/app/view-composers.php @@ -11,10 +11,10 @@ View::composer('index', function($view) { if ($incidentCount <= 1 || ($incidentCount > 1 && (int) $incidents->first()->status === 4)) { $status = 'success'; - $message = Lang::get('overview.good'); + $message = Lang::get('cachet.service.good'); } else { $status = 'danger'; - $message = Lang::get('overview.bad'); + $message = Lang::get('cachet.service.bad'); } $view->with([ diff --git a/app/views/imports/support-link.blade.php b/app/views/imports/support-link.blade.php index a79dc6ca..8a945e97 100644 --- a/app/views/imports/support-link.blade.php +++ b/app/views/imports/support-link.blade.php @@ -1,6 +1,6 @@ @if(Setting::get('show_support'))
@endif diff --git a/app/views/index.blade.php b/app/views/index.blade.php index 61aa97b9..36fa14ab 100644 --- a/app/views/index.blade.php +++ b/app/views/index.blade.php @@ -4,8 +4,12 @@
{{ $systemMessage }}
@if(Auth::check()) - Logout -

You're logged in. This will be a link to the Dashboard.

+
+
+ {{ Lang::get('cachet.logout') }} +

{{ Lang::get('cachet.dashboard_link') }}

+
+
@endif @include('imports.components')