diff --git a/app/Http/Controllers/UserPreferencesController.php b/app/Http/Controllers/UserPreferencesController.php index e5ac69818..aef959712 100644 --- a/app/Http/Controllers/UserPreferencesController.php +++ b/app/Http/Controllers/UserPreferencesController.php @@ -41,7 +41,7 @@ class UserPreferencesController extends Controller setting()->putForCurrentUser('ui-shortcuts', $shortcuts->toJson()); setting()->putForCurrentUser('ui-shortcuts-enabled', $enabled); - $this->showSuccessNotification('Shortcut preferences have been updated!'); + $this->showSuccessNotification(trans('preferences.shortcuts_update_success')); return redirect('/preferences/shortcuts'); } diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php index 703a70c7e..c74dcc907 100644 --- a/resources/lang/en/common.php +++ b/resources/lang/en/common.php @@ -25,6 +25,7 @@ return [ 'actions' => 'Actions', 'view' => 'View', 'view_all' => 'View All', + 'new' => 'New', 'create' => 'Create', 'update' => 'Update', 'edit' => 'Edit', @@ -80,12 +81,14 @@ return [ 'none' => 'None', // Header + 'homepage' => 'Homepage', 'header_menu_expand' => 'Expand Header Menu', 'profile_menu' => 'Profile Menu', 'view_profile' => 'View Profile', 'edit_profile' => 'Edit Profile', 'dark_mode' => 'Dark Mode', 'light_mode' => 'Light Mode', + 'global_search' => 'Global Search', // Layout tabs 'tab_info' => 'Info', diff --git a/resources/lang/en/preferences.php b/resources/lang/en/preferences.php new file mode 100644 index 000000000..e9a47461b --- /dev/null +++ b/resources/lang/en/preferences.php @@ -0,0 +1,18 @@ + 'Shortcuts', + 'shortcuts_interface' => 'Interface Keyboard Shortcuts', + 'shortcuts_toggle_desc' => 'Here you can enable or disable keyboard system interface shortcuts, used for navigation and actions.', + 'shortcuts_customize_desc' => 'You can customize each of the shortcuts below. Just press your desired key combination after selecting the input for a shortcut.', + 'shortcuts_toggle_label' => 'Keyboard shortcuts enabled', + 'shortcuts_section_navigation' => 'Navigation', + 'shortcuts_section_actions' => 'Common Actions', + 'shortcuts_save' => 'Save Shortcuts', + 'shortcuts_overlay_desc' => 'Note: When shortcuts are enabled a helper overlay is available via pressing "?" which will highlight the available shortcuts for actions currently visible on the screen.', + 'shortcuts_update_success' => 'Shortcut preferences have been updated!', +]; \ No newline at end of file diff --git a/resources/views/common/header.blade.php b/resources/views/common/header.blade.php index dd463b76e..9fe97b853 100644 --- a/resources/views/common/header.blade.php +++ b/resources/views/common/header.blade.php @@ -93,7 +93,7 @@
  • @icon('shortcuts') -
    {{ 'Shortcuts' }}
    +
    {{ trans('preferences.shortcuts') }}
  • diff --git a/resources/views/users/preferences/shortcuts.blade.php b/resources/views/users/preferences/shortcuts.blade.php index 61c61dcf9..677892bc6 100644 --- a/resources/views/users/preferences/shortcuts.blade.php +++ b/resources/views/users/preferences/shortcuts.blade.php @@ -8,31 +8,28 @@ {{ method_field('put') }} {{ csrf_field() }} -

    Interface Keyboard Shortcuts

    +

    {{ trans('preferences.shortcuts_interface') }}

    - Here you can enable or disable keyboard system interface shortcuts, used for navigation - and actions. - - You can customize each of the shortcuts below. Just press your desired key combination - after selecting the input for a shortcut. + {{ trans('preferences.shortcuts_toggle_desc') }} + {{ trans('preferences.shortcuts_customize_desc') }}

    @include('form.toggle-switch', [ 'name' => 'enabled', 'value' => $enabled, - 'label' => 'Keyboard shortcuts enabled', + 'label' => trans('preferences.shortcuts_toggle_label'), ])

    -

    Navigation

    +

    {{ trans('preferences.shortcuts_section_navigation') }}

    - @include('users.preferences.parts.shortcut-control', ['label' => 'Homepage', 'id' => 'home_view']) + @include('users.preferences.parts.shortcut-control', ['label' => trans('common.homepage'), 'id' => 'home_view']) @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.shelves'), 'id' => 'shelves_view']) @include('users.preferences.parts.shortcut-control', ['label' => trans('entities.books'), 'id' => 'books_view']) @include('users.preferences.parts.shortcut-control', ['label' => trans('settings.settings'), 'id' => 'settings_view']) @@ -41,13 +38,13 @@
    @include('users.preferences.parts.shortcut-control', ['label' => trans('common.view_profile'), 'id' => 'profile_view']) @include('users.preferences.parts.shortcut-control', ['label' => trans('auth.logout'), 'id' => 'logout']) - @include('users.preferences.parts.shortcut-control', ['label' => 'Global Search', 'id' => 'global_search']) + @include('users.preferences.parts.shortcut-control', ['label' => trans('common.global_search'), 'id' => 'global_search']) @include('users.preferences.parts.shortcut-control', ['label' => trans('common.next'), 'id' => 'next']) @include('users.preferences.parts.shortcut-control', ['label' => trans('common.previous'), 'id' => 'previous'])
    -

    Common Actions

    +

    {{ trans('preferences.shortcuts_section_actions') }}

    @include('users.preferences.parts.shortcut-control', ['label' => trans('common.new'), 'id' => 'new']) @@ -65,13 +62,10 @@
    -

    - Note: When shortcuts are enabled a helper overlay is available via pressing "?" which will - highlight the available shortcuts for actions currently visible on the screen. -

    +

    {{ trans('preferences.shortcuts_overlay_desc') }}

    - +