Merge remote-tracking branch 'origin/3.0'

This commit is contained in:
Ingo Schommer 2012-08-27 09:26:16 +02:00
commit 2024e54f6b
6 changed files with 13 additions and 9 deletions

View File

@ -206,7 +206,7 @@ JS
'<a class="ss-ui-button ss-ui-action ui-button-text-icon-primary ss-ui-button-ajax" data-icon="arrow-circle-double" title="%s" href="%s">%s</a>', '<a class="ss-ui-button ss-ui-action ui-button-text-icon-primary ss-ui-button-ajax" data-icon="arrow-circle-double" title="%s" href="%s">%s</a>',
_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.'), _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'), $this->Link('doSync'),
_t('FILESYSTEMSYNC','Sync files') _t('AssetAdmin.FILESYSTEMSYNC','Sync files')
) )
); );
} else { } else {

View File

@ -468,8 +468,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$addAction = $instance->i18n_singular_name(); $addAction = $instance->i18n_singular_name();
// Get description // Get description (convert 'Page' to 'SiteTree' for correct localization lookups)
$description = _t($class . '.DESCRIPTION'); $description = _t((($class == 'Page') ? 'SiteTree' : $class) . '.DESCRIPTION');
if(!$description) { if(!$description) {
$description = $instance->uninherited('description'); $description = $instance->uninherited('description');
@ -484,7 +484,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'AddAction' => $addAction, 'AddAction' => $addAction,
'Description' => $description, 'Description' => $description,
// TODO Sprite support // TODO Sprite support
'IconURL' => $instance->stat('icon') 'IconURL' => $instance->stat('icon'),
'Title' => singleton($class)->i18n_singular_name(),
))); )));
} }

View File

@ -21,7 +21,7 @@ class CMSPageAddController extends CMSPageEditController {
$pageTypes = array(); $pageTypes = array();
foreach($this->PageTypes() as $type) { foreach($this->PageTypes() as $type) {
$html = sprintf('<span class="page-icon class-%s"></span><strong class="title">%s</strong><span class="description">%s</span>', $html = sprintf('<span class="page-icon class-%s"></span><strong class="title">%s</strong><span class="description">%s</span>',
$type->getField('ClassName'), $type->getField('Title'),
$type->getField('AddAction'), $type->getField('AddAction'),
$type->getField('Description') $type->getField('Description')
); );

View File

@ -163,7 +163,7 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
$gridField = new GridField('Reports',false, $this->Reports(), $gridFieldConfig); $gridField = new GridField('Reports',false, $this->Reports(), $gridFieldConfig);
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns'); $columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
$columns->setDisplayFields(array( $columns->setDisplayFields(array(
'title' => 'Title', 'title' => _t('ReportAdmin.ReportTitle', 'Title'),
)); ));
$columns->setFieldFormatting(array( $columns->setFieldFormatting(array(
'title' => '<a href=\"$Link\" class=\"cms-panel-link\">$value</a>' 'title' => '<a href=\"$Link\" class=\"cms-panel-link\">$value</a>'

View File

@ -2699,7 +2699,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @return String * @return String
*/ */
function i18n_singular_name() { 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());
} }
/** /**

View File

@ -13,6 +13,7 @@ en:
CurrentFolderOnly: 'Limit to current folder?' CurrentFolderOnly: 'Limit to current folder?'
DetailsView: Details DetailsView: Details
FILES: Files 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.' 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' FROMTHEINTERNET: 'From the internet'
FROMYOURCOMPUTER: 'From your computer' FROMYOURCOMPUTER: 'From your computer'
@ -236,6 +237,8 @@ en:
REDIRECTTOPAGE: 'A page on your website' REDIRECTTOPAGE: 'A page on your website'
SINGULARNAME: 'Redirector Page' SINGULARNAME: 'Redirector Page'
YOURPAGE: 'Page on your website' YOURPAGE: 'Page on your website'
ReportAdmin:
ReportTitle: Title
ReportAdminForm: ReportAdminForm:
FILTERBY: 'Filter by' FILTERBY: 'Filter by'
SearchForm: SearchForm:
@ -394,8 +397,6 @@ en:
PLURALNAME: 'Virtual Pags' PLURALNAME: 'Virtual Pags'
PageTypNotAllowedOnRoot: 'Original page type "{type}" is not allowed on the root level for this virtual page' PageTypNotAllowedOnRoot: 'Original page type "{type}" is not allowed on the root level for this virtual page'
SINGULARNAME: 'Virtual Page' SINGULARNAME: 'Virtual Page'
cms:
FILESYSTEMSYNC: 'Sync files'
CMSFileAddController: CMSFileAddController:
MENUTITLE: Files MENUTITLE: Files
CMSPageEditController: CMSPageEditController: