Added translation strings for permission labels, mail template/layout column labels, editor fullscreen, list pagination and list setup modal.

This commit is contained in:
Paul Wilde 2014-08-09 03:02:15 +01:00
parent c92c36aeff
commit 906370c6bd
11 changed files with 53 additions and 30 deletions

View File

@ -121,8 +121,8 @@ class ServiceProvider extends ModuleServiceProvider
*/
BackendAuth::registerCallback(function($manager) {
$manager->registerPermissions('October.Backend', [
'backend.access_dashboard' => ['label' => 'View the dashboard', 'tab' => 'System'],
'backend.manage_users' => ['label' => 'Manage other administrators', 'tab' => 'System'],
'backend.access_dashboard' => ['label' => 'system::lang.permissions.view_the_dashboard', 'tab' => 'System'],
'backend.manage_users' => ['label' => 'system::lang.permissions.manage_other_administrators', 'tab' => 'System'],
]);
});

View File

@ -22,13 +22,13 @@
<li class="fullscreen-enable">
<a href="javascript:;">
<i class="icon-desktop"></i>
<abbr title="ctrl+alt+f">Enter fullscreen mode</abbr>
<abbr title="ctrl+alt+f"><?= e(trans('cms::lang.editor.enter_fullscreen')) ?></abbr>
</a>
</li>
<li class="fullscreen-disable">
<a href="javascript:;">
<i class="icon-desktop"></i>
<abbr title="ctrl+alt+f or esc">Exit fullscreen mode</abbr>
<abbr title="ctrl+alt+f or esc"><?= e(trans('cms::lang.editor.exit_fullscreen')) ?></abbr>
</a>
</li>
</ul>

View File

@ -109,6 +109,13 @@ return [
'missing_definition' => "List behavior does not contain a column for ':field'.",
'behavior_not_ready' => 'List behavior has not been initialized, check that you have called makeLists() in your controller.',
'invalid_column_datetime' => "Column value ':column' is not a DateTime object, are you missing a \$dates reference in the Model?",
'pagination' => 'Displayed records: :from-:to of :total',
'setup_title' => 'List Setup',
'setup_help' => 'Use checkboxes to select columns you want to see in the list. You can change position of columns by dragging them up or down.',
'records_per_page' => 'Records per page',
'records_per_page_help' => 'Select the number of records per page to display. Please note that high number of records on a single page can reduce performance.',
'apply_changes' => 'Apply changes',
'cancel' => 'Cancel'
],
'form' => [
'create_title' => "New :name",

View File

@ -1,6 +1,8 @@
<div class="loading-indicator-container size-small pull-right">
<div class="control-pagination">
<span class="page-iteration">Displayed records: <?= $pageFrom ?>-<?= $pageTo ?> of <?= $recordTotal ?></span>
<span class="page-iteration">
<?= e(trans('backend::lang.list.pagination', ['from' => $pageFrom, 'to' => $pageTo, 'total' => $recordTotal])) ?>
</span>
<?php if ($pageCurrent > 1): ?>
<a
href="javascript:;"

View File

@ -1,13 +1,10 @@
<?= Form::open() ?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">List Setup</h4>
<h4 class="modal-title"><?= e(trans('backend::lang.list.setup_title')) ?></h4>
</div>
<div class="modal-body">
<p>
Use checkboxes to select columns you want to see in the list.
You can change position of columns by dragging them up or down.
</p>
<p><?= e(trans('backend::lang.list.setup_help')) ?></p>
<div class="control-simplelist with-checkboxes is-sortable" data-control="simplelist">
<ul>
@ -37,10 +34,9 @@
<?php if ($this->showPagination): ?>
<div class="form-group">
<label>Records per page</label>
<label><?= e(trans('backend::lang.list.records_per_page')) ?></label>
<p class="help-block">
Select the number of records per page to display.
Please note that high number of records on a single page can reduce performance.
<?= e(trans('backend::lang.list.records_per_page_help')) ?>
</p>
<select class="form-control custom-select" name="records_per_page">
<?php foreach ($perPageOptions as $optionValue): ?>
@ -58,13 +54,13 @@
data-request="<?= $this->getEventHandler('onApplySetup') ?>"
data-dismiss="popup"
data-stripe-load-indicator>
Apply changes
<?= e(trans('backend::lang.list.apply_changes')) ?>
</button>
<button
type="button"
class="btn btn-default"
data-dismiss="popup">
Cancel
<?= e(trans('backend::lang.list.cancel')) ?>
</button>
</div>
<?= Form::close() ?>

View File

@ -86,12 +86,12 @@ class ServiceProvider extends ModuleServiceProvider
*/
BackendAuth::registerCallback(function($manager) {
$manager->registerPermissions('October.Cms', [
'cms.manage_content' => ['label' => 'Manage content', 'tab' => 'Cms'],
'cms.manage_assets' => ['label' => 'Manage assets', 'tab' => 'Cms'],
'cms.manage_pages' => ['label' => 'Manage pages', 'tab' => 'Cms'],
'cms.manage_layouts' => ['label' => 'Manage layouts', 'tab' => 'Cms'],
'cms.manage_partials' => ['label' => 'Manage partials', 'tab' => 'Cms'],
'cms.manage_themes' => ['label' => 'Manage themes', 'tab' => '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']
]);
});

View File

@ -100,7 +100,9 @@ return [
'code' => 'Code',
'content' => 'Content',
'hidden' => 'Hidden',
'hidden_comment' => 'Hidden pages are accessible only by logged-in back-end users.'
'hidden_comment' => 'Hidden pages are accessible only by logged-in back-end users.',
'enter_fullscreen' => 'Enter fullscreen mode',
'exit_fullscreen' => 'Exit fullscreen mode'
],
'asset' => [
'menu_label' => "Assets",
@ -156,5 +158,13 @@ return [
'invalid_type' => "Unknown template type.",
'not_found' => "The requested template was not found.",
'saved'=> "The template has been successfully saved."
],
'permissions' => [
'manage_content' => 'Manage content',
'manage_assets' => 'Manage assets',
'manage_pages' => 'Manage pages',
'manage_layouts' => 'Manage layouts',
'manage_partials' => 'Manage partials',
'manage_themes' => 'Manage themes'
]
];

View File

@ -164,9 +164,9 @@ class ServiceProvider extends ModuleServiceProvider
*/
BackendAuth::registerCallback(function($manager) {
$manager->registerPermissions('October.System', [
'system.manage_settings' => ['label' => 'Manage system settings', 'tab' => 'System'],
'system.manage_updates' => ['label' => 'Manage software updates', 'tab' => 'System'],
'system.manage_mail_templates' => ['label' => 'Manage mail templates', 'tab' => 'System'],
'system.manage_settings' => ['label' => 'system::lang.permissions.manage_system_settings', 'tab' => 'System'],
'system.manage_updates' => ['label' => 'system::lang.permissions.manage_software_updates', 'tab' => 'System'],
'system.manage_mail_templates' => ['label' => 'system::lang.permissions.manage_mail_templates', 'tab' => 'System'],
]);
});

View File

@ -221,4 +221,11 @@ return [
'url' => 'URL',
'status_code' => 'Status',
],
'permissions' => [
'manage_system_settings' => 'Manage system settings',
'manage_software_updates' => 'Manage software updates',
'manage_mail_templates' => 'Manage mail templates',
'manage_other_administrators' => 'Manage other administrators',
'view_the_dashboard' => 'View the dashboard'
]
];

View File

@ -5,9 +5,9 @@
columns:
name:
label: Name
label: system::lang.mail_templates.name
searchable: true
code:
label: Code
label: system::lang.mail_templates.code
searchable: true

View File

@ -5,17 +5,18 @@
columns:
code:
label: Code
label: system::lang.mail_templates.code
searchable: true
subject:
label: Subject
label: system::lang.mail_templates.subject
searchable: true
description:
label: Description
label: system::lang.mail_templates.description
searchable: true
layout:
label: system::lang.mail_templates.layout
relation: layout
select: @name