From f8ea7f27cf2ed8e9780a9823e8426289cab742a8 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 31 Jul 2017 10:23:57 +1200 Subject: [PATCH] Remove sprintf translations in CMSMain in favour of named parameters --- code/Controllers/CMSMain.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index 07a248e8..551e1686 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -1742,7 +1742,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $this->getResponse()->addHeader( 'X-Status', - rawurlencode(sprintf(_t('SilverStripe\\CMS\\Controllers\\CMSMain.REMOVEDPAGEFROMDRAFT', "Removed '%s' from the draft site"), $record->Title)) + rawurlencode(_t( + __CLASS__ . '.REMOVEDPAGEFROMDRAFT', + "Removed '{title}' from the draft site", + ['title' => $record->Title] + )) ); // Even if the record has been deleted from stage and live, it can be viewed in "archive mode" @@ -1774,7 +1778,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $this->getResponse()->addHeader( 'X-Status', - rawurlencode(sprintf(_t('SilverStripe\\CMS\\Controllers\\CMSMain.ARCHIVEDPAGE', "Archived page '%s'"), $record->Title)) + rawurlencode(_t( + __CLASS__ . '.ARCHIVEDPAGE', + "Archived page '{title}'", + ['title' => $record->Title] + )) ); // Even if the record has been deleted from stage and live, it can be viewed in "archive mode"