Update various language references

This commit is contained in:
Samuel Georges 2015-03-16 19:33:58 +11:00
parent 77d3ab8b67
commit 851d421092
14 changed files with 105 additions and 57 deletions

View File

@ -7,41 +7,41 @@ tabs:
fields:
name:
label: Name
placeholder: New theme name
label: cms::lang.theme.name_label
placeholder: cms::lang.theme.name_create_placeholder
span: auto
required: true
attributes:
default-focus: 1
dir_name@create:
label: Directory name
label: cms::lang.theme.dir_name_label
placeholder: cms::lang.theme.dir_name_create_label
span: auto
placeholder: The destination theme directory
preset: name
required: true
dir_name@update:
label: Directory name
label: cms::lang.theme.dir_name_label
disabled: true
span: auto
description:
label: Description
placeholder: Theme description
label: cms::lang.theme.description_label
placeholder: cms::lang.theme.description_placeholder
type: textarea
size: tiny
author:
label: Author
placeholder: Person or company name
label: cms::lang.theme.author_label
placeholder: cms::lang.theme.author_placeholder
span: auto
homepage:
label: Homepage
placeholder: Website URL
label: cms::lang.theme.homepage_label
placeholder: cms::lang.theme.homepage_placeholder
span: auto
code:
label: Code
placeholder: A unique code for this theme used for distribution
label: cms::lang.theme.code_label
placeholder: cms::lang.theme.code_placeholder

View File

@ -74,7 +74,7 @@ class Themes extends Controller
$theme = $this->findThemeObject();
if ($theme->isActiveTheme()) {
throw new ApplicationException('Cannot delete the active theme, try making another theme active first.');
throw new ApplicationException(trans('cms::lang.theme.delete_active_theme_failed'));
}
$themePath = $theme->getPath();
@ -82,7 +82,7 @@ class Themes extends Controller
File::deleteDirectory($themePath);
}
Flash::success('Deleted theme successfully!');
Flash::success(trans('cms::lang.theme.delete_theme_success'));
return Redirect::refresh();
}
@ -142,15 +142,15 @@ class Themes extends Controller
$data = array_except($data, 'dir_name');
if (!strlen(trim(array_get($data, 'name')))) {
throw new ValidationException(['name' => 'Please specify a name for the theme.']);
throw new ValidationException(['name' => trans('cms::lang.theme.create_theme_required_name')]);
}
if (!preg_match('/^[a-z0-9\_\-]+$/i', $newDirName)) {
throw new ValidationException(['dir_name' => 'Name can contain only digits, Latin letters and the following symbols: _-']);
throw new ValidationException(['dir_name' => trans('cms::lang.theme.dir_name_invalid')]);
}
if (File::isDirectory($destinationPath)) {
throw new ValidationException(['dir_name' => 'Desired theme directory already exists.']);
throw new ValidationException(['dir_name' => trans('cms::lang.theme.dir_name_taken')]);
}
File::makeDirectory($destinationPath);
@ -164,7 +164,7 @@ class Themes extends Controller
$theme = CmsTheme::load($newDirName);
$theme->writeConfig($data);
Flash::success('Created theme successfully!');
Flash::success(trans('cms::lang.theme.create_theme_success'));
return Redirect::refresh();
}
@ -200,11 +200,11 @@ class Themes extends Controller
$destinationPath = themes_path().'/'.$newDirName;
if (!preg_match('/^[a-z0-9\_\-]+$/i', $newDirName)) {
throw new ValidationException(['new_dir_name' => 'Name can contain only digits, Latin letters and the following symbols: _-']);
throw new ValidationException(['new_dir_name' => trans('cms::lang.theme.dir_name_invalid')]);
}
if (File::isDirectory($destinationPath)) {
throw new ValidationException(['new_dir_name' => 'Duplicate theme directory already exists.']);
throw new ValidationException(['new_dir_name' => trans('cms::lang.theme.dir_name_taken')]);
}
File::copyDirectory($sourcePath, $destinationPath);
@ -212,7 +212,7 @@ class Themes extends Controller
$newName = $newTheme->getConfigValue('name') . ' - Copy';
$newTheme->writeConfig(['name' => $newName]);
Flash::success('Duplicated theme successfully!');
Flash::success(trans('cms::lang.theme.duplicate_theme_success'));
return Redirect::refresh();
}
@ -341,7 +341,7 @@ class Themes extends Controller
$model = new ThemeImport;
$model->import($theme, $widget->getSaveData(), $widget->getSessionKey());
Flash::success('Imported theme successfully!');
Flash::success(trans('cms::lang.theme.import_theme_success'));
return Redirect::refresh();
}

View File

@ -5,7 +5,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Create theme</h4>
<h4 class="modal-title"><?= e(trans('cms::lang.theme.create_title')) ?></h4>
</div>
<?php if (!$this->fatalError): ?>
@ -17,7 +17,7 @@
<button
type="submit"
class="btn btn-primary">
Create
<?= e(trans('cms::lang.theme.create_button')) ?>
</button>
<button

View File

@ -7,7 +7,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Duplicate theme: <?= $themeDir ?></h4>
<h4 class="modal-title"><?= e(trans('cms::lang.theme.duplicate_title')) ?>: <?= $themeDir ?></h4>
</div>
<?php if (!$this->fatalError): ?>
@ -16,7 +16,7 @@
<div class="form-group text-field span-full">
<label for="Form-ThemeDuplicate-newDirName">
Theme directory
<?= e(trans('cms::lang.theme.new_directory_name_label')) ?>
</label>
<input
type="text"
@ -29,7 +29,7 @@
maxlength="255" />
<p class="help-block">
Provide a new directory name for the duplicated theme.
<?= e(trans('cms::lang.theme.new_directory_name_comment')) ?>
</p>
</div>
@ -38,7 +38,7 @@
<button
type="submit"
class="btn btn-success">
Duplicate
<?= e(trans('cms::lang.theme.duplicate_button')) ?>
</button>
<button

View File

@ -8,7 +8,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Export theme</h4>
<h4 class="modal-title"><?= e(trans('cms::lang.theme.export_title')) ?></h4>
</div>
<?php if (!$this->fatalError): ?>
@ -20,7 +20,7 @@
<button
type="submit"
class="btn btn-success">
Export
<?= e(trans('cms::lang.theme.export_button')) ?>
</button>
<button

View File

@ -7,7 +7,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Theme: <?= $themeDir ?></h4>
<h4 class="modal-title"><?= e(trans('cms::lang.theme.edit_properties_title')) ?>: <?= $themeDir ?></h4>
</div>
<?php if (!$this->fatalError): ?>
@ -19,7 +19,7 @@
<button
type="submit"
class="btn btn-primary">
Save properties
<?= e(trans('cms::lang.theme.save_properties')) ?>
</button>
<button

View File

@ -8,7 +8,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title">Import theme</h4>
<h4 class="modal-title"><?= e(trans('cms::lang.theme.import_title')) ?></h4>
</div>
<?php if (!$this->fatalError): ?>
@ -20,7 +20,7 @@
<button
type="submit"
class="btn btn-success">
Import
<?= e(trans('cms::lang.theme.import_button')) ?>
</button>
<button

View File

@ -21,7 +21,7 @@
data-size="huge"
href="javascript:;"
target="_blank">
Create a new blank theme
<?= e(trans('cms::lang.theme.create_new_blank_theme')) ?>
</a>
<a
class="find-more-themes"

View File

@ -47,9 +47,9 @@
data-toggle="dropdown"
class="btn btn-default">
<i class="icon-wrench"></i>
Manage
<?= e(trans('cms::lang.theme.manage_button')) ?>
</button>
<ul class="dropdown-menu" role="menu" data-dropdown-title="Manage theme">
<ul class="dropdown-menu" role="menu" data-dropdown-title="<?= e(trans('cms::lang.theme.manage_title')) ?>">
<li role="presentation">
<a
role="menuitem"
@ -60,7 +60,7 @@
data-request-data="theme: '<?= e($theme->getDirName()) ?>'"
href="javascript:;"
class="oc-icon-pencil">
Edit properties
<?= e(trans('cms::lang.theme.edit_properties_button')) ?>
</a>
</li>
<li role="presentation">
@ -72,7 +72,8 @@
data-request-data="theme: '<?= e($theme->getDirName()) ?>'"
href="javascript:;"
class="oc-icon-copy">
Duplicate
<?= e(trans('cms::lang.theme.duplicate_button')) ?>
</a>
</li>
<li role="presentation">
@ -84,7 +85,7 @@
data-request-data="theme: '<?= e($theme->getDirName()) ?>'"
href="javascript:;"
class="oc-icon-upload">
Import
<?= e(trans('cms::lang.theme.import_button')) ?>
</a>
</li>
<li role="presentation">
@ -96,7 +97,7 @@
data-request-data="theme: '<?= e($theme->getDirName()) ?>'"
href="javascript:;"
class="oc-icon-download">
Export
<?= e(trans('cms::lang.theme.export_button')) ?>
</a>
</li>
<li role="presentation" class="divider"></li>
@ -105,11 +106,11 @@
role="menuitem"
tabindex="-1"
data-request="onDelete"
data-request-confirm="Are you sure you want to delete this theme? It cannot be undone!"
data-request-confirm="<?= e(trans('cms::lang.theme.delete_confirm')) ?>"
data-request-data="theme: '<?= e($theme->getDirName()) ?>'"
href="javascript:;"
class="oc-icon-trash">
Delete
<?= e(trans('cms::lang.theme.delete_button')) ?>
</a>
</li>
</ul>

View File

@ -8,6 +8,6 @@
<?php if ($this->fatalError): ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<p><a href="<?= Backend::url('cms/themes') ?>" class="btn btn-default">Return to themes list</a></p>
<p><a href="<?= Backend::url('cms/themes') ?>" class="btn btn-default"><?= e(trans('cms::lang.theme.return')) ?></a></p>
<?php endif ?>

View File

@ -54,6 +54,6 @@
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<p><a href="<?= Backend::url('cms/themes') ?>" class="btn btn-default">Return to themes list</a></p>
<p><a href="<?= Backend::url('cms/themes') ?>" class="btn btn-default"><?= e(trans('cms::lang.theme.return')) ?></a></p>
<?php endif ?>

View File

@ -25,10 +25,57 @@ return [
],
'settings_menu' => 'Front-end theme',
'settings_menu_description' => 'Preview the list of installed themes and select an active theme.',
'find_more_themes' => 'Find more themes on OctoberCMS Theme Marketplace.',
'name_label' => 'Name',
'name_create_placeholder' => 'New theme name',
'author_label' => 'Author',
'author_placeholder' => 'Person or company name',
'description_label' => 'Description',
'description_placeholder' => 'Theme description',
'homepage_label' => 'Homepage',
'homepage_placeholder' => 'Website URL',
'code_label' => 'Code',
'code_placeholder' => 'A unique code for this theme used for distribution',
'dir_name_label' => 'Directory name',
'dir_name_create_label' => 'The destination theme directory',
'theme_label' => 'Theme',
'activate_button' => 'Activate',
'active_button' => 'Activate',
'customize_button' => 'Customize'
'customize_button' => 'Customize',
'duplicate_button' => 'Duplicate',
'duplicate_title' => 'Duplicate theme',
'duplicate_theme_success' => 'Duplicated theme successfully!',
'manage_button' => 'Manage',
'manage_title' => 'Manage theme',
'edit_properties_title' => 'Theme',
'edit_properties_button' => 'Edit properties',
'save_properties' => 'Save properties',
'import_button' => 'Import',
'import_title' => 'Import theme',
'import_theme_success' => 'Imported theme successfully!',
'import_uploaded_file' => 'Theme archive file',
'import_overwrite_label' => 'Overwrite existing files',
'import_overwrite_comment' => 'Untick this box to only import new files',
'import_folders_label' => 'Folders',
'import_folders_comment' => 'Please select the theme folders you would like to import',
'export_button' => 'Export',
'export_title' => 'Export theme',
'export_folders_label' => 'Folders',
'export_folders_comment' => 'Please select the theme folders you would like to import',
'delete_button' => 'Delete',
'delete_confirm' => 'Are you sure you want to delete this theme? It cannot be undone!',
'delete_active_theme_failed' => 'Cannot delete the active theme, try making another theme active first.',
'delete_theme_success' => 'Deleted theme successfully!',
'create_title' => 'Create theme',
'create_button' => 'Create',
'create_new_blank_theme' => 'Create a new blank theme',
'create_theme_success' => 'Created theme successfully!',
'create_theme_required_name' => 'Please specify a name for the theme.',
'new_directory_name_label' => 'Theme directory',
'new_directory_name_comment' => 'Provide a new directory name for the duplicated theme.',
'dir_name_invalid' => 'Name can contain only digits, Latin letters and the following symbols: _-',
'dir_name_taken' => 'Desired theme directory already exists.',
'find_more_themes' => 'Find more themes on OctoberCMS Theme Marketplace',
'return' => 'Return to themes list',
],
'maintenance' => [
'settings_menu' => 'Maintenance mode',

View File

@ -5,10 +5,10 @@
fields:
themeName:
label: Theme
label: cms::lang.theme.theme_label
disabled: true
folders:
label: Folders
commentAbove: Please select the theme folders you would like to export
label: cms::lang.theme.export_folders_label
commentAbove: cms::lang.theme.export_folders_comment
type: checkboxlist

View File

@ -5,21 +5,21 @@
fields:
themeName:
label: Theme
label: cms::lang.theme.theme_label
disabled: true
uploaded_file:
label: Theme archive file
label: cms::lang.theme.import_uploaded_file
type: fileupload
mode: file
fileTypes: zip
overwrite:
label: Overwrite existing files
comment: Untick this box to only import new files
label: cms::lang.theme.import_overwrite_label
comment: cms::lang.theme.import_overwrite_comment
type: checkbox
folders:
label: Folders
commentAbove: Please select the theme folders you would like to import
label: cms::lang.theme.import_folders_label
commentAbove: cms::lang.theme.import_folders_comment
type: checkboxlist