diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php
index c215c299..e71e6498 100644
--- a/code/controllers/AssetAdmin.php
+++ b/code/controllers/AssetAdmin.php
@@ -206,7 +206,7 @@ JS
'%s',
_t('AssetAdmin.FILESYSTEMSYNCTITLE', 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'),
$this->Link('doSync'),
- _t('FILESYSTEMSYNC','Sync files')
+ _t('AssetAdmin.FILESYSTEMSYNC','Sync files')
)
);
} else {
diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php
index 272898ca..8672db4b 100644
--- a/code/controllers/CMSMain.php
+++ b/code/controllers/CMSMain.php
@@ -468,8 +468,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$addAction = $instance->i18n_singular_name();
- // Get description
- $description = _t($class . '.DESCRIPTION');
+ // Get description (convert 'Page' to 'SiteTree' for correct localization lookups)
+ $description = _t((($class == 'Page') ? 'SiteTree' : $class) . '.DESCRIPTION');
if(!$description) {
$description = $instance->uninherited('description');
@@ -484,7 +484,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'AddAction' => $addAction,
'Description' => $description,
// TODO Sprite support
- 'IconURL' => $instance->stat('icon')
+ 'IconURL' => $instance->stat('icon'),
+ 'Title' => singleton($class)->i18n_singular_name(),
)));
}
diff --git a/code/controllers/CMSPageAddController.php b/code/controllers/CMSPageAddController.php
index 81b17292..a16f6609 100644
--- a/code/controllers/CMSPageAddController.php
+++ b/code/controllers/CMSPageAddController.php
@@ -21,7 +21,7 @@ class CMSPageAddController extends CMSPageEditController {
$pageTypes = array();
foreach($this->PageTypes() as $type) {
$html = sprintf('%s%s',
- $type->getField('ClassName'),
+ $type->getField('Title'),
$type->getField('AddAction'),
$type->getField('Description')
);
diff --git a/code/controllers/ReportAdmin.php b/code/controllers/ReportAdmin.php
index 18a5cfb2..0eeb6439 100644
--- a/code/controllers/ReportAdmin.php
+++ b/code/controllers/ReportAdmin.php
@@ -163,7 +163,7 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
$gridField = new GridField('Reports',false, $this->Reports(), $gridFieldConfig);
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
$columns->setDisplayFields(array(
- 'title' => 'Title',
+ 'title' => _t('ReportAdmin.ReportTitle', 'Title'),
));
$columns->setFieldFormatting(array(
'title' => '$value'
diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php
index 84e770b0..b4a25ef7 100644
--- a/code/model/SiteTree.php
+++ b/code/model/SiteTree.php
@@ -2699,7 +2699,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @return String
*/
function i18n_singular_name() {
- return _t($this->class.'.SINGULARNAME', $this->singular_name());
+ // Convert 'Page' to 'SiteTree' for correct localization lookups
+ $class = ($this->class == 'Page') ? 'SiteTree' : $this->class;
+ return _t($class.'.SINGULARNAME', $this->singular_name());
}
/**
diff --git a/lang/en.yml b/lang/en.yml
index f0e7c730..2843f388 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -13,6 +13,7 @@ en:
CurrentFolderOnly: 'Limit to current folder?'
DetailsView: Details
FILES: Files
+ FILESYSTEMSYNC: 'Sync files'
FILESYSTEMSYNCTITLE: 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'
FROMTHEINTERNET: 'From the internet'
FROMYOURCOMPUTER: 'From your computer'
@@ -236,6 +237,8 @@ en:
REDIRECTTOPAGE: 'A page on your website'
SINGULARNAME: 'Redirector Page'
YOURPAGE: 'Page on your website'
+ ReportAdmin:
+ ReportTitle: Title
ReportAdminForm:
FILTERBY: 'Filter by'
SearchForm:
@@ -394,8 +397,6 @@ en:
PLURALNAME: 'Virtual Pags'
PageTypNotAllowedOnRoot: 'Original page type "{type}" is not allowed on the root level for this virtual page'
SINGULARNAME: 'Virtual Page'
- cms:
- FILESYSTEMSYNC: 'Sync files'
CMSFileAddController:
MENUTITLE: Files
CMSPageEditController: