diff --git a/code/SideReport.php b/code/SideReport.php
index 6dbddfc9..5dc8ae3a 100755
--- a/code/SideReport.php
+++ b/code/SideReport.php
@@ -17,7 +17,7 @@ class SideReportView extends ViewableData {
}
function group() {
- return 'Other';
+ return _t('SideReport.OtherGroupTitle', "Other");
}
function sort() {
@@ -128,7 +128,7 @@ class SideReport_EmptyPages extends SS_Report {
}
function group() {
- return "Content reports";
+ return _t('SideReport.ContentGroupTitle', "Content reports");
}
function sort() {
return 100;
@@ -156,7 +156,7 @@ class SideReport_RecentlyEdited extends SS_Report {
return _t('SideReport.LAST2WEEKS',"Pages edited in the last 2 weeks");
}
function group() {
- return "Content reports";
+ return _t('SideReport.ContentGroupTitle', "Content reports");
}
function sort() {
return 200;
@@ -184,7 +184,7 @@ class SideReport_ToDo extends SS_Report {
return _t('SideReport.TODO',"Pages with To Do items");
}
function group() {
- return "Content reports";
+ return _t('SideReport.ContentGroupTitle', "Content reports");
}
function sort() {
return 0;
@@ -216,7 +216,7 @@ class SideReport_BrokenLinks extends SS_Report {
return _t('SideReport.BROKENLINKS',"Pages with broken links");
}
function group() {
- return "Broken links reports";
+ return _t('SideReport.BrokenLinksGroupTitle', "Broken links reports");
}
function sourceRecords($params = null) {
// Get class names for page types that are not virtual pages or redirector pages
@@ -237,7 +237,7 @@ class SideReport_BrokenLinks extends SS_Report {
}
function getParameterFields() {
return new FieldSet(
- new CheckboxField('OnLive', 'Check live site')
+ new CheckboxField('OnLive', _t('SideReport.ParameterLiveCheckbox', 'Check live site'))
);
}
}
@@ -253,7 +253,7 @@ class SideReport_BrokenFiles extends SS_Report {
return _t('SideReport.BROKENFILES',"Pages with broken files");
}
function group() {
- return "Broken links reports";
+ return _t('SideReport.BrokenLinksGroupTitle', "Broken links reports");
}
function sourceRecords($params = null) {
// Get class names for page types that are not virtual pages or redirector pages
@@ -275,7 +275,7 @@ class SideReport_BrokenFiles extends SS_Report {
function getParameterFields() {
return new FieldSet(
- new CheckboxField('OnLive', 'Check live site')
+ new CheckboxField('OnLive', _t('SideReport.ParameterLiveCheckbox', 'Check live site'))
);
}
@@ -286,7 +286,7 @@ class SideReport_BrokenVirtualPages extends SS_Report {
return _t('SideReport.BROKENVIRTUALPAGES', 'VirtualPages pointing to deleted pages');
}
function group() {
- return "Broken links reports";
+ return _t('SideReport.BrokenLinksGroupTitle', "Broken links reports");
}
function sourceRecords($params = null) {
$classNames = "'".join("','", ClassInfo::subclassesFor('VirtualPage'))."'";
@@ -306,7 +306,7 @@ class SideReport_BrokenVirtualPages extends SS_Report {
function getParameterFields() {
return new FieldSet(
- new CheckboxField('OnLive', 'Check live site')
+ new CheckboxField('OnLive', _t('SideReport.ParameterLiveCheckbox', 'Check live site'))
);
}
}
@@ -316,7 +316,7 @@ class SideReport_BrokenRedirectorPages extends SS_Report {
return _t('SideReport.BROKENREDIRECTORPAGES', 'RedirectorPages pointing to deleted pages');
}
function group() {
- return "Broken links reports";
+ return _t('SideReport.BrokenLinksGroupTitle', "Broken links reports");
}
function sourceRecords($params = null) {
$classNames = "'".join("','", ClassInfo::subclassesFor('RedirectorPage'))."'";
@@ -337,7 +337,7 @@ class SideReport_BrokenRedirectorPages extends SS_Report {
function getParameterFields() {
return new FieldSet(
- new CheckboxField('OnLive', 'Check live site')
+ new CheckboxField('OnLive', _t('SideReport.ParameterLiveCheckbox', 'Check live site'))
);
}
}
diff --git a/code/reports/BrokenLinksReport.php b/code/reports/BrokenLinksReport.php
index 61289b94..488b4a03 100644
--- a/code/reports/BrokenLinksReport.php
+++ b/code/reports/BrokenLinksReport.php
@@ -7,9 +7,11 @@
*/
class BrokenLinksReport extends SS_Report {
+
function title() {
return _t('BrokenLinksReport.BROKENLINKS',"Broken links report");
}
+
function sourceRecords($params, $sort, $limit) {
$join = '';
$sortBrokenReason = false;
@@ -39,23 +41,23 @@ class BrokenLinksReport extends SS_Report {
if ($isVirtualPage) {
if ($record->HasBrokenLink) {
- $reason = "virtual page pointing to non-existent page";
+ $reason = _t('BrokenLinksReport.VirtualPageNonExistent', "virtual page pointing to non-existent page");
$reasonCodes = array("VPBROKENLINK");
}
} else if ($isRedirectorPage) {
if ($record->HasBrokenLink) {
- $reason = "redirector page pointing to non-existent page";
+ $reason = _t('BrokenLinksReport.RedirectorNonExistent', "redirector page pointing to non-existent page");
$reasonCodes = array("RPBROKENLINK");
}
} else {
if ($record->HasBrokenLink && $record->HasBrokenFile) {
- $reason = "has broken link and file";
+ $reason = _t('BrokenLinksReport.HasBrokenLinkAndFile', "has broken link and file");
$reasonCodes = array("BROKENFILE", "BROKENLINK");
} else if ($record->HasBrokenLink && !$record->HasBrokenFile) {
- $reason = "has broken link";
+ $reason = _t('BrokenLinksReport.HasBrokenLink', "has broken link");
$reasonCodes = array("BROKENLINK");
} else if (!$record->HasBrokenLink && $record->HasBrokenFile) {
- $reason = "has broken file";
+ $reason = _t('BrokenLinksReport.HasBrokenFile', "has broken file");
$reasonCodes = array("BROKENFILE");
}
}
@@ -72,20 +74,29 @@ class BrokenLinksReport extends SS_Report {
return $returnSet;
}
function columns() {
+ if(isset($_REQUEST['CheckSite']) && $_REQUEST['CheckSite'] == 'Draft') {
+ $dateTitle = _t('BrokenLinksReport.ColumnDateLastModified', 'Date last modified');
+ } else {
+ $dateTitle = _t('BrokenLinksReport.ColumnDateLastPublished', 'Date last published');
+ }
+
$fields = array(
"Title" => array(
"title" => "Page name",
- 'formatting' => '$value'
+ 'formatting' => sprintf(
+ '$value',
+ _t('BrokenLinksReport.HoverTitleEditPage', 'Edit page')
+ )
),
"LastEdited" => array(
- "title" => "Date ".(isset($_REQUEST['CheckSite']) && ($_REQUEST['CheckSite'] == 'Draft')?'last modified':'published'),
+ "title" => $dateTitle,
'casting' => 'SSDatetime->Full'
),
"BrokenReason" => array(
- "title" => "Problem type"
+ "title" => _t('BrokenLinksReport.ColumnProblemType', "Problem type")
),
'AbsoluteLink' => array(
- 'title' => 'URL',
+ 'title' => _t('BrokenLinksReport.ColumnURL', 'URL'),
'formatting' => '$value " . ($AbsoluteLiveLink ? "(live)" : "") . " (draft)'
)
);
@@ -95,16 +106,20 @@ class BrokenLinksReport extends SS_Report {
function parameterFields() {
return new FieldSet(
new DropdownField('CheckSite', 'Check site', array(
- 'Published' => 'Published Site',
- 'Draft' => 'Draft Site'
+ 'Published' => _t('BrokenLinksReport.CheckSiteDropdownPublished', 'Published Site'),
+ 'Draft' => _t('BrokenLinksReport.CheckSiteDropdownDraft', 'Draft Site')
)),
- new DropdownField('Reason', 'Problem to check', array(
- '' => 'Any',
- 'BROKENFILE' => 'Broken file',
- 'BROKENLINK' => 'Broken link',
- 'VPBROKENLINK' => 'Virtual page pointing to non-existent page',
- 'RPBROKENLINK' => 'Redirector page pointing to non-existent page',
- ))
+ new DropdownField(
+ 'Reason',
+ _t('BrokenLinksReport.ReasonDropdown', 'Problem to check'),
+ array(
+ '' => 'Any',
+ 'BROKENFILE' => _t('BrokenLinksReport.ReasonDropdownBROKENFILE', 'Broken file'),
+ 'BROKENLINK' => _t('BrokenLinksReport.ReasonDropdownBROKENLINK', 'Broken link'),
+ 'VPBROKENLINK' => _t('BrokenLinksReport.ReasonDropdownVPBROKENLINK', 'Virtual page pointing to non-existent page'),
+ 'RPBROKENLINK' => _t('BrokenLinksReport.ReasonDropdownRPBROKENLINK', 'Redirector page pointing to non-existent page'),
+ )
+ )
);
}
}
diff --git a/lang/en_US.php b/lang/en_US.php
index 3978dd99..9f489eea 100755
--- a/lang/en_US.php
+++ b/lang/en_US.php
@@ -59,6 +59,23 @@ $lang['en_US']['AssetTableField.ss']['DRAGTOFOLDER'] = 'Drag to folder on left t
$lang['en_US']['AssetTableField.ss']['EDIT'] = 'Edit asset';
$lang['en_US']['AssetTableField.ss']['SHOW'] = 'Show asset';
$lang['en_US']['BrokenLinksReport']['BROKENLINKS'] = 'Broken links report';
+$lang['en_US']['BrokenLinksReport']['CheckSiteDropdownDraft'] = 'Draft Site';
+$lang['en_US']['BrokenLinksReport']['CheckSiteDropdownPublished'] = 'Published Site';
+$lang['en_US']['BrokenLinksReport']['ColumnDateLastModified'] = 'Date last modified';
+$lang['en_US']['BrokenLinksReport']['ColumnDateLastPublished'] = 'Date last published';
+$lang['en_US']['BrokenLinksReport']['ColumnProblemType'] = 'Problem type';
+$lang['en_US']['BrokenLinksReport']['ColumnURL'] = 'URL';
+$lang['en_US']['BrokenLinksReport']['HasBrokenFile'] = 'has broken file';
+$lang['en_US']['BrokenLinksReport']['HasBrokenLink'] = 'has broken link';
+$lang['en_US']['BrokenLinksReport']['HasBrokenLinkAndFile'] = 'has broken link and file';
+$lang['en_US']['BrokenLinksReport']['HoverTitleEditPage'] = 'Edit page';
+$lang['en_US']['BrokenLinksReport']['ReasonDropdown'] = 'Problem to check';
+$lang['en_US']['BrokenLinksReport']['ReasonDropdownBROKENFILE'] = 'Broken file';
+$lang['en_US']['BrokenLinksReport']['ReasonDropdownBROKENLINK'] = 'Broken link';
+$lang['en_US']['BrokenLinksReport']['ReasonDropdownRPBROKENLINK'] = 'Redirector page pointing to non-existent page';
+$lang['en_US']['BrokenLinksReport']['ReasonDropdownVPBROKENLINK'] = 'Virtual page pointing to non-existent page';
+$lang['en_US']['BrokenLinksReport']['RedirectorNonExistent'] = 'redirector page pointing to non-existent page';
+$lang['en_US']['BrokenLinksReport']['VirtualPageNonExistent'] = 'virtual page pointing to non-existent page';
$lang['en_US']['CMSBatchActions']['DELETED_DRAFT_PAGES'] = 'Deleted %d pages from the draft site, %d failures';
$lang['en_US']['CMSBatchActions']['DELETED_PAGES'] = 'Deleted %d pages from the published site, %d failures';
$lang['en_US']['CMSBatchActions']['DELETE_DRAFT_PAGES'] = 'Delete from draft site';
@@ -287,10 +304,6 @@ $lang['en_US']['LeftAndMain']['STATUSPUBLISHEDSUCCESS'] = array(
$lang['en_US']['LeftAndMain']['STATUSTO'] = ' Status changed to \'%s\'';
$lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT1'] = 'This is the';
$lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT2'] = 'version that you are currently running, technically it\'s the CVS branch';
-$lang['en_US']['LeftAndMain.ss']['ARCHS'] = 'Archived Site';
-$lang['en_US']['LeftAndMain.ss']['DRAFTS'] = 'Draft Site';
-$lang['en_US']['LeftAndMain.ss']['EDIT'] = 'Edit';
-$lang['en_US']['LeftAndMain.ss']['EDITINCMS'] = 'Edit this page in the CMS';
$lang['en_US']['LeftAndMain.ss']['EDITPROFILE'] = 'Profile';
$lang['en_US']['LeftAndMain.ss']['LOADING'] = array(
'Loading...',
@@ -298,14 +311,11 @@ $lang['en_US']['LeftAndMain.ss']['LOADING'] = array(
);
$lang['en_US']['LeftAndMain.ss']['LOGGEDINAS'] = 'Logged in as';
$lang['en_US']['LeftAndMain.ss']['LOGOUT'] = 'Log out';
-$lang['en_US']['LeftAndMain.ss']['PUBLIS'] = 'Published Site';
$lang['en_US']['LeftAndMain.ss']['REQUIREJS'] = array(
'The CMS requires that you have JavaScript enabled.',
PR_HIGH
);
$lang['en_US']['LeftAndMain.ss']['SSWEB'] = 'Silverstripe Website';
-$lang['en_US']['LeftAndMain.ss']['VIEWINDRAFT'] = 'View the Page in the Draft Site';
-$lang['en_US']['LeftAndMain.ss']['VIEWINPUBLISHED'] = 'View the Page in the Published Site';
$lang['en_US']['LeftAndMain.ss']['VIEWPAGEIN'] = 'Page view:';
$lang['en_US']['LeftAndMain_right.ss']['WELCOMETO'] = 'Welcome to';
$lang['en_US']['MathSpamProtection']['EIGHT'] = 'eight';
@@ -516,8 +526,12 @@ $lang['en_US']['SideReport']['BROKENFILES'] = 'Pages with broken files';
$lang['en_US']['SideReport']['BROKENLINKS'] = 'Pages with broken links';
$lang['en_US']['SideReport']['BROKENREDIRECTORPAGES'] = 'RedirectorPages pointing to deleted pages';
$lang['en_US']['SideReport']['BROKENVIRTUALPAGES'] = 'VirtualPages pointing to deleted pages';
+$lang['en_US']['SideReport']['BrokenLinksGroupTitle'] = 'Broken links reports';
+$lang['en_US']['SideReport']['ContentGroupTitle'] = 'Content reports';
$lang['en_US']['SideReport']['EMPTYPAGES'] = 'Pages with no content';
$lang['en_US']['SideReport']['LAST2WEEKS'] = 'Pages edited in the last 2 weeks';
+$lang['en_US']['SideReport']['OtherGroupTitle'] = 'Other';
+$lang['en_US']['SideReport']['ParameterLiveCheckbox'] = 'Check live site';
$lang['en_US']['SideReport']['REPEMPTY'] = array(
'The %s report is empty.',
PR_MEDIUM,