From c58b5b56d754e9fe7718520ac396e1deb0606148 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Tue, 1 Sep 2020 12:43:39 +0100 Subject: [PATCH] Add administration localization options --- resources/lang/en/messages.php | 177 ++++++++++++++++++ resources/views/components/modal.blade.php | 2 +- .../views/components/no-permission.blade.php | 6 +- .../administration/devtools.blade.php | 24 +-- .../administration/editform.blade.php | 16 +- .../administration/editposition.blade.php | 30 +-- .../administration/formbuilder.blade.php | 10 +- .../administration/formpreview.blade.php | 14 +- .../dashboard/administration/forms.blade.php | 22 +-- .../administration/players.blade.php | 37 ++-- .../administration/positions.blade.php | 72 ++++--- .../administration/settings.blade.php | 14 +- .../administration/staff-members.blade.php | 24 +-- resources/views/dashboard/dashboard.blade.php | 48 +++-- 14 files changed, 334 insertions(+), 162 deletions(-) diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index e8a6ecc..a90f5db 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -16,6 +16,21 @@ return [ + // ============== REUSABLE STRINGS ======================= + + 'reusable' => [ + 'created_at' => 'Created at', + 'updated_at' => 'Updated at', + 'actions' => 'Actions', + 'delete' => 'Delete', + 'status' => 'Status', + 'no_access' => 'Application Access Denied', + 'validation_err' => 'Validation error!', + 'description' => 'Description', + 'join_date' => 'Join Date' + ], + + // ============== HOMEPAGE MESSAGES ====================== 'home' => 'Home', @@ -24,6 +39,7 @@ return [ 'logout' => 'Sign out', 'register' => 'Sign up', 'dashboard' => 'Dashboard', + 'back' => 'Go back', 'homepage_welcome' => 'Welcome to our team management center!', 'homepage_explainer_line1' => 'Here, you can apply for open staff member positions, view your application status, and manage your profile.', 'homepage_explainer_line2' => 'Sign up with Email to continue.', @@ -92,4 +108,165 @@ EOT, // ===================== DASHBOARD & COMPONENT MESSAGES =========================== + 'modal_close' => 'Close', + 'component_nopermission' => 'We\'re sorry, but you do not have permission to access this web page.', + 'component_accessdenied' => 'Access Denied', + 'component_contact' => 'Please contact your administrator if you believe this was in error.', + 'welcome_back' => 'Welcome back,', + 'eligible' => 'Eligible', + 'ineligible' => 'Ineligible', + 'eligibility_status' => 'Your current application eligibility status: :badgeStatus', + 'ongoing_apps' => 'Ongoing apps', + 'denied_apps' => 'Denied apps', + 'users_staff' => 'Total Users + Staff', + 'new_apps' => 'New applications', + 'v_backlog' => 'Vote backlog', + 'ranks' => 'Available ranks', + 'open' => 'Open', + 'closed' => 'Closed', + 'upcoming' => 'Your upcoming interviews', + 'soon' => 'Coming soon', + + + //=================== ADMINISTRATION MESSAGES (for all administration pages) =============== + + 'adm' => 'Administration', + 'devtools' => 'Developer Tools', + 'devoptions' => 'Developer Options', + 'forceeval' => 'Please choose an application to force re-evaluation', + 'appid' => 'Application ID', + 'no_valid_app' => 'There are no valid applications', + 'choose_app' => 'Choose an application', + 'dispatch_event' => 'Dispatch event now', + 'devtools_warn' => 'Do not use these options if you don\'t know what you\'re doing, even if you have access to this page.', + 'warn' => 'Warning', + 'override_votes' => 'Override Vote Evaluation', + 'artisan_evaluate' => 'Artisan: Evaluate Votes Now', // Tip: Artisan is a program name, therefore not translatable + 'devtools_info' => 'This panel may be also used to completely override the vote system in stalemate scenarios', + + + 'forms' => 'Forms', + 'positions' => 'Positions', // Context: Positions as in job opening + 'edit_form' => 'Edit Form', + 'edt' => 'Editor', + 'edit' => 'Edit', + 'edt_action' => 'Editing', + 'txtbox' => 'Textbox', + 'multiline' => 'Multi line answer', + 'checkbox' => 'Checkbox', + 'field_type' => 'Choose a field type', + 'save_exit' => 'Save & Quit', + 'new_field' => 'New field', + 'vacancy_edit' => 'Vacancy Editor', + 'new_vacancy' => 'New Vacancy', + 'form_consistency' => 'For consistency purposes, grayed out fields can\'t be edited.', + + 'vacancy' => [ + 'add' => 'Add vacancy', + 'name' => 'Vacancy Name', + 'description' => 'Vacancy Description', + 'details' => 'Vacancy Details', + 'markdown' => 'Markdown Supported', + 'no_details' => 'No details yet... Add some!', + 'permission_group' => 'Permission Group', + 'permission_group_tooltip' => 'The permission group from your server/network\'s permissions manager. Compatible with Luckperms and PEX.', + 'discord_roleid' => 'Discord Role ID', + 'discord_roleid_tooltip' => 'Discord Desktop: Go to your Account Settings > Appearance -> Advanced and toggle Developer Mode. On your server\'s roles tab, right click any role to copy it\'s ID.', + 'current_form' => 'Current Form (uneditable)', + 'remaining_slots' => 'Remaining slots', + 'free_slots' => 'Free slots', + 'free_slots_tooltip' => 'How many submissions before the vacancy stops accepting new applicants?', + 'save' => 'Save Changes', + 'cancel' => 'Cancel', + 'close_vacancy' => 'Close Position', + 'description_tooltip' => 'Add things like admission requirements, rank resposibilities and roles, and anything else you feel is necessary', + '' + + ], + + 'form' => 'Form', + + 'form_builder' => [ + 'builder' => 'Form Builder', + 'builder_name' => 'Application Form Management Tool', + 'name_form' => 'Name your form...', + 'save_form' => 'Save Form', + ], + + 'form_preview' => [ + 'preview' => 'Preview', + 'title' => 'Application Form Preview', + 'looks' => 'This is how your form looks like to applicants', + 'f_info' => 'You may edit it and add more fields later.', + '' + ], + + 'forms_p' => [ + + 'available_forms' => 'Available forms', + 'form_title' => 'Form title', + 'empty_noforms' => 'Nothing to see here! Please add some forms first.', + 'new_form' => 'NEW FORM' + ], + + 'players' => [ + + 'reg_players' => 'Registered players', + 'reg_players_staff' => 'See Registered Players (Applicant Pool)', + 'total_banned' => 'Total Banned Players', + 'search' => 'Search players', + 'f_p_search' => 'Full/partial email search', + 'p_disclaimer' => 'Please note: This list only includes players registered in the team management portal. In a future release, all network players will be shown here.', + 'listing' => 'Player Listing', + 'reg_date' => 'Registration Date', + 'ign' => 'IGN', // Context: Short for In-Game Name + 'banned' => 'Banned', + 'active' => 'Active', + 'no_reg' => 'There are no registered players!', + 'no_reg_exp' => << 'See Staff Members' + + ], + + 'positions_p' => [ + + 'application_form' => 'Application Form', + 'select_form' => 'Select a form...', + 'no_form_error' => << 'NEW POSITION', + 'empty_pos_warning' => 'Nothing to see here! Open some vacancies first. This will get applicants pouring in! (hopefully)', + 'manage_forms' => 'MANAGE APPLICATION FORMS', + + ], + + 'settings' => [ + + 'settings' => 'Settings', + 'settings_header' => 'Notification Settings', + 'settings_p' => 'Change which notifications are sent here.', + 'back_btn' => 'Back to Dashboard' + + ], + + 'staff' => [ + + 'members' => 'Staff Members', + 'active_sm' => 'Active Staff Members', + 'm_listing' => 'Member Listing', + 'f_name' => 'Full Name', + 'rank' => 'Rank', + ], + + // ======================== APPLICATION RENDERING MESSAGES ========================= + + + + ]; diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php index 62ec332..ccbcb52 100644 --- a/resources/views/components/modal.blade.php +++ b/resources/views/components/modal.blade.php @@ -17,7 +17,7 @@ {{ $modalFooter }} @if ($includeCloseButton == true) - + @endif diff --git a/resources/views/components/no-permission.blade.php b/resources/views/components/no-permission.blade.php index 7695e4d..469e4b6 100644 --- a/resources/views/components/no-permission.blade.php +++ b/resources/views/components/no-permission.blade.php @@ -16,12 +16,12 @@
-

Access Denied

+

{{__('messages.component_accessdenied')}}

- We're sorry, but you do not have permission to access this web page. + {{__('messages.component_nopermission')}}

- Please contact your administrator if you believe this was in error. + {{__('messages.component_contact')}}

diff --git a/resources/views/dashboard/administration/devtools.blade.php b/resources/views/dashboard/administration/devtools.blade.php index a8b74a9..fae3687 100644 --- a/resources/views/dashboard/administration/devtools.blade.php +++ b/resources/views/dashboard/administration/devtools.blade.php @@ -1,10 +1,10 @@ @extends('adminlte::page') -@section('title', 'Raspberry Network | Developer Options') +@section('title', config('app.name') . ' | ' . __('messages.devoptions')) @section('content_header') -

Administration / Developer Tools

+

{{__('messages.adm')}} / {{__('messages.devtools')}}

@stop @@ -14,27 +14,27 @@ @section('content') - + -

Please choose an application to force re-evaluation

+

{{__('messages.forceeval')}}

@csrf
- +
@@ -44,8 +44,8 @@
- Warning -

Do not use these options if you don't know what you're doing, even if you have access to this page.

+ {{__('messages.warn')}} +

{{__('messages.devtools_warn')}}

@@ -60,11 +60,11 @@ - - + + -

This panel may be also used to completely override the vote system in stalemate scenarios.

+

.

diff --git a/resources/views/dashboard/administration/editform.blade.php b/resources/views/dashboard/administration/editform.blade.php index 6dee177..b229e95 100644 --- a/resources/views/dashboard/administration/editform.blade.php +++ b/resources/views/dashboard/administration/editform.blade.php @@ -4,7 +4,7 @@ @section('content_header') -

Administration / Forms / Editor

+

{{__('messages.adm')}} / {{__('messages.forms')}} / {{__('messages.edt')}}

@stop @@ -47,7 +47,7 @@
-

Editing {{ $title }}...

+

{{__('messages.edt_action')}} {{ $title }}...

@@ -61,10 +61,10 @@ @@ -82,8 +82,8 @@ diff --git a/resources/views/dashboard/administration/editposition.blade.php b/resources/views/dashboard/administration/editposition.blade.php index b0b5eb2..beffcbd 100644 --- a/resources/views/dashboard/administration/editposition.blade.php +++ b/resources/views/dashboard/administration/editposition.blade.php @@ -4,7 +4,7 @@ @section('content_header') -

Administration / Positions / Edit

+

{{__('messages.adm')}} / {{__('messages.positions')}} / {{__('messages.edit')}}

@stop @@ -24,7 +24,7 @@
-

Vacancy Editor

+

{{__('messages.vacancy_edit')}}

@@ -49,7 +49,7 @@
-

For consistency purposes, grayed out fields can't be edited.

+

{{__('messages.form_consistency')}}

@@ -61,14 +61,14 @@
- +
- + @@ -81,9 +81,9 @@
- - - Markdown supported + + + {{__('messages.vacancy.markdown')}}
@@ -93,14 +93,14 @@
- +
- + @@ -111,10 +111,10 @@
- + - + @@ -128,15 +128,15 @@