From a38a89c3e6c7a34841b42672e4661573b86e6b1e Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 30 Dec 2014 14:26:45 +0000 Subject: [PATCH] Better use of language choices. --- app/lang/en/cachet.php | 4 +++- app/views/dashboard/incidents.blade.php | 6 +----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/lang/en/cachet.php b/app/lang/en/cachet.php index 05222c07..402cb31d 100644 --- a/app/lang/en/cachet.php +++ b/app/lang/en/cachet.php @@ -33,7 +33,8 @@ return [ 'logged_in' => 'You\'re logged in.', 'setup' => 'Setup Cachet', 'no_incidents' => 'No incidents reported.', - 'dashboard' => [ + // Dashboard + 'dashboard' => [ 'dashboard' => 'Dashboard', 'components' => 'Components', 'component-add' => 'Add Component', @@ -49,6 +50,7 @@ return [ 'search' => 'Search...', 'user' => 'User', 'help' => 'Help', + 'logged_incidents' => '{0} There are no incidents, good work.|You have logged one incident.|You have reported :count incidents.', ], // Forms 'forms' => [ diff --git a/app/views/dashboard/incidents.blade.php b/app/views/dashboard/incidents.blade.php index 03a21d15..c80ac968 100644 --- a/app/views/dashboard/incidents.blade.php +++ b/app/views/dashboard/incidents.blade.php @@ -13,11 +13,7 @@
- @if ($incidents->count() === 0) -
Woah! No incidents, your doing well!
- @else -

You have {{ $incidents->count() }} logged incidents.

- @endif +

{{ Lang::choice('cachet.dashboard.logged_incidents', $incidents->count(), ['count' => $incidents->count()]) }}

@foreach($incidents as $incident)