diff --git a/resources/lang/es/activities.php b/resources/lang/es/activities.php index 1556f4530..649b8c7d2 100644 --- a/resources/lang/es/activities.php +++ b/resources/lang/es/activities.php @@ -13,7 +13,7 @@ return [ 'page_update' => 'página actualizada', 'page_update_notification' => 'Página actualizada exitosamente', 'page_delete' => 'página borrada', - 'page_delete_notification' => 'Página borrada exitosamente, + 'page_delete_notification' => 'Página borrada exitosamente', 'page_restore' => 'página restaurada', 'page_restore_notification' => 'Página restaurada exitosamente', 'page_move' => 'página movida', diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php index de3a3151f..e0019e618 100644 --- a/resources/views/users/create.blade.php +++ b/resources/views/users/create.blade.php @@ -21,6 +21,10 @@
{!! csrf_field() !!} @include('users/forms/' . $authMethod) +
+ {{ trans('common.cancel') }} + +
diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index bf10b829d..ff3475194 100644 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -19,38 +19,42 @@
-
- {!! csrf_field() !!} - - @include('users.forms.' . $authMethod, ['model' => $user]) +
+ {!! csrf_field() !!} + + @include('users.forms.' . $authMethod, ['model' => $user]) -
-
-
- -

{{ trans('settings.users_avatar_desc') }}

- - @include('components.image-picker', [ - 'resizeHeight' => '512', - 'resizeWidth' => '512', - 'showRemove' => false, - 'defaultImage' => baseUrl('/user_avatar.png'), - 'currentImage' => $user->getAvatar(80), - 'currentId' => $user->image_id, - 'name' => 'image_id', - 'imageClass' => 'avatar large' - ])
-
- - +
+
+ +

{{ trans('settings.users_avatar_desc') }}

+ + @include('components.image-picker', [ + 'resizeHeight' => '512', + 'resizeWidth' => '512', + 'showRemove' => false, + 'defaultImage' => baseUrl('/user_avatar.png'), + 'currentImage' => $user->getAvatar(80), + 'currentId' => $user->image_id, + 'name' => 'image_id', + 'imageClass' => 'avatar large' + ]) +
+
+ + +
-
+
+ {{ trans('common.cancel') }} + +

@@ -60,7 +64,7 @@

{{ trans('settings.users_social_accounts_info') }}

@foreach($activeSocialDrivers as $driver => $enabled) -
+
@icon($driver, ['width' => 56])
@if($user->hasSocialAccount($driver)) diff --git a/resources/views/users/forms/ldap.blade.php b/resources/views/users/forms/ldap.blade.php index 0a6cf79ae..f6e8b4c80 100644 --- a/resources/views/users/forms/ldap.blade.php +++ b/resources/views/users/forms/ldap.blade.php @@ -22,9 +22,4 @@ @include('form.text', ['name' => 'external_auth_id'])
-@endif - -
- {{ trans('common.cancel') }} - -
\ No newline at end of file +@endif \ No newline at end of file diff --git a/resources/views/users/forms/standard.blade.php b/resources/views/users/forms/standard.blade.php index 39ae4c770..fa712368b 100644 --- a/resources/views/users/forms/standard.blade.php +++ b/resources/views/users/forms/standard.blade.php @@ -31,10 +31,4 @@
@include('form.password', ['name' => 'password-confirm']) -
- -
- {{ trans('common.cancel') }} - -
- +
\ No newline at end of file diff --git a/resources/views/users/forms/system.blade.php b/resources/views/users/forms/system.blade.php index 868dad854..6243010a4 100644 --- a/resources/views/users/forms/system.blade.php +++ b/resources/views/users/forms/system.blade.php @@ -19,8 +19,3 @@
@endif -
- {{ trans('common.cancel') }} - -
- diff --git a/tests/LanguageTest.php b/tests/LanguageTest.php index ed5ee7dee..911ac3e81 100644 --- a/tests/LanguageTest.php +++ b/tests/LanguageTest.php @@ -3,13 +3,24 @@ class LanguageTest extends TestCase { - public function test_js_endpoint_for_each_language() { + protected $langs; + + /** + * LanguageTest constructor. + */ + public function setUp() + { + parent::setUp(); + $this->langs = array_diff(scandir(resource_path('lang')), ['..', '.']); + } + + public function test_js_endpoint_for_each_language() + { - $langs = array_diff(scandir(resource_path('lang')), ['..', '.']); $visibleKeys = ['common', 'components', 'entities', 'errors']; $this->asEditor(); - foreach ($langs as $lang) { + foreach ($this->langs as $lang) { setting()->putUser($this->getEditor(), 'language', $lang); $transResp = $this->get('/translations'); foreach ($visibleKeys as $key) { @@ -18,4 +29,20 @@ class LanguageTest extends TestCase } } + public function test_all_lang_files_loadable() + { + $files = array_diff(scandir(resource_path('lang/en')), ['..', '.']); + foreach ($this->langs as $lang) { + foreach ($files as $file) { + $loadError = false; + try { + $translations = trans(str_replace('.php', '', $file), [], $lang); + } catch (\Exception $e) { + $loadError = true; + } + $this->assertFalse($loadError, "Translation file {$lang}/{$file} failed to load"); + } + } + } + } \ No newline at end of file