mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Update translations and update classes to use __CLASS__ in translations
This commit is contained in:
parent
f1c58fd5eb
commit
edef740ff1
60
lang/en.yml
60
lang/en.yml
@ -1,22 +1,30 @@
|
||||
en:
|
||||
ContentReview:
|
||||
SilverStripe\ContentReview\Extensions\ContentReviewCMSExtension:
|
||||
ErrorItemPermissionDenied: 'It seems you don''t have the necessary permissions to review this content'
|
||||
SilverStripe\ContentReview\Extensions\ContentReviewDefaultSettings:
|
||||
ADDGROUP: 'Add groups'
|
||||
ADDUSERS: 'Add users'
|
||||
DEFAULTSETTINGSHELP: 'These settings will apply to all pages that do not have a specific Content Review schedule.'
|
||||
EMAILFROM: 'From email address'
|
||||
EMAILFROM_RIGHTTITLE: 'e.g: do-not-reply@site.com'
|
||||
EMAILSUBJECT: 'Subject line'
|
||||
EMAILTEMPLATE: 'Email template'
|
||||
OWNERGROUPSDESCRIPTION: 'Page owners that are responsible for reviews'
|
||||
OWNERUSERSDESCRIPTION: 'Page owners that are responsible for reviews'
|
||||
PAGEOWNERGROUPS: Groups
|
||||
PAGEOWNERUSERS: Users
|
||||
REVIEWFREQUENCY: 'Review frequency'
|
||||
REVIEWFREQUENCYDESCRIPTION: 'The review date will be set to this far in the future, whenever the page is published.'
|
||||
SilverStripe\ContentReview\Extensions\SiteTreeContentReview:
|
||||
ADDGROUP: 'Add groups'
|
||||
ADDUSERS: 'Add users'
|
||||
BUTTONREVIEWED: 'Review content'
|
||||
COMMENTS: '(optional) Add comments...'
|
||||
CONTENTOWNERS: 'Content Owners'
|
||||
CONTENTREVIEW: 'Content due for review'
|
||||
CUSTOM: 'Custom settings'
|
||||
DEFAULTSETTINGSHELP: 'These settings will apply to all pages that do not have a specific Content Review schedule.'
|
||||
DISABLE: 'Disable content review'
|
||||
EMAILFROM: 'From email address'
|
||||
EMAILSUBJECT: 'Subject line'
|
||||
EMAILTEMPLATE: 'Email template'
|
||||
INHERIT: 'Inherit from parent page'
|
||||
MARKREVIEWED: 'Mark as reviewed'
|
||||
NEXTREVIEWDATADESCRIPTION: 'Leave blank for no review'
|
||||
NEXTREVIEWDATE: 'Next review date'
|
||||
NOCOMMENTS: '(no comments)'
|
||||
OPTIONS: Options
|
||||
OWNERGROUPSDESCRIPTION: 'Page owners that are responsible for reviews'
|
||||
OWNERUSERSDESCRIPTION: 'Page owners that are responsible for reviews'
|
||||
@ -25,31 +33,27 @@ en:
|
||||
REVIEWFREQUENCY: 'Review frequency'
|
||||
REVIEWFREQUENCYDESCRIPTION: 'The review date will be set to this far in the future whenever the page is published'
|
||||
REVIEWHEADER: 'Content review'
|
||||
REVIEWNOTES: 'Review notes'
|
||||
REVIEWSUCCESSFUL: 'Content reviewed successfully'
|
||||
SAVE: Save
|
||||
SETTINGSFROM: 'Options are'
|
||||
ContentReviewEmails:
|
||||
REVIEWPAGELINK: 'Review the page in the CMS'
|
||||
SUBJECT: 'Page(s) are due for content review'
|
||||
VIEWPUBLISHEDLINK: 'View this page on the website'
|
||||
ContentReviewLog:
|
||||
SilverStripe\ContentReview\Forms\ReviewContentHandler:
|
||||
ErrorReviewPermissionDenied: 'It seems you don''t have the necessary permissions to submit a content review'
|
||||
MarkAsReviewedAction: 'Mark as reviewed'
|
||||
NoComments: '(no comments)'
|
||||
Placeholder: 'Add comments (optional)'
|
||||
Success: 'Review successfully added'
|
||||
SilverStripe\ContentReview\Models\ContentReviewLog:
|
||||
PLURALNAME: 'Content Review Logs'
|
||||
PLURALS:
|
||||
one: 'A Content Review Log'
|
||||
other: '{count} Content Review Logs'
|
||||
SINGULARNAME: 'Content Review Log'
|
||||
PagesDueForReviewReport:
|
||||
SilverStripe\ContentReview\Reports\PagesDueForReviewReport:
|
||||
ONLYMYPAGES: 'Only Show pages assigned to me'
|
||||
REVIEWDATEAFTER: 'Review date after or on'
|
||||
REVIEWDATEBEFORE: 'Review date before or on'
|
||||
SHOWVIRTUALPAGES: 'Show Virtual Pages'
|
||||
TITLE: 'Pages due for review'
|
||||
PagesWithoutReviewScheduleReport:
|
||||
SilverStripe\ContentReview\Reports\PagesWithoutReviewScheduleReport:
|
||||
TITLE: 'Pages without a scheduled review.'
|
||||
Review:
|
||||
EMAILFROM_RIGHTTITLE: 'e.g: do-not-reply@site.com'
|
||||
|
||||
SilverStripe\ContentReview\Forms\ReviewContentHandler:
|
||||
ContentDueForReview: Content due for review
|
||||
MarkAsReviewedAction: Mark as reviewed
|
||||
NoComments: (no comments)
|
||||
Placeholder: Add comments (optional)
|
||||
Success: Review successfully added
|
||||
SilverStripe\ContentReview\Tasks\ContentReviewEmails:
|
||||
REVIEWPAGELINK: 'Review the page in the CMS'
|
||||
VIEWPUBLISHEDLINK: 'View this page on the website'
|
||||
|
@ -108,7 +108,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
$helpText = LiteralField::create(
|
||||
'ContentReviewHelp',
|
||||
_t(
|
||||
'ContentReview.DEFAULTSETTINGSHELP',
|
||||
__CLASS__ . '.DEFAULTSETTINGSHELP',
|
||||
'These settings will apply to all pages that do not have a specific Content Review schedule.'
|
||||
)
|
||||
);
|
||||
@ -117,11 +117,11 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
|
||||
$reviewFrequency = DropdownField::create(
|
||||
'ReviewPeriodDays',
|
||||
_t('ContentReview.REVIEWFREQUENCY', 'Review frequency'),
|
||||
_t(__CLASS__ . '.REVIEWFREQUENCY', 'Review frequency'),
|
||||
SiteTreeContentReview::get_schedule()
|
||||
)
|
||||
->setDescription(_t(
|
||||
'ContentReview.REVIEWFREQUENCYDESCRIPTION',
|
||||
__CLASS__ . '.REVIEWFREQUENCYDESCRIPTION',
|
||||
'The review date will be set to this far in the future, whenever the page is published.'
|
||||
));
|
||||
|
||||
@ -135,9 +135,9 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
$usersMap = $users->map('ID', 'Title')->toArray();
|
||||
asort($usersMap);
|
||||
|
||||
$userField = ListboxField::create('OwnerUsers', _t('ContentReview.PAGEOWNERUSERS', 'Users'), $usersMap)
|
||||
->setAttribute('data-placeholder', _t('ContentReview.ADDUSERS', 'Add users'))
|
||||
->setDescription(_t('ContentReview.OWNERUSERSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
$userField = ListboxField::create('OwnerUsers', _t(__CLASS__ . '.PAGEOWNERUSERS', 'Users'), $usersMap)
|
||||
->setAttribute('data-placeholder', _t(__CLASS__ . '.ADDUSERS', 'Add users'))
|
||||
->setDescription(_t(__CLASS__ . '.OWNERUSERSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
|
||||
$fields->addFieldToTab('Root.ContentReview', $userField);
|
||||
|
||||
@ -150,9 +150,9 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
|
||||
asort($groupsMap);
|
||||
|
||||
$groupField = ListboxField::create('OwnerGroups', _t('ContentReview.PAGEOWNERGROUPS', 'Groups'), $groupsMap)
|
||||
->setAttribute('data-placeholder', _t('ContentReview.ADDGROUP', 'Add groups'))
|
||||
->setDescription(_t('ContentReview.OWNERGROUPSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
$groupField = ListboxField::create('OwnerGroups', _t(__CLASS__ . '.PAGEOWNERGROUPS', 'Groups'), $groupsMap)
|
||||
->setAttribute('data-placeholder', _t(__CLASS__ . '.ADDGROUP', 'Add groups'))
|
||||
->setDescription(_t(__CLASS__ . '.OWNERGROUPSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
|
||||
$fields->addFieldToTab('Root.ContentReview', $groupField);
|
||||
|
||||
@ -160,10 +160,10 @@ class ContentReviewDefaultSettings extends DataExtension
|
||||
$fields->addFieldsToTab(
|
||||
'Root.ContentReview',
|
||||
array(
|
||||
TextField::create('ReviewFrom', _t('ContentReview.EMAILFROM', 'From email address'))
|
||||
->setDescription(_t('Review.EMAILFROM_RIGHTTITLE', 'e.g: do-not-reply@site.com')),
|
||||
TextField::create('ReviewSubject', _t('ContentReview.EMAILSUBJECT', 'Subject line')),
|
||||
TextAreaField::create('ReviewBody', _t('ContentReview.EMAILTEMPLATE', 'Email template')),
|
||||
TextField::create('ReviewFrom', _t(__CLASS__ . '.EMAILFROM', 'From email address'))
|
||||
->setDescription(_t(__CLASS__ . '.EMAILFROM_RIGHTTITLE', 'e.g: do-not-reply@site.com')),
|
||||
TextField::create('ReviewSubject', _t(__CLASS__ . '.EMAILSUBJECT', 'Subject line')),
|
||||
TextAreaField::create('ReviewBody', _t(__CLASS__ . '.EMAILTEMPLATE', 'Email template')),
|
||||
LiteralField::create(
|
||||
'TemplateHelp',
|
||||
$this->owner->renderWith('SilverStripe\\ContentReview\\ContentReviewAdminHelp')
|
||||
|
@ -338,13 +338,13 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
// Display read-only version only
|
||||
if (!Permission::check("EDIT_CONTENT_REVIEW_FIELDS")) {
|
||||
$schedule = self::get_schedule();
|
||||
$contentOwners = ReadonlyField::create("ROContentOwners", _t("ContentReview.CONTENTOWNERS", "Content Owners"), $this->getOwnerNames());
|
||||
$nextReviewAt = DateField::create('RONextReviewDate', _t("ContentReview.NEXTREVIEWDATE", "Next review date"), $this->owner->NextReviewDate);
|
||||
$contentOwners = ReadonlyField::create("ROContentOwners", _t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"), $this->getOwnerNames());
|
||||
$nextReviewAt = DateField::create('RONextReviewDate', _t(__CLASS__ . ".NEXTREVIEWDATE", "Next review date"), $this->owner->NextReviewDate);
|
||||
|
||||
if (!isset($schedule[$this->owner->ReviewPeriodDays])) {
|
||||
$reviewFreq = ReadonlyField::create("ROReviewPeriodDays", _t("ContentReview.REVIEWFREQUENCY", "Review frequency"), $schedule[0]);
|
||||
$reviewFreq = ReadonlyField::create("ROReviewPeriodDays", _t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"), $schedule[0]);
|
||||
} else {
|
||||
$reviewFreq = ReadonlyField::create("ROReviewPeriodDays", _t("ContentReview.REVIEWFREQUENCY", "Review frequency"), $schedule[$this->owner->ReviewPeriodDays]);
|
||||
$reviewFreq = ReadonlyField::create("ROReviewPeriodDays", _t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"), $schedule[$this->owner->ReviewPeriodDays]);
|
||||
}
|
||||
|
||||
$logConfig = GridFieldConfig::create()
|
||||
@ -359,7 +359,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
$logs = GridField::create("ROReviewNotes", "Review Notes", $this->owner->ReviewLogs(), $logConfig);
|
||||
|
||||
|
||||
$optionsFrom = ReadonlyField::create("ROType", _t("ContentReview.SETTINGSFROM", "Options are"), $this->owner->ContentReviewType);
|
||||
$optionsFrom = ReadonlyField::create("ROType", _t(__CLASS__ . ".SETTINGSFROM", "Options are"), $this->owner->ContentReviewType);
|
||||
|
||||
$fields->addFieldsToTab("Root.ContentReview", array(
|
||||
$contentOwners,
|
||||
@ -373,11 +373,11 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
}
|
||||
|
||||
$options = array();
|
||||
$options["Disabled"] = _t("ContentReview.DISABLE", "Disable content review");
|
||||
$options["Inherit"] = _t("ContentReview.INHERIT", "Inherit from parent page");
|
||||
$options["Custom"] = _t("ContentReview.CUSTOM", "Custom settings");
|
||||
$options["Disabled"] = _t(__CLASS__ . ".DISABLE", "Disable content review");
|
||||
$options["Inherit"] = _t(__CLASS__ . ".INHERIT", "Inherit from parent page");
|
||||
$options["Custom"] = _t(__CLASS__ . ".CUSTOM", "Custom settings");
|
||||
|
||||
$viewersOptionsField = OptionsetField::create("ContentReviewType", _t("ContentReview.OPTIONS", "Options"), $options);
|
||||
$viewersOptionsField = OptionsetField::create("ContentReviewType", _t(__CLASS__ . ".OPTIONS", "Options"), $options);
|
||||
|
||||
$users = Permission::get_members_by_permission(array("CMS_ACCESS_CMSMain", "ADMIN"));
|
||||
|
||||
@ -385,10 +385,10 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
|
||||
asort($usersMap);
|
||||
|
||||
$userField = ListboxField::create("OwnerUsers", _t("ContentReview.PAGEOWNERUSERS", "Users"), $usersMap)
|
||||
$userField = ListboxField::create("OwnerUsers", _t(__CLASS__ . ".PAGEOWNERUSERS", "Users"), $usersMap)
|
||||
->addExtraClass('custom-setting')
|
||||
->setAttribute("data-placeholder", _t("ContentReview.ADDUSERS", "Add users"))
|
||||
->setDescription(_t('ContentReview.OWNERUSERSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
->setAttribute("data-placeholder", _t(__CLASS__ . ".ADDUSERS", "Add users"))
|
||||
->setDescription(_t(__CLASS__ . '.OWNERUSERSDESCRIPTION', 'Page owners that are responsible for reviews'));
|
||||
|
||||
$groupsMap = array();
|
||||
|
||||
@ -397,26 +397,26 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
}
|
||||
asort($groupsMap);
|
||||
|
||||
$groupField = ListboxField::create("OwnerGroups", _t("ContentReview.PAGEOWNERGROUPS", "Groups"), $groupsMap)
|
||||
$groupField = ListboxField::create("OwnerGroups", _t(__CLASS__ . ".PAGEOWNERGROUPS", "Groups"), $groupsMap)
|
||||
->addExtraClass('custom-setting')
|
||||
->setAttribute("data-placeholder", _t("ContentReview.ADDGROUP", "Add groups"))
|
||||
->setDescription(_t("ContentReview.OWNERGROUPSDESCRIPTION", "Page owners that are responsible for reviews"));
|
||||
->setAttribute("data-placeholder", _t(__CLASS__ . ".ADDGROUP", "Add groups"))
|
||||
->setDescription(_t(__CLASS__ . ".OWNERGROUPSDESCRIPTION", "Page owners that are responsible for reviews"));
|
||||
|
||||
$reviewDate = DateField::create("NextReviewDate", _t("ContentReview.NEXTREVIEWDATE", "Next review date"))
|
||||
->setDescription(_t("ContentReview.NEXTREVIEWDATADESCRIPTION", "Leave blank for no review"));
|
||||
$reviewDate = DateField::create("NextReviewDate", _t(__CLASS__ . ".NEXTREVIEWDATE", "Next review date"))
|
||||
->setDescription(_t(__CLASS__ . ".NEXTREVIEWDATADESCRIPTION", "Leave blank for no review"));
|
||||
|
||||
$reviewFrequency = DropdownField::create(
|
||||
"ReviewPeriodDays",
|
||||
_t("ContentReview.REVIEWFREQUENCY", "Review frequency"),
|
||||
_t(__CLASS__ . ".REVIEWFREQUENCY", "Review frequency"),
|
||||
self::get_schedule()
|
||||
)
|
||||
->addExtraClass('custom-setting')
|
||||
->setDescription(_t("ContentReview.REVIEWFREQUENCYDESCRIPTION", "The review date will be set to this far in the future whenever the page is published"));
|
||||
->setDescription(_t(__CLASS__ . ".REVIEWFREQUENCYDESCRIPTION", "The review date will be set to this far in the future whenever the page is published"));
|
||||
|
||||
$notesField = GridField::create("ReviewNotes", "Review Notes", $this->owner->ReviewLogs(), GridFieldConfig_RecordEditor::create());
|
||||
|
||||
$fields->addFieldsToTab("Root.ContentReview", array(
|
||||
HeaderField::create('ContentReviewHeader', _t("ContentReview.REVIEWHEADER", "Content review"), 2),
|
||||
HeaderField::create('ContentReviewHeader', _t(__CLASS__ . ".REVIEWHEADER", "Content review"), 2),
|
||||
$viewersOptionsField,
|
||||
CompositeField::create(
|
||||
$userField,
|
||||
@ -424,7 +424,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
$reviewDate,
|
||||
$reviewFrequency
|
||||
)->addExtraClass("review-settings"),
|
||||
ReadonlyField::create("ROContentOwners", _t("ContentReview.CONTENTOWNERS", "Content Owners"), $this->getOwnerNames()),
|
||||
ReadonlyField::create("ROContentOwners", _t(__CLASS__ . ".CONTENTOWNERS", "Content Owners"), $this->getOwnerNames()),
|
||||
$notesField,
|
||||
));
|
||||
}
|
||||
@ -618,7 +618,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
return array(
|
||||
"EDIT_CONTENT_REVIEW_FIELDS" => array(
|
||||
"name" => "Set content owners and review dates",
|
||||
"category" => _t("Permissions.CONTENT_CATEGORY", "Content permissions"),
|
||||
"category" => _t("SilverStripe\\Security\\Permission.CONTENT_CATEGORY", "Content permissions"),
|
||||
"sort" => 50,
|
||||
),
|
||||
);
|
||||
|
@ -30,7 +30,7 @@ class PagesDueForReviewReport extends Report
|
||||
*/
|
||||
public function title()
|
||||
{
|
||||
return _t("PagesDueForReviewReport.TITLE", "Pages due for review");
|
||||
return _t(__CLASS__ . ".TITLE", "Pages due for review");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -43,14 +43,14 @@ class PagesDueForReviewReport extends Report
|
||||
$filtersList->push(
|
||||
DateField::create(
|
||||
"ReviewDateAfter",
|
||||
_t("PagesDueForReviewReport.REVIEWDATEAFTER", "Review date after or on")
|
||||
_t(__CLASS__ . ".REVIEWDATEAFTER", "Review date after or on")
|
||||
)
|
||||
);
|
||||
|
||||
$filtersList->push(
|
||||
DateField::create(
|
||||
"ReviewDateBefore",
|
||||
_t("PagesDueForReviewReport.REVIEWDATEBEFORE", "Review date before or on"),
|
||||
_t(__CLASS__ . ".REVIEWDATEBEFORE", "Review date before or on"),
|
||||
date("d/m/Y", strtotime("midnight"))
|
||||
)
|
||||
);
|
||||
@ -58,14 +58,14 @@ class PagesDueForReviewReport extends Report
|
||||
$filtersList->push(
|
||||
CheckboxField::create(
|
||||
"ShowVirtualPages",
|
||||
_t("PagesDueForReviewReport.SHOWVIRTUALPAGES", "Show Virtual Pages")
|
||||
_t(__CLASS__ . ".SHOWVIRTUALPAGES", "Show Virtual Pages")
|
||||
)
|
||||
);
|
||||
|
||||
$filtersList->push(
|
||||
CheckboxField::create(
|
||||
"OnlyMyPages",
|
||||
_t("PagesDueForReviewReport.ONLYMYPAGES", "Only Show pages assigned to me")
|
||||
_t(__CLASS__ . ".ONLYMYPAGES", "Only Show pages assigned to me")
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -25,7 +25,7 @@ class PagesWithoutReviewScheduleReport extends Report
|
||||
*/
|
||||
public function title()
|
||||
{
|
||||
return _t("PagesWithoutReviewScheduleReport.TITLE", "Pages without a scheduled review.");
|
||||
return _t(__CLASS__ . ".TITLE", "Pages without a scheduled review.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,8 @@
|
||||
<% loop $Pages %>
|
||||
<tr>
|
||||
<td valign="top">$Title</td>
|
||||
<td><a href="{$BaseURL}admin/pages/edit/show/$ID"><%t ContentReviewEmails.REVIEWPAGELINK 'Review the page in the CMS' %></a><br />
|
||||
<a href="$AbsoluteLink"><%t ContentReviewEmails.VIEWPUBLISHEDLINK 'View this page on the website' %></a>
|
||||
<td><a href="{$BaseURL}admin/pages/edit/show/$ID"><%t SilverStripe\\ContentReview\\Tasks\\ContentReviewEmails.REVIEWPAGELINK 'Review the page in the CMS' %></a><br />
|
||||
<a href="$AbsoluteLink"><%t SilverStripe\\ContentReview\\Tasks\\ContentReviewEmails.VIEWPUBLISHEDLINK 'View this page on the website' %></a>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<div class="content-review__button-holder">
|
||||
<a href="#" class="content-review__button"><%t ContentReview.CONTENTREVIEW 'Content due for review' %></a>
|
||||
<a href="#" class="content-review__button"><%t SilverStripe\\ContentReview\\Extensions\\SiteTreeContentReview.CONTENTREVIEW 'Content due for review' %></a>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user