Permalink
Browse files

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.
  • Loading branch information...
1 parent 9b6ca79 commit 17db5baf1927ddb83d3b7bbea3a60831089c8def @forsdahl forsdahl committed with chillu Sep 4, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 code/controllers/CMSMain.php
@@ -247,8 +247,11 @@ public function ExtraTreeTools() {
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

0 comments on commit 17db5ba

Please sign in to comment.