mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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.
This commit is contained in:
parent
9b6ca79746
commit
17db5baf19
@ -247,8 +247,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
|
|
||||||
function SearchForm() {
|
function SearchForm() {
|
||||||
// get all page types in a dropdown-compatible format
|
// get all page types in a dropdown-compatible format
|
||||||
$pageTypes = SiteTree::page_type_classes();
|
$pageTypeClasses = SiteTree::page_type_classes();
|
||||||
$pageTypes = array_combine($pageTypes, $pageTypes);
|
$pageTypes = array();
|
||||||
|
foreach ($pageTypeClasses as $pageTypeClass) {
|
||||||
|
$pageTypes[$pageTypeClass] = _t($pageTypeClass.'.SINGULARNAME', $pageTypeClass);
|
||||||
|
}
|
||||||
asort($pageTypes);
|
asort($pageTypes);
|
||||||
|
|
||||||
// get all filter instances
|
// get all filter instances
|
||||||
|
Loading…
Reference in New Issue
Block a user