From 52e69dd1fd0f6a90561f472c47bff20748d654c5 Mon Sep 17 00:00:00 2001
From: Ingo Schommer
Date: Fri, 13 Apr 2012 21:54:56 +0200
Subject: [PATCH] MINOR Removed usage of deprecated $priority argument for _t()
---
code/controllers/AssetAdmin.php | 4 ++--
code/controllers/CMSMain.php | 11 +++++------
code/model/SiteTree.php | 22 +++++++++++-----------
code/model/VirtualPage.php | 2 +-
code/reports/SideReport.php | 2 +-
5 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php
index 788deda5..3d35a0f9 100644
--- a/code/controllers/AssetAdmin.php
+++ b/code/controllers/AssetAdmin.php
@@ -290,8 +290,8 @@ JS
'image' => _t('AssetAdmin.AppCategoryImage', 'Image'),
'audio' => _t('AssetAdmin.AppCategoryAudio', 'Audio'),
'mov' => _t('AssetAdmin.AppCategoryVideo', 'Video'),
- 'flash' => _t('AssetAdmin.AppCategoryFlash', 'Flash', PR_MEDIUM, 'The fileformat'),
- 'zip' => _t('AssetAdmin.AppCategoryArchive', 'Archive', PR_MEDIUM, 'A collection of files'),
+ 'flash' => _t('AssetAdmin.AppCategoryFlash', 'Flash', 'The fileformat'),
+ 'zip' => _t('AssetAdmin.AppCategoryArchive', 'Archive', 'A collection of files'),
);
$context->addField(
new DropdownField(
diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php
index 4e2f953f..3e98e225 100644
--- a/code/controllers/CMSMain.php
+++ b/code/controllers/CMSMain.php
@@ -190,7 +190,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
),
new DropdownField(
'ClassName',
- _t('CMSMain.PAGETYPEOPT','Page Type', PR_MEDIUM, 'Dropdown for limiting search to a page type'),
+ _t('CMSMain.PAGETYPEOPT','Page Type', 'Dropdown for limiting search to a page type'),
$pageTypes,
null,
null,
@@ -710,7 +710,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
_t(
'LeftAndMain.STATUSPUBLISHEDSUCCESS',
"Published '%s' successfully",
- PR_MEDIUM,
'Status message after publishing a page, showing the page title'
),
$record->Title
@@ -743,7 +742,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$id = $id . $suffix;
}
- $newItem->Title = _t('CMSMain.NEW',"New ",PR_MEDIUM,'"New " followed by a className').$className;
+ $newItem->Title = _t('CMSMain.NEW',"New ",'"New " followed by a className').$className;
$newItem->URLSegment = "new-" . strtolower($className);
$newItem->ClassName = $className;
$newItem->ParentID = $parentID;
@@ -854,7 +853,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$this->response->addHeader(
'X-Status',
sprintf(
- _t('CMSMain.RESTORED',"Restored '%s' successfully",PR_MEDIUM,'Param %s is a title'),
+ _t('CMSMain.RESTORED',"Restored '%s' successfully",'Param %s is a title'),
$record->Title
)
);
@@ -1081,7 +1080,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
first built.') . '
';
}
@@ -1106,7 +1105,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$this->response->addHeader(
'X-Status',
sprintf(
- _t('CMSMain.RESTORED',"Restored '%s' successfully",PR_MEDIUM,'Param %s is a title'),
+ _t('CMSMain.RESTORED',"Restored '%s' successfully",'Param %s is a title'),
$restoredPage->TreeTitle
)
);
diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php
index 7c98aedb..e90ae096 100644
--- a/code/model/SiteTree.php
+++ b/code/model/SiteTree.php
@@ -1499,7 +1499,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
_t(
'SiteTree.PageTypeNotAllowed',
'Page type "%s" not allowed as child of this parent page',
- PR_MEDIUM,
+
'First argument is a class name'
),
$subject->i18n_singular_name()
@@ -1516,7 +1516,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
_t(
'SiteTree.PageTypNotAllowedOnRoot',
'Page type "%s" is not allowed on the root level',
- PR_MEDIUM,
+
'First argument is a class name'
),
$this->i18n_singular_name()
@@ -1838,7 +1838,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$tabMain = new Tab('Main',
new TextField("Title", $this->fieldLabel('Title')),
new TextField("MenuTitle", $this->fieldLabel('MenuTitle')),
- $htmlField = new HtmlEditorField("Content", _t('SiteTree.HTMLEDITORTITLE', "Content", PR_MEDIUM, 'HTML editor title'))
+ $htmlField = new HtmlEditorField("Content", _t('SiteTree.HTMLEDITORTITLE', "Content", 'HTML editor title'))
),
$tabMeta = new Tab('Metadata',
$urlsegment,
@@ -1998,16 +1998,16 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$labels['MetaDescription'] = _t('SiteTree.METADESC', "Meta Description");
$labels['MetaKeywords'] = _t('SiteTree.METAKEYWORDS', "Meta Keywords");
$labels['ExtraMeta'] = _t('SiteTree.METAEXTRA', "Custom Meta Tags");
- $labels['ClassName'] = _t('SiteTree.PAGETYPE', "Page type", PR_MEDIUM, 'Classname of a page object');
- $labels['ParentType'] = _t('SiteTree.PARENTTYPE', "Page location", PR_MEDIUM);
- $labels['ParentID'] = _t('SiteTree.PARENTID', "Parent page", PR_MEDIUM);
+ $labels['ClassName'] = _t('SiteTree.PAGETYPE', "Page type", 'Classname of a page object');
+ $labels['ParentType'] = _t('SiteTree.PARENTTYPE', "Page location");
+ $labels['ParentID'] = _t('SiteTree.PARENTID', "Parent page");
$labels['ShowInMenus'] =_t('SiteTree.SHOWINMENUS', "Show in menus?");
$labels['ShowInSearch'] = _t('SiteTree.SHOWINSEARCH', "Show in search?");
$labels['ProvideComments'] = _t('SiteTree.ALLOWCOMMENTS', "Allow comments on this page?");
$labels['ViewerGroups'] = _t('SiteTree.VIEWERGROUPS', "Viewer Groups");
$labels['EditorGroups'] = _t('SiteTree.EDITORGROUPS', "Editor Groups");
- $labels['URLSegment'] = _t('SiteTree.URLSegment', 'URL Segment', PR_MEDIUM, 'URL for this page');
- $labels['Content'] = _t('SiteTree.Content', 'Content', PR_MEDIUM, 'Main HTML Content for a page');
+ $labels['URLSegment'] = _t('SiteTree.URLSegment', 'URL Segment', 'URL for this page');
+ $labels['Content'] = _t('SiteTree.Content', 'Content', 'Main HTML Content for a page');
$labels['CanViewType'] = _t('SiteTree.Viewers', 'Viewers Groups');
$labels['CanEditType'] = _t('SiteTree.Editors', 'Editors Groups');
$labels['Comments'] = _t('SiteTree.Comments', 'Comments');
@@ -2017,7 +2017,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
);
if($includerelations){
- $labels['Parent'] = _t('SiteTree.has_one_Parent', 'Parent Page', PR_MEDIUM, 'The parent page in the site hierarchy');
+ $labels['Parent'] = _t('SiteTree.has_one_Parent', 'Parent Page', 'The parent page in the site hierarchy');
$labels['LinkTracking'] = _t('SiteTree.many_many_LinkTracking', 'Link Tracking');
$labels['ImageTracking'] = _t('SiteTree.many_many_ImageTracking', 'Image Tracking');
$labels['BackLinkTracking'] = _t('SiteTree.many_many_BackLinkTracking', 'Backlink Tracking');
@@ -2332,7 +2332,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$translation = _t(
'SiteTree.CHANGETO',
'Change to "%s"',
- PR_MEDIUM,
+
"Pagetype selection dropdown with class names"
);
@@ -2704,7 +2704,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$inst = singleton($type);
$entities[$type . '.DESCRIPTION'] = array(
$inst->stat('description'),
- PR_MEDIUM,
+
'Description of the page type (shown in the "add page" dialog)'
);
}
diff --git a/code/model/VirtualPage.php b/code/model/VirtualPage.php
index aae4c9a6..4c7ca952 100644
--- a/code/model/VirtualPage.php
+++ b/code/model/VirtualPage.php
@@ -304,7 +304,7 @@ class VirtualPage extends Page {
_t(
'VirtualPage.PageTypNotAllowedOnRoot',
'Original page type "%s" is not allowed on the root level for this virtual page',
- PR_MEDIUM,
+
'First argument is a class name'
),
$orig->i18n_singular_name()
diff --git a/code/reports/SideReport.php b/code/reports/SideReport.php
index 4c284942..c5c3b6aa 100644
--- a/code/reports/SideReport.php
+++ b/code/reports/SideReport.php
@@ -51,7 +51,7 @@ class SideReportView extends ViewableData {
} else {
$result = "" .
sprintf(
- _t('SideReport.REPEMPTY','The %s report is empty.',PR_MEDIUM,'%s is a report title'),
+ _t('SideReport.REPEMPTY','The %s report is empty.','%s is a report title'),
$this->report->title()
)
. "
";