Improve multilanguage support and cleanup

This commit is contained in:
gergo85 2014-12-19 10:28:27 +01:00
parent 8ae095b36e
commit c43680b2ef
7 changed files with 146 additions and 134 deletions

View File

@ -138,11 +138,11 @@ class ServiceProvider extends ModuleServiceProvider
$manager->registerPermissions('October.Backend', [
'backend.access_dashboard' => [
'label' => 'system::lang.permissions.view_the_dashboard',
'tab' => 'System'
'tab' => 'system::lang.permissions.name'
],
'backend.manage_users' => [
'backend.manage_users' => [
'label' => 'system::lang.permissions.manage_other_administrators',
'tab' => 'System'
'tab' => 'system::lang.permissions.name'
],
]);
});

View File

@ -2,26 +2,26 @@
return [
'auth' => [
'title' => 'Administration Area',
'title' => 'Administration Area'
],
'field' => [
'invalid_type' => 'Invalid field type used :type.',
'options_method_not_exists' => 'The model class :model must define a method :method() returning options for the ":field" form field.',
'options_method_not_exists' => "The model class :model must define a method :method() returning options for the ':field' form field."
],
'widget' => [
'not_registered' => "A widget class name ':name' has not been registered",
'not_bound' => "A widget with class name ':name' has not been bound to the controller",
'not_bound' => "A widget with class name ':name' has not been bound to the controller"
],
'page' => [
'untitled' => "Untitled",
'untitled' => 'Untitled',
'access_denied' => [
'label' => "Access denied",
'label' => 'Access denied',
'help' => "You don't have the required permissions to view this page.",
'cms_link' => "Return to the back-end",
],
'cms_link' => 'Return to the back-end'
]
],
'partial' => [
'not_found' => "The partial ':name' is not found.",
'not_found' => "The partial ':name' is not found."
],
'account' => [
'sign_out' => 'Sign out',
@ -30,21 +30,21 @@ return [
'restore' => 'Restore',
'login_placeholder' => 'login',
'password_placeholder' => 'password',
'forgot_password' => "Forgot your password?",
'enter_email' => "Enter your email",
'enter_login' => "Enter your login",
'email_placeholder' => "email",
'enter_new_password' => "Enter a new password",
'password_reset' => "Password Reset",
'restore_success' => "An email has been sent to your email address with password restore instructions.",
'forgot_password' => 'Forgot your password?',
'enter_email' => 'Enter your email',
'enter_login' => 'Enter your login',
'email_placeholder' => 'email',
'enter_new_password' => 'Enter a new password',
'password_reset' => 'Password Reset',
'restore_success' => 'An email has been sent to your email address with password restore instructions.',
'restore_error' => "A user could not be found with a login value of ':login'",
'reset_success' => "Your password has been successfully reset. You may now sign in.",
'reset_error' => "Invalid password reset data supplied. Please try again!",
'reset_fail' => "Unable to reset your password!",
'reset_success' => 'Your password has been successfully reset. You may now sign in.',
'reset_error' => 'Invalid password reset data supplied. Please try again!',
'reset_fail' => 'Unable to reset your password!',
'apply' => 'Apply',
'cancel' => 'Cancel',
'delete' => 'Delete',
'ok' => 'OK',
'ok' => 'OK'
],
'dashboard' => [
'menu_label' => 'Dashboard',
@ -66,7 +66,7 @@ return [
'widget_title_default' => 'System status',
'online' => 'online',
'maintenance' => 'in maintenance',
'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!',
'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!'
]
],
'user' => [
@ -75,18 +75,19 @@ return [
'menu_description' => 'Manage back-end administrator users, groups and permissions.',
'list_title' => 'Manage Administrators',
'new' => 'New Administrator',
'login' => "Login",
'first_name' => "First Name",
'last_name' => "Last Name",
'full_name' => "Full Name",
'email' => "Email",
'groups' => "Groups",
'groups_comment' => "Specify which groups this person belongs to.",
'avatar' => "Avatar",
'password' => "Password",
'password_confirmation' => "Confirm Password",
'superuser' => "Super User",
'superuser_comment' => "Check this box to allow this person to access all areas.",
'login' => 'Login',
'first_name' => 'First Name',
'last_name' => 'Last Name',
'full_name' => 'Full Name',
'email' => 'Email',
'groups' => 'Groups',
'groups_comment' => 'Specify which groups this person belongs to.',
'avatar' => 'Avatar',
'password' => 'Password',
'password_confirmation' => 'Confirm Password',
'permissions' => 'Permissions',
'superuser' => 'Super User',
'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',
'delete_confirm' => 'Do you really want to delete this administrator?',
@ -97,15 +98,11 @@ return [
'group' => [
'name' => 'Group',
'name_field' => 'Name',
'description_field' => 'Description',
'is_new_user_default_field' => 'Add new administrators to this group by default',
'code_field' => 'Code',
'code_comment' => 'Enter a unique code if you want to access it with the API.',
'menu_label' => 'Groups',
'list_title' => 'Manage Groups',
'new' => 'New Administrator Group',
'delete_confirm' => 'Do you really want to delete this administrator group?',
'return' => 'Return to the group list',
'return' => 'Return to the group list'
],
'preferences' => [
'not_authenticated' => 'There is no an authenticated user to load or save preferences for.'
@ -137,17 +134,17 @@ return [
'description_label' => 'Description'
],
'form' => [
'create_title' => "New :name",
'update_title' => "Edit :name",
'preview_title' => "Preview :name",
'create_title' => 'New :name',
'update_title' => 'Edit :name',
'preview_title' => 'Preview :name',
'create_success' => 'The :name has been created successfully',
'update_success' => 'The :name has been updated successfully',
'delete_success' => 'The :name has been deleted successfully',
'missing_id' => "Form record ID has not been specified.",
'missing_id' => 'Form record ID has not been specified.',
'missing_model' => 'Form behavior used in :class does not have a model defined.',
'missing_definition' => "Form behavior does not contain a field for ':field'.",
'not_found' => 'Form record with an ID of :id could not be found.',
'action_confirm' => "Are you sure?",
'action_confirm' => 'Are you sure?',
'create' => 'Create',
'create_and_close' => 'Create and close',
'creating' => 'Creating...',
@ -159,9 +156,6 @@ return [
'delete' => 'Delete',
'deleting' => 'Deleting...',
'deleting_name' => 'Deleting :name...',
'reset_default' => 'Reset to default',
'resetting' => 'Resetting',
'resetting_name' => 'Resetting :name',
'undefined_tab' => 'Misc',
'field_off' => 'Off',
'field_on' => 'On',
@ -182,41 +176,38 @@ return [
'select_placeholder' => 'please select',
'insert_row' => 'Insert Row',
'delete_row' => 'Delete Row',
'concurrency_file_changed_title' => "File was changed",
'concurrency_file_changed_description' => "The file you're editing has been changed on disk by another user. You can either reload the file and lose your changes or override the file on the disk.",
'concurrency_file_changed_title' => 'File was changed',
'concurrency_file_changed_description' => "The file you're editing has been changed on disk by another user. You can either reload the file and lose your changes or override the file on the disk."
],
'relation' => [
'missing_definition' => "Relation behavior does not contain a definition for ':field'.",
'missing_model' => "Relation behavior used in :class does not have a model defined.",
'invalid_action_single' => "This action cannot be performed on a singular relationship.",
'invalid_action_multi' => "This action cannot be performed on a multiple relationship.",
'help' => "Click on an item to add",
'related_data' => "Related :name data",
'add' => "Add",
'add_selected' => "Add selected",
'add_a_new' => "Add a new :name",
'cancel' => "Cancel",
'close' => "Close",
'add_name' => "Add :name",
'create' => "Create",
'create_name' => "Create :name",
'update' => "Update",
'update_name' => "Update :name",
'preview' => "Preview",
'preview_name' => "Preview :name",
'remove' => "Remove",
'remove_name' => "Remove :name",
'delete' => "Delete",
'delete_name' => "Delete :name",
'delete_confirm' => "Are you sure?",
'missing_model' => 'Relation behavior used in :class does not have a model defined.',
'invalid_action_single' => 'This action cannot be performed on a singular relationship.',
'invalid_action_multi' => 'This action cannot be performed on a multiple relationship.',
'help' => 'Click on an item to add',
'related_data' => 'Related :name data',
'add' => 'Add',
'add_selected' => 'Add selected',
'add_a_new' => 'Add a new :name',
'cancel' => 'Cancel',
'add_name' => 'Add :name',
'create' => 'Create',
'create_name' => 'Create :name',
'update' => 'Update',
'update_name' => 'Update :name',
'remove' => 'Remove',
'remove_name' => 'Remove :name',
'delete' => 'Delete',
'delete_name' => 'Delete :name',
'delete_confirm' => 'Are you sure?'
],
'model' => [
'name' => "Model",
'name' => 'Model',
'not_found' => "Model ':class' with an ID of :id could not be found",
'missing_id' => "There is no ID specified for looking up the model record.",
'missing_id' => 'There is no ID specified for looking up the model record.',
'missing_relation' => "Model ':class' does not contain a definition for ':relation'.",
'invalid_class' => "Model :model used in :class is not valid, it must inherit the \Model class.",
'mass_assignment_failed' => "Mass assignment failed for Model attribute ':attribute'.",
'mass_assignment_failed' => "Mass assignment failed for Model attribute ':attribute'."
],
'warnings' => [
'tips' => 'System configuration tips',
@ -235,14 +226,14 @@ return [
'highlight_active_line' => 'Highlight active line',
'show_invisibles' => 'Show invisible characters',
'show_gutter' => 'Show gutter',
'theme' => 'Color scheme',
'theme' => 'Color scheme'
],
'tooltips' => [
'preview_website' => 'Preview the website'
],
'mysettings' => [
'menu_label' => 'My Settings',
'menu_description' => 'Settings relate to your administration account',
'menu_description' => 'Settings relate to your administration account'
],
'myaccount' => [
'menu_label' => 'My account',
@ -271,7 +262,7 @@ return [
'menu_label' => 'Back-end preferences',
'menu_description' => 'Manage your account preferences such as desired language.',
'locale' => 'Language',
'locale_comment' => 'Select your desired locale for language use.',
'locale_comment' => 'Select your desired locale for language use.'
],
'access_log' => [
'hint' => 'This log displays a list of successful sign in attempts by administrators. Records are kept for a total of :days days.',
@ -282,7 +273,7 @@ return [
'ip_address' => 'IP address',
'first_name' => 'First name',
'last_name' => 'Last name',
'email' => 'Email',
'email' => 'Email'
],
'filter' => [
'all' => 'all'

View File

@ -40,14 +40,14 @@ tabs:
permissions[superuser]:
context: [create, update]
tab: Permissions
tab: backend::lang.user.permissions
label: backend::lang.user.superuser
type: checkbox
comment: backend::lang.user.superuser_comment
groups:
context: [create, update]
tab: Permissions
tab: backend::lang.user.permissions
label: backend::lang.user.groups
commentAbove: backend::lang.user.groups_comment
type: checkboxlist

View File

@ -39,7 +39,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.page.menu_label',
'icon' => 'icon-copy',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'pages'],
'attributes' => ['data-menu-item' => 'pages'],
'permissions' => ['cms.manage_pages'],
'counterLabel' => 'cms::lang.page.unsaved_label',
],
@ -47,7 +47,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.partial.menu_label',
'icon' => 'icon-tags',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'partials'],
'attributes' => ['data-menu-item' => 'partials'],
'permissions' => ['cms.manage_partials'],
'counterLabel' => 'cms::lang.partial.unsaved_label',
],
@ -55,7 +55,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.layout.menu_label',
'icon' => 'icon-th-large',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'layouts'],
'attributes' => ['data-menu-item' => 'layouts'],
'permissions' => ['cms.manage_layouts'],
'counterLabel' => 'cms::lang.layout.unsaved_label',
],
@ -63,7 +63,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.content.menu_label',
'icon' => 'icon-file-text-o',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'content'],
'attributes' => ['data-menu-item' => 'content'],
'permissions' => ['cms.manage_content'],
'counterLabel' => 'cms::lang.content.unsaved_label',
],
@ -71,7 +71,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.asset.menu_label',
'icon' => 'icon-picture-o',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'assets'],
'attributes' => ['data-menu-item' => 'assets'],
'permissions' => ['cms.manage_assets'],
'counterLabel' => 'cms::lang.asset.unsaved_label',
],
@ -79,7 +79,7 @@ class ServiceProvider extends ModuleServiceProvider
'label' => 'cms::lang.component.menu_label',
'icon' => 'icon-puzzle-piece',
'url' => 'javascript:;',
'attributes' => ['data-menu-item'=>'components'],
'attributes' => ['data-menu-item' => 'components'],
'permissions' => ['cms.manage_pages', 'cms.manage_layouts', 'cms.manage_partials']
]
]
@ -93,12 +93,30 @@ class ServiceProvider extends ModuleServiceProvider
*/
BackendAuth::registerCallback(function ($manager) {
$manager->registerPermissions('October.Cms', [
'cms.manage_content' => ['label' => 'cms::lang.permissions.manage_content', 'tab' => 'Cms'],
'cms.manage_assets' => ['label' => 'cms::lang.permissions.manage_assets', 'tab' => 'Cms'],
'cms.manage_pages' => ['label' => 'cms::lang.permissions.manage_pages', 'tab' => 'Cms'],
'cms.manage_layouts' => ['label' => 'cms::lang.permissions.manage_layouts', 'tab' => 'Cms'],
'cms.manage_partials' => ['label' => 'cms::lang.permissions.manage_partials', 'tab' => 'Cms'],
'cms.manage_themes' => ['label' => 'cms::lang.permissions.manage_themes', 'tab' => 'Cms']
'cms.manage_content' => [
'label' => 'cms::lang.permissions.manage_content',
'tab' => 'cms::lang.permissions.name'
],
'cms.manage_assets' => [
'label' => 'cms::lang.permissions.manage_assets',
'tab' => 'cms::lang.permissions.name'
],
'cms.manage_pages' => [
'label' => 'cms::lang.permissions.manage_pages',
'tab' => 'cms::lang.permissions.name'
],
'cms.manage_layouts' => [
'label' => 'cms::lang.permissions.manage_layouts',
'tab' => 'cms::lang.permissions.name'
],
'cms.manage_partials' => [
'label' => 'cms::lang.permissions.manage_partials',
'tab' => 'cms::lang.permissions.name'
],
'cms.manage_themes' => [
'label' => 'cms::lang.permissions.manage_themes',
'tab' => 'cms::lang.permissions.name'
]
]);
});

View File

@ -3,23 +3,23 @@
return [
'cms_object' => [
'invalid_file' => 'Invalid file name: :name. File names can contain only alphanumeric symbols, underscores, dashes and dots. Some examples of correct file names: page.htm, page, subdirectory/page',
'invalid_property' => 'The property ":name" cannot be set',
'file_already_exists' => 'File ":name" already exists.',
'error_saving' => 'Error saving file ":name". Please check write permissions.',
'invalid_property' => "The property ':name' cannot be set",
'file_already_exists' => "File ':name' already exists.",
'error_saving' => "Error saving file ':name'. Please check write permissions.",
'error_creating_directory' => 'Error creating directory :name. Please check write permissions.',
'invalid_file_extension'=>'Invalid file extension: :invalid. Allowed extensions are: :allowed.',
'error_deleting' => 'Error deleting the template file ":name". Please check write permissions.',
'error_deleting' => "Error deleting the template file ':name'. Please check write permissions.",
'delete_success' => 'Templates were successfully deleted: :count.',
'file_name_required' => 'The File Name field is required.'
],
'theme' => [
'active' => [
'not_set' => "The active theme is not set.",
'not_found' => "The active theme is not found.",
'not_set' => 'The active theme is not set.',
'not_found' => 'The active theme is not found.'
],
'edit' => [
'not_set' => "The edit theme is not set.",
'not_found' => "The edit theme is not found.",
'not_set' => 'The edit theme is not set.',
'not_found' => 'The edit theme is not found.',
'not_match' => "The object you're trying to access doesn't belong to the theme being edited. Please reload the page."
],
'settings_menu' => 'Front-end theme',
@ -27,22 +27,22 @@ return [
'find_more_themes' => 'Find more themes on OctoberCMS Theme Marketplace.',
'activate_button' => 'Activate',
'active_button' => 'Activate',
'customize_button' => 'Customize',
'customize_button' => 'Customize'
],
'maintenance' => [
'settings_menu' => 'Maintenance mode',
'settings_menu_description' => 'Configure the maintenance mode page and toggle the setting.',
'is_enabled' => 'Enable maintenance mode',
'is_enabled_comment' => 'When activated website visitors will see the page chosen below.',
'is_enabled_comment' => 'When activated website visitors will see the page chosen below.'
],
'page' => [
'not_found' => [
'label' => "Page not found",
'help' => "The requested page cannot be found.",
'label' => 'Page not found',
'help' => 'The requested page cannot be found.'
],
'custom_error' => [
'label' => "Page error",
'help' => "We're sorry, but something went wrong and the page cannot be displayed.",
'label' => 'Page error',
'help' => "We're sorry, but something went wrong and the page cannot be displayed."
],
'menu_label' => 'Pages',
'unsaved_label' => 'Unsaved page(s)',
@ -63,7 +63,7 @@ return [
'delete_confirm_single' => 'Do you really want delete this layout?'
],
'partial' => [
'invalid_name' => "Invalid partial name: :name.",
'invalid_name' => 'Invalid partial name: :name.',
'not_found' => "The partial ':name' is not found.",
'menu_label' => 'Partials',
'unsaved_label' => 'Unsaved partial(s)',
@ -82,11 +82,11 @@ return [
'new' => 'New content file'
],
'ajax_handler' => [
'invalid_name' => "Invalid AJAX handler name: :name.",
'not_found' => "AJAX handler ':name' was not found.",
'invalid_name' => 'Invalid AJAX handler name: :name.',
'not_found' => "AJAX handler ':name' was not found."
],
'cms' => [
'menu_label' => "CMS"
'menu_label' => 'CMS'
],
'sidebar' => [
'add' => 'Add',
@ -113,7 +113,7 @@ return [
'exit_fullscreen' => 'Exit fullscreen mode'
],
'asset' => [
'menu_label' => "Assets",
'menu_label' => 'Assets',
'unsaved_label' => 'Unsaved asset(s)',
'drop_down_add_title' => 'Add...',
'drop_down_operation_title' => 'Action...',
@ -141,7 +141,7 @@ return [
'too_large' => 'The uploaded file is too large. The maximum allowed file size is :max_size',
'type_not_allowed' => 'Only the following file types are allowed: :allowed_types',
'file_not_valid' => 'File is not valid',
'error_uploading_file' => 'Error uploading file ":name": :error',
'error_uploading_file' => "Error uploading file ':name': :error",
'move_please_select' => 'please select',
'move_destination' => 'Destination directory',
'move_popup_title' => 'Move assets',
@ -155,23 +155,24 @@ return [
'path' => 'Path'
],
'component' => [
'menu_label' => "Components",
'unnamed' => "Unnamed",
'no_description' => "No description provided",
'alias' => "Alias",
'alias_description' => "A unique name given to this component when using it in the page or layout code.",
'validation_message' => "Component aliases are required and can contain only Latin symbols, digits, and underscores. The aliases should start with a Latin symbol.",
'invalid_request' => "The template cannot be saved because of invalid component data.",
'menu_label' => 'Components',
'unnamed' => 'Unnamed',
'no_description' => 'No description provided',
'alias' => 'Alias',
'alias_description' => 'A unique name given to this component when using it in the page or layout code.',
'validation_message' => 'Component aliases are required and can contain only Latin symbols, digits, and underscores. The aliases should start with a Latin symbol.',
'invalid_request' => 'The template cannot be saved because of invalid component data.',
'no_records' => 'No components found',
'not_found' => "The component ':name' is not found.",
'method_not_found' => "The component ':name' does not contain a method ':method'.",
'method_not_found' => "The component ':name' does not contain a method ':method'."
],
'template' => [
'invalid_type' => "Unknown template type.",
'not_found' => "The requested template was not found.",
'saved'=> "The template has been successfully saved."
'invalid_type' => 'Unknown template type.',
'not_found' => 'The requested template was not found.',
'saved'=> 'The template has been successfully saved.'
],
'permissions' => [
'name' => 'Cms',
'manage_content' => 'Manage content',
'manage_assets' => 'Manage assets',
'manage_pages' => 'Manage pages',

View File

@ -204,15 +204,15 @@ class ServiceProvider extends ModuleServiceProvider
$manager->registerPermissions('October.System', [
'system.manage_settings' => [
'label' => 'system::lang.permissions.manage_system_settings',
'tab' => 'System'
'tab' => 'system::lang.permissions.name'
],
'system.manage_updates' => [
'label' => 'system::lang.permissions.manage_software_updates',
'tab' => 'System'
'tab' => 'system::lang.permissions.name'
],
'system.manage_mail_templates' => [
'label' => 'system::lang.permissions.manage_mail_templates',
'tab' => 'System'
'tab' => 'system::lang.permissions.name'
],
]);
});

View File

@ -23,10 +23,10 @@ return [
'tr' => 'Turkish',
],
'directory' => [
'create_fail' => "Cannot create directory: :name",
'create_fail' => 'Cannot create directory: :name',
],
'file' => [
'create_fail' => "Cannot create file: :name",
'create_fail' => 'Cannot create file: :name',
],
'combiner' => [
'not_found' => "The combiner file ':name' is not found.",
@ -66,13 +66,13 @@ return [
'disabled_help' => 'Plugins that are disabled are ignored by the application.',
'selected_amount' => 'Plugins selected: :amount',
'remove_confirm' => 'Are you sure?',
'remove_success' => "Successfully removed those plugins from the system.",
'remove_success' => 'Successfully removed those plugins from the system.',
'refresh_confirm' => 'Are you sure?',
'refresh_success' => "Successfully refreshed those plugins in the system.",
'refresh_success' => 'Successfully refreshed those plugins in the system.',
'disable_confirm' => 'Are you sure?',
'disable_success' => "Successfully disabled those plugins.",
'enable_success' => "Successfully enabled those plugins.",
'unknown_plugin' => "Plugin has been removed from the file system.",
'disable_success' => 'Successfully disabled those plugins.',
'enable_success' => 'Successfully enabled those plugins.',
'unknown_plugin' => 'Plugin has been removed from the file system.',
],
'project' => [
'name' => 'Project',
@ -114,6 +114,7 @@ return [
'smtp_password' => 'Password',
'smtp_port' => 'SMTP Port',
'smtp_ssl' => 'SSL connection required',
'sendmail' => 'Sendmail',
'sendmail_path' => 'Sendmail Path',
'sendmail_path_comment' => 'Please specify the path of the sendmail program.',
'mailgun' => 'Mailgun',
@ -242,6 +243,7 @@ return [
'status_code' => 'Status',
],
'permissions' => [
'name' => 'System',
'manage_system_settings' => 'Manage system settings',
'manage_software_updates' => 'Manage software updates',
'manage_mail_templates' => 'Manage mail templates',