mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENHANCEMENT Appending classnames to translated pagetype titles in CMSMain->getPageTypes() when the cms is loaded in a non-english version - see inline comment
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68818 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d635f0ead2
commit
aa0f54fa97
@ -334,6 +334,14 @@ JS;
|
||||
if($instance->stat('need_permission') && !$this->can(singleton($class)->stat('need_permission'))) continue;
|
||||
|
||||
$addAction = $instance->i18n_singular_name();
|
||||
|
||||
// if we're in translation mode, the link between the translated pagetype
|
||||
// title and the actual classname might not be obvious, so we add it in parantheses
|
||||
// Example: class "RedirectorPage" has the title "Weiterleitung" in German,
|
||||
// so it shows up as "Weiterleitung (RedirectorPage)"
|
||||
if(i18n::get_locale() != 'en_US') {
|
||||
$addAction .= " ({$class})";
|
||||
}
|
||||
|
||||
$result->push(new ArrayData(array(
|
||||
'ClassName' => $class,
|
||||
|
Loading…
Reference in New Issue
Block a user