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:
Ingo Schommer 2008-12-14 21:45:46 +00:00 committed by Sam Minnee
parent d635f0ead2
commit aa0f54fa97

View File

@ -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,