From ddcc63ef6cf529e7c5e03b65dc95175e79a47769 Mon Sep 17 00:00:00 2001 From: Jasper Date: Thu, 15 May 2014 22:23:29 +0200 Subject: [PATCH] Updated Backend + System language support Moved hard-coded text in "backend" and "system" to the language files (English and Dutch). Affected pages: administrator management, administrator group management, system updates, system settings, email settings. Also made some strings more generic for general use (like "Saving...." instead of "Saving administrator account...") --- modules/backend/controllers/groups/create.htm | 4 +-- modules/backend/controllers/groups/update.htm | 8 +++--- modules/backend/controllers/users/create.htm | 4 +-- .../backend/controllers/users/mysettings.htm | 4 +-- modules/backend/controllers/users/update.htm | 6 ++-- modules/backend/lang/en/lang.php | 11 +++----- modules/backend/lang/nl/lang.php | 11 +++----- modules/system/ServiceProvider.php | 4 +-- modules/system/controllers/Settings.php | 2 +- modules/system/controllers/settings/index.htm | 4 +-- .../system/controllers/settings/update.htm | 10 +++---- .../controllers/updates/config_list.yaml | 2 +- modules/system/controllers/updates/index.htm | 6 ++-- modules/system/lang/en/lang.php | 26 +++++++++++++++++ modules/system/lang/nl/lang.php | 28 ++++++++++++++++++- .../system/models/emailsettings/fields.yaml | 24 ++++++++-------- .../system/models/pluginversion/columns.yaml | 8 +++--- 17 files changed, 104 insertions(+), 58 deletions(-) diff --git a/modules/backend/controllers/groups/create.htm b/modules/backend/controllers/groups/create.htm index 11515d3bc..5f9bd728a 100644 --- a/modules/backend/controllers/groups/create.htm +++ b/modules/backend/controllers/groups/create.htm @@ -19,7 +19,7 @@ data-request="onSave" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-primary"> @@ -29,7 +29,7 @@ data-request-data="close:1" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-default"> diff --git a/modules/backend/controllers/groups/update.htm b/modules/backend/controllers/groups/update.htm index fc1b99ed2..2e42cf76e 100644 --- a/modules/backend/controllers/groups/update.htm +++ b/modules/backend/controllers/groups/update.htm @@ -20,7 +20,7 @@ data-request-data="redirect:0" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-primary"> @@ -30,7 +30,7 @@ data-request-data="close:1" data-hotkey="ctrl+enter" data-hotkey-mac="cmd+enter" - data-load-indicator="" + data-load-indicator="" class="btn btn-default"> @@ -38,8 +38,8 @@ type="button" class="btn btn-danger pull-right" data-request="onDelete" - data-load-indicator="" - data-request-confirm="Do you really want to delete this admin?"> + data-load-indicator="" + data-request-confirm=""> diff --git a/modules/backend/controllers/users/create.htm b/modules/backend/controllers/users/create.htm index 07d629402..b473c3b5c 100644 --- a/modules/backend/controllers/users/create.htm +++ b/modules/backend/controllers/users/create.htm @@ -19,7 +19,7 @@ data-request="onSave" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-primary"> @@ -29,7 +29,7 @@ data-request-data="close:1" data-hotkey="ctrl+enter" data-hotkey-mac="cmd+enter" - data-load-indicator="" + data-load-indicator="" class="btn btn-default"> diff --git a/modules/backend/controllers/users/mysettings.htm b/modules/backend/controllers/users/mysettings.htm index e303b1f5f..157c5edd2 100644 --- a/modules/backend/controllers/users/mysettings.htm +++ b/modules/backend/controllers/users/mysettings.htm @@ -20,7 +20,7 @@ data-request-data="redirect:0" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-primary"> @@ -30,7 +30,7 @@ data-request-data="close:1" data-hotkey="ctrl+enter" data-hotkey-mac="cmd+enter" - data-load-indicator="" + data-load-indicator="" class="btn btn-default"> diff --git a/modules/backend/controllers/users/update.htm b/modules/backend/controllers/users/update.htm index 41f053dbd..7a0281ae2 100644 --- a/modules/backend/controllers/users/update.htm +++ b/modules/backend/controllers/users/update.htm @@ -20,7 +20,7 @@ data-request-data="redirect:0" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="" + data-load-indicator="" class="btn btn-primary"> @@ -30,7 +30,7 @@ data-request-data="close:1" data-hotkey="ctrl+enter" data-hotkey-mac="cmd+enter" - data-load-indicator="" + data-load-indicator="" class="btn btn-default"> @@ -41,7 +41,7 @@ type="button" class="oc-icon-trash-o btn-icon danger pull-right" data-request="onDelete" - data-load-indicator="" + data-load-indicator="" data-request-confirm=""> diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php index 06ad0d334..c206c881d 100644 --- a/modules/backend/lang/en/lang.php +++ b/modules/backend/lang/en/lang.php @@ -60,9 +60,6 @@ return [ 'superuser_comment' => "Check this box to allow this person to access all areas.", 'send_invite' => 'Send invitation by email', 'send_invite_comment' => 'Use this checkbox to send an invitation to the user by email', - 'creating' => 'Creating Administrator...', - 'saving' => 'Saving Administrator...', - 'deleting' => 'Deleting Administrator...', 'delete_confirm' => 'Do you really want to delete this administrator?', 'return' => 'Return to the administrator list', 'group' => [ @@ -71,9 +68,7 @@ return [ 'menu_label' => 'Groups', 'list_title' => 'Manage Groups', 'new' => 'New Administrator Group', - 'creating' => 'Creating Group...', - 'saving' => 'Saving Group...', - 'deleting' => 'Deleting Group...', + 'delete_confirm' => 'Do you really want to delete this administrator group?', 'return' => 'Return to the group list', ], 'preferences' => [ @@ -103,16 +98,18 @@ return [ 'not_found' => 'Form record with an ID of :id could not be found.', 'create' => 'Create', 'create_and_close' => 'Create and close', + 'creating' => 'Creating...', 'save' => 'Save', 'save_and_close' => 'Save and close', 'saving' => 'Saving...', + 'delete' => 'Delete', + 'deleting' => 'Deleting...', 'undefined_tab' => 'Misc', 'field_off' => 'Off', 'field_on' => 'On', 'apply' => 'Apply', 'cancel' => 'Cancel', 'close' => 'Close', - 'delete' => 'Delete', 'ok' => 'OK', 'or' => 'or', 'confirm_tab_close' => 'Do you really want to close the tab? Unsaved changes will be lost.', diff --git a/modules/backend/lang/nl/lang.php b/modules/backend/lang/nl/lang.php index 54e35f9e8..569f86262 100644 --- a/modules/backend/lang/nl/lang.php +++ b/modules/backend/lang/nl/lang.php @@ -60,9 +60,6 @@ return [ 'superuser_comment' => "Vink deze optie aan om de gebruiker volledige rechten tot het systeem te geven.", 'send_invite' => 'Stuur uitnodiging per e-mail', 'send_invite_comment' => 'Vink deze optie aan om de gebruiker een uitnodiging per e-mail te sturen', - 'creating' => 'Administrator aanmaken...', - 'saving' => 'Administrator opslaan...', - 'deleting' => 'Groep verwijderen...', 'delete_confirm' => 'Weet je zeker dat je deze beheerder wilt verwijderen?', 'return' => 'Terug naar beheerdersoverzicht', 'group' => [ @@ -71,9 +68,7 @@ return [ 'menu_label' => 'Groepen', 'list_title' => 'Beheer Groepen', 'new' => 'Nieuwe Beheerdersgroep', - 'creating' => 'Groep aanmaken...', - 'saving' => 'Groep opslaan...', - 'deleting' => 'Groep verwijderen...', + 'delete_confirm' => 'Weet je zeker dat je deze beheerdersgroep wilt verwijderen?', 'return' => 'Terug naar groepenoverzicht', ], 'preferences' => [ @@ -103,16 +98,18 @@ return [ 'not_found' => 'Het formulier met record ID :id is niet gevonden.', 'create' => 'Maken', 'create_and_close' => 'Maken en sluiten', + 'creating' => 'Maken...', 'save' => 'Opslaan', 'save_and_close' => 'Opslaan en sluiten', 'saving' => 'Opslaan...', + 'delete' => 'Verwijderen', + 'deleting' => 'Verwijderen...', 'undefined_tab' => 'Overig', 'field_off' => 'Uit', 'field_on' => 'Aan', 'apply' => 'Toepassen', 'cancel' => 'Annuleren', 'close' => 'Sluiten', - 'delete' => 'Verwijderen', 'ok' => 'OK', 'or' => 'of', 'confirm_tab_close' => 'Weet je zeker dat je dit tabblad wilt sluiten? Niet opgeslagen wijzigingen gaan verloren.', diff --git a/modules/system/ServiceProvider.php b/modules/system/ServiceProvider.php index 75f1bc404..663256e42 100644 --- a/modules/system/ServiceProvider.php +++ b/modules/system/ServiceProvider.php @@ -155,8 +155,8 @@ class ServiceProvider extends ModuleServiceProvider SettingsManager::instance()->registerCallback(function($manager){ $manager->registerSettingItems('October.System', [ 'email' => [ - 'label' => 'Email Configuration', - 'description' => 'Manage email configuration.', + 'label' => 'system::lang.email.menu_label', + 'description' => 'system::lang.email.menu_description', 'category' => 'System', 'icon' => 'icon-envelope', 'class' => 'System\Models\EmailSettings', diff --git a/modules/system/controllers/Settings.php b/modules/system/controllers/Settings.php index c06fd519a..91185cd0b 100644 --- a/modules/system/controllers/Settings.php +++ b/modules/system/controllers/Settings.php @@ -73,7 +73,7 @@ class Settings extends Controller } $model->save(null, $this->formWidget->getSessionKey()); - Flash::success(Lang::get('system::lang.settings.update_success', ['name'=>$item->label])); + Flash::success(Lang::get('system::lang.settings.update_success', ['name' => Lang::get($item->label)])); if ($redirect = Backend::Url('system/settings')) return Redirect::to($redirect); diff --git a/modules/system/controllers/settings/index.htm b/modules/system/controllers/settings/index.htm index b460f89b9..32d8c0220 100644 --- a/modules/system/controllers/settings/index.htm +++ b/modules/system/controllers/settings/index.htm @@ -12,8 +12,8 @@
-
label ?>
-

description ?>

+
label)) ?>
+

description)) ?>

diff --git a/modules/system/controllers/settings/update.htm b/modules/system/controllers/settings/update.htm index e66e74ab0..e6781bcef 100644 --- a/modules/system/controllers/settings/update.htm +++ b/modules/system/controllers/settings/update.htm @@ -1,6 +1,6 @@ @@ -19,13 +19,13 @@ data-request-data="redirect:0" data-hotkey="ctrl+s" data-hotkey-mac="cmd+s" - data-load-indicator="Saving..." + data-load-indicator="" class="btn btn-primary"> - Save settings + - or Cancel + @@ -33,5 +33,5 @@

fatalError) ?>

-

Return to system settings

+

\ No newline at end of file diff --git a/modules/system/controllers/updates/config_list.yaml b/modules/system/controllers/updates/config_list.yaml index 753ac8f83..114251feb 100644 --- a/modules/system/controllers/updates/config_list.yaml +++ b/modules/system/controllers/updates/config_list.yaml @@ -2,7 +2,7 @@ # List Behavior Config # =================================== -title: Manage Updates +title: system::lang.updates.title list: @/modules/system/models/pluginversion/columns.yaml modelClass: System\Models\PluginVersion noRecordsMessage: backend::lang.list.no_records diff --git a/modules/system/controllers/updates/index.htm b/modules/system/controllers/updates/index.htm index e5da14949..48ae53f9c 100644 --- a/modules/system/controllers/updates/index.htm +++ b/modules/system/controllers/updates/index.htm @@ -10,16 +10,16 @@ href="javascript:;" data-request-confirm="Are you sure?" data-request="onDetachProject" - data-stripe-load-indicator>detach) + data-stripe-load-indicator>)

-

None

+

- Attach to Project +

diff --git a/modules/system/lang/en/lang.php b/modules/system/lang/en/lang.php index 3d174122f..b43704742 100644 --- a/modules/system/lang/en/lang.php +++ b/modules/system/lang/en/lang.php @@ -25,17 +25,38 @@ return [ 'project' => [ 'name' => 'Project', 'owner_label' => 'Owner', + 'attach' => 'Attach Project', + 'detach' => 'Detach Project', + 'none' => 'None', 'id' => [ 'label' => 'Project ID', 'help' => 'How to find your Project ID', 'missing' => 'Please specify a Project ID to use.', ], + 'detach_confirm_' => 'Are you sure you want to detach this project?', 'unbind_success' => 'Project has been detached successfully.', ], 'settings' => [ 'menu_label' => 'Settings', 'missing_model' => 'The settings page is missing a Model definition.', 'update_success' => 'Settings for :name have been updated successfully.', + 'return' => 'Return to system settings', + ], + 'email' => [ + 'menu_label' => 'Email Configuration', + 'menu_description' => 'Manage email configuration.', + 'method' => 'Email Method', + 'sender_name' => 'Sender Name', + 'sender_email' => 'Sender Email', + 'smtp_address' => 'SMTP Address', + 'smtp_authorization' => 'SMTP authorization required', + 'smtp_authorization_comment' => 'Use this checkbox if your SMTP server requires authorization.', + 'smtp_username' => 'Username', + 'smtp_password' => 'Password', + 'smtp_port' => 'SMTP Port', + 'smtp_ssl' => 'SSL connection required', + 'sendmail_path' => 'Sendmail Path', + 'sendmail_path_comment' => 'Please specify the path of the sendmail program.', ], 'install' => [ 'project_label' => 'Attach to Project', @@ -45,10 +66,15 @@ return [ 'install_success' => 'The plugin has been installed successfully.', ], 'updates' => [ + 'title' => 'Manage Updates', 'name' => 'Software update', 'menu_label' => 'Updates', 'check_label' => 'Check for updates', 'retry_label' => 'Try again', + 'plugin_name' => 'Name', + 'plugin_description' => 'Description', + 'plugin_version' => 'Version', + 'plugin_author' => 'Author', 'core_build' => 'Current build', 'core_build_old' => 'Current build :build', 'core_build_new' => 'Build :build', diff --git a/modules/system/lang/nl/lang.php b/modules/system/lang/nl/lang.php index 6b02ed2d4..b421c0f15 100644 --- a/modules/system/lang/nl/lang.php +++ b/modules/system/lang/nl/lang.php @@ -25,17 +25,38 @@ return [ 'project' => [ 'name' => 'Project', 'owner_label' => 'Eigenaar', + 'attach' => 'Project Koppelen', + 'detach' => 'Project Ontkoppelen', + 'none' => 'Geen', 'id' => [ 'label' => 'Project ID', 'help' => 'Hoe vind je jouw Project ID', 'missing' => 'Voer een Project ID in.', ], - 'unbind_success' => 'Project is succesvol losgekoppeld.', + 'detach_confirm_' => 'Are you sure you want to detach this project?', + 'unbind_success' => 'Project is succesvol ontkoppeld.', ], 'settings' => [ 'menu_label' => 'Instellingen', 'missing_model' => 'De instellingenpagina mist de definitie van een Model.', 'update_success' => 'Instellingen voor :name zijn succesvol bijgewerkt.', + 'return' => 'Terug naar systeeminstellingen', + ], + 'email' => [ + 'menu_label' => 'E-mailinstellingen', + 'menu_description' => 'Beheer e-mailinstellingen.', + 'method' => 'Email Methode', + 'sender_name' => 'Naam Afzender', + 'sender_email' => 'E-mailadres Afzender', + 'smtp_address' => 'SMTP Adres', + 'smtp_authorization' => 'SMTP authenticatie vereist', + 'smtp_authorization_comment' => 'Vink deze optie aan indien de SMTP server authenticatie vereist.', + 'smtp_username' => 'Gebruikersnaam', + 'smtp_password' => 'Wachtwoord', + 'smtp_port' => 'SMTP Poort', + 'smtp_ssl' => 'SSL verbinding vereist', + 'sendmail_path' => 'Pad naar Sendmail', + 'sendmail_path_comment' => 'Geef hier het volledige pad op naar de Sendmail-applicatie.', ], 'install' => [ 'project_label' => 'Koppel aan Project', @@ -45,10 +66,15 @@ return [ 'install_success' => 'De plugin is succesvol geïnstalleerd.', ], 'updates' => [ + 'title' => 'Beheer Updates', 'name' => 'Applicatie-update', 'menu_label' => 'Updates', 'check_label' => 'Controleer op updates', 'retry_label' => 'Probeer nogmaals', + 'plugin_name' => 'Naam', + 'plugin_description' => 'Omschrijving', + 'plugin_version' => 'Versie', + 'plugin_author' => 'Auteur', 'core_build' => 'Huidige build', 'core_build_old' => 'Huidige build :build', 'core_build_new' => 'Build :build', diff --git a/modules/system/models/emailsettings/fields.yaml b/modules/system/models/emailsettings/fields.yaml index ce86abe5f..4d268a91b 100644 --- a/modules/system/models/emailsettings/fields.yaml +++ b/modules/system/models/emailsettings/fields.yaml @@ -6,50 +6,50 @@ tabs: fields: send_mode: - label: Email Method + label: system::lang.email.method type: dropdown tab: General sender_name: - label: Sender Name + label: system::lang.email.sender_name span: auto tab: General sender_email: - label: Sender Email + label: system::lang.email.sender_email span: auto tab: General smtp_address: - label: SMTP address + label: system::lang.email.smtp_address tab: SMTP smtp_authorization: type: checkbox - label: SMTP Authorization Required + label: system::lang.email.smtp_authorization tab: SMTP - comment: Use this checkbox if your SMTP server requires authorization. + comment: system::lang.email.smtp_authorization_comment smtp_user: - label: User + label: system::lang.email.smtp_username tab: SMTP span: left smtp_password: - label: Password + label: system::lang.email.smtp_password tab: SMTP span: right smtp_port: - label: SMTP Port + label: system::lang.email.smtp_port tab: SMTP smtp_ssl: type: checkbox - label: SSL connection required + label: system::lang.email.smtp_ssl tab: SMTP sendmail_path: - label: Sendmail path - commentAbove: Please specify the path of the sendmail program. + label: system::lang.email.sendmail_path + commentAbove: system::lang.email.sendmail_path_comment tab: Sendmail \ No newline at end of file diff --git a/modules/system/models/pluginversion/columns.yaml b/modules/system/models/pluginversion/columns.yaml index db4ea1ff9..0e3c09bea 100644 --- a/modules/system/models/pluginversion/columns.yaml +++ b/modules/system/models/pluginversion/columns.yaml @@ -5,17 +5,17 @@ columns: name: - label: Name + label: system::lang.updates.plugin_name sortable: false description: - label: Description + label: system::lang.updates.plugin_description sortable: false version: - label: Version + label: system::lang.updates.plugin_version sortable: false author: - label: Author + label: system::lang.updates.plugin_author sortable: false \ No newline at end of file