Skip to content
This repository
Browse code

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...
commit 17db5baf1927ddb83d3b7bbea3a60831089c8def 1 parent 9b6ca79
Niklas Forsdahl authored September 04, 2012 chillu committed September 12, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  code/controllers/CMSMain.php
7  code/controllers/CMSMain.php
@@ -247,8 +247,11 @@ public function ExtraTreeTools() {
247 247
 	
248 248
 	function SearchForm() {
249 249
 		// get all page types in a dropdown-compatible format
250  
-		$pageTypes = SiteTree::page_type_classes(); 
251  
-		$pageTypes = array_combine($pageTypes, $pageTypes);
  250
+		$pageTypeClasses = SiteTree::page_type_classes(); 
  251
+		$pageTypes = array();
  252
+		foreach ($pageTypeClasses as $pageTypeClass) {
  253
+			$pageTypes[$pageTypeClass] = _t($pageTypeClass.'.SINGULARNAME', $pageTypeClass);
  254
+		}
252 255
 		asort($pageTypes);
253 256
 		
254 257
 		// get all filter instances

0 notes on commit 17db5ba

Please sign in to comment.
Something went wrong with that request. Please try again.