From 2934423ebc573a0ba0ebbf2874181713cf5adf3f Mon Sep 17 00:00:00 2001 From: Niklas Forsdahl Date: Tue, 4 Sep 2012 08:55:38 +0300 Subject: [PATCH] BUG: Page type names not translated in pages overview search form Fixed by using the singularname translation for the class as values in the page types array used for the page types dropdown field. --- code/controllers/CMSMain.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index c791cfc2..aa3612db 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -247,8 +247,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr function SearchForm() { // get all page types in a dropdown-compatible format - $pageTypes = SiteTree::page_type_classes(); - $pageTypes = array_combine($pageTypes, $pageTypes); + $pageTypeClasses = SiteTree::page_type_classes(); + $pageTypes = array(); + foreach ($pageTypeClasses as $pageTypeClass) { + $pageTypes[$pageTypeClass] = _t($pageTypeClass.'.SINGULARNAME', $pageTypeClass); + } asort($pageTypes); // get all filter instances