From 85daead336ebef927b144d737ebbf333fb0c9522 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 5 Nov 2008 23:23:23 +0000 Subject: [PATCH] BUGFIX Making ModelAdmin labels in left panel translatable again (regression from moving them into one common panel) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@65336 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ModelAdmin.php | 5 +++-- templates/Includes/ModelAdmin_left.ss | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index b321dfa3..78a851f8 100644 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -333,11 +333,12 @@ class ModelAdmin_CollectionController extends Controller { if (!singleton($modelName)->canCreate(Member::currentUser())) return false; } - $buttonLabel = sprintf(_t('ModelAdmin.CREATEBUTTON', "Create a %s", PR_MEDIUM, "Create a new instance from a model class"), singleton($modelName)->i18n_singular_name()); + $buttonLabel = sprintf(_t('ModelAdmin.CREATEBUTTON', "Create '%s'", PR_MEDIUM, "Create a new instance from a model class"), singleton($modelName)->i18n_singular_name()); $actions = new FieldSet( - new FormAction('add', $buttonLabel) + $createButton = new FormAction('add', $buttonLabel) ); + $createButton->dontEscape = true; return new Form($this, "CreateForm", new FieldSet(), $actions); } diff --git a/templates/Includes/ModelAdmin_left.ss b/templates/Includes/ModelAdmin_left.ss index 6b151fae..e40032f6 100755 --- a/templates/Includes/ModelAdmin_left.ss +++ b/templates/Includes/ModelAdmin_left.ss @@ -22,13 +22,13 @@ <% control ModelForms %>
-

Create

+

<% _t('ADDLISTING','Add') %>

$CreateForm -

Search

+

<% _t('SEARCHLISTINGS','Search') %>

$SearchForm -

Import

+

<% _t('IMPORT_TAB_HEADER', 'Import') %>

$ImportForm
<% end_control %>