diff --git a/app/lang/de/dashboard.php b/app/lang/de/dashboard.php index 0b696e5a..ca5b7438 100644 --- a/app/lang/de/dashboard.php +++ b/app/lang/de/dashboard.php @@ -89,7 +89,9 @@ return [ 'settings' => [ 'settings' => 'Einstellungen', 'app-setup' => [ - 'app-setup' => 'Setup', + 'app-setup' => 'Setup', + 'images-only' => 'Only images may be uploaded.', + 'too-big' => 'The file you uploaded is too big. Upload an image smaller than :size', ], 'security' => [ 'security' => 'Sicherheit', diff --git a/app/lang/de/forms.php b/app/lang/de/forms.php index 63141c2e..9e8593b0 100644 --- a/app/lang/de/forms.php +++ b/app/lang/de/forms.php @@ -16,9 +16,11 @@ return [ // Login form fields 'login' => [ - 'email' => 'Email', - 'password' => 'Passwort', - '2fauth' => 'Authentifikations-Code', + 'email' => 'Email', + 'password' => 'Passwort', + '2fauth' => 'Authentifikations-Code', + 'invalid' => 'Invalid email or password', + 'invalid-token' => 'Invalid token', ], // Incidents form fields diff --git a/app/lang/en/dashboard.php b/app/lang/en/dashboard.php index 10c5d68f..f1d9c616 100644 --- a/app/lang/en/dashboard.php +++ b/app/lang/en/dashboard.php @@ -89,7 +89,9 @@ return [ 'settings' => [ 'settings' => 'Settings', 'app-setup' => [ - 'app-setup' => 'Application Setup', + 'app-setup' => 'Application Setup', + 'images-only' => 'Only images may be uploaded.', + 'too-big' => 'The file you uploaded is too big. Upload an image smaller than :size', ], 'security' => [ 'security' => 'Security', diff --git a/app/lang/en/forms.php b/app/lang/en/forms.php index ee848419..6a59ccff 100644 --- a/app/lang/en/forms.php +++ b/app/lang/en/forms.php @@ -16,9 +16,11 @@ return [ // Login form fields 'login' => [ - 'email' => 'Email', - 'password' => 'Password', - '2fauth' => 'Authentication Code', + 'email' => 'Email', + 'password' => 'Password', + '2fauth' => 'Authentication Code', + 'invalid' => 'Invalid email or password', + 'invalid-token' => 'Invalid token', ], // Incidents form fields diff --git a/app/lang/fr/dashboard.php b/app/lang/fr/dashboard.php index a521b110..31e3bb9f 100644 --- a/app/lang/fr/dashboard.php +++ b/app/lang/fr/dashboard.php @@ -89,7 +89,9 @@ return [ 'settings' => [ 'settings' => 'Réglages', 'app-setup' => [ - 'app-setup' => 'Configuration', + 'app-setup' => 'Configuration',, + 'images-only' => 'Only images may be uploaded.', + 'too-big' => 'The file you uploaded is too big. Upload an image smaller than :size', ], 'security' => [ 'security' => 'Sécurité', diff --git a/app/lang/fr/forms.php b/app/lang/fr/forms.php index 03c45128..5a5c0f06 100644 --- a/app/lang/fr/forms.php +++ b/app/lang/fr/forms.php @@ -16,9 +16,11 @@ return [ // Login form fields 'login' => [ - 'email' => 'Adresse email', - 'password' => 'Mot de passe', - '2fauth' => 'Authentication Code', + 'email' => 'Adresse email', + 'password' => 'Mot de passe', + '2fauth' => 'Authentication Code', + 'invalid' => 'Invalid email or password', + 'invalid-token' => 'Invalid token', ], // Incidents form fields diff --git a/app/lang/pt-BR/dashboard.php b/app/lang/pt-BR/dashboard.php index 6f474d50..4aa15afb 100755 --- a/app/lang/pt-BR/dashboard.php +++ b/app/lang/pt-BR/dashboard.php @@ -89,7 +89,9 @@ return [ 'settings' => [ 'settings' => 'Configurações', 'app-setup' => [ - 'app-setup' => 'Instalação do aplicativo', + 'app-setup' => 'Instalação do aplicativo',, + 'images-only' => 'Only images may be uploaded.', + 'too-big' => 'The file you uploaded is too big. Upload an image smaller than :size', ], 'security' => [ 'security' => 'Segurança', diff --git a/app/lang/pt-BR/forms.php b/app/lang/pt-BR/forms.php index a46b6e95..526d2ee7 100755 --- a/app/lang/pt-BR/forms.php +++ b/app/lang/pt-BR/forms.php @@ -15,9 +15,11 @@ return [ // Login form fields 'login' => [ - 'email' => 'Email', - 'password' => 'Senha', - '2fauth' => 'Authentication Code', + 'email' => 'Email', + 'password' => 'Senha', + '2fauth' => 'Authentication Code', + 'invalid' => 'Invalid email or password', + 'invalid-token' => 'Invalid token', ], // Incidents form fields diff --git a/src/Http/Controllers/AuthController.php b/src/Http/Controllers/AuthController.php index 779d35f8..f8d27f82 100644 --- a/src/Http/Controllers/AuthController.php +++ b/src/Http/Controllers/AuthController.php @@ -57,7 +57,7 @@ class AuthController extends Controller return Redirect::back() ->withInput(Binput::except('password')) - ->with('error', 'Invalid email or password'); + ->with('error', trans('forms.login.invalid')); } /** @@ -94,11 +94,11 @@ class AuthController extends Controller // Failed login, log back out. Auth::logout(); - return Redirect::route('login')->with('error', 'Invalid token'); + return Redirect::route('login')->with('error', trans('forms.login.invalid-token')); } } - return Redirect::route('login')->with('error', 'Invalid token'); + return Redirect::route('login')->with('error', trans('forms.login.invalid-token')); } /** diff --git a/src/Http/Controllers/DashAPIController.php b/src/Http/Controllers/DashAPIController.php index fb01a052..d3ef6af6 100644 --- a/src/Http/Controllers/DashAPIController.php +++ b/src/Http/Controllers/DashAPIController.php @@ -21,7 +21,7 @@ class DashAPIController extends Controller public function postUpdateComponent(Component $component) { if (!$component->update(Binput::except(['_token']))) { - throw new Exception('Failed to update the component.'); + throw new Exception(trans('dashboard.components.edit.failure')); } return $component; diff --git a/src/Http/Controllers/DashSettingsController.php b/src/Http/Controllers/DashSettingsController.php index 16da4ccd..957fac4c 100644 --- a/src/Http/Controllers/DashSettingsController.php +++ b/src/Http/Controllers/DashSettingsController.php @@ -169,7 +169,7 @@ class DashSettingsController extends Controller $maxSize = $file->getMaxFilesize(); if ($file->getSize() > $maxSize) { - return Redirect::back()->withErrors("You need to upload an image that is less than $maxSize."); + return Redirect::back()->withErrors(trans('dashboard.settings.app-setup.too-big', ['size' => $maxSize])); } if (!$file->isValid() || $file->getError()) { @@ -177,7 +177,7 @@ class DashSettingsController extends Controller } if (strpos($file->getMimeType(), 'image/') !== 0) { - return Redirect::back()->withErrors('Only images may be uploaded.'); + return Redirect::back()->withErrors(trans('dashboard.settings.app-setup.images-only')); } // Store the banner.