Skip to content

Commit

Permalink
FIX Correct translation key in ChangeSet and run text collector
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Sep 26, 2017
1 parent ef78510 commit 6a5161b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
24 changes: 15 additions & 9 deletions lang/en.yml
@@ -1,21 +1,27 @@
en:
SilverStripe\Versioned\ChangeSet:
DESCRIPTION_ITEM_PLURALS:
one: 'one item'
other: '{count} items'
DESCRIPTION_LIST_FIRST: '{item}'
DESCRIPTION_LIST_LAST: '{list}, and {item}'
DESCRIPTION_LIST_MID: '{list}, {item}'
DESCRIPTION_OTHER_ITEM_PLURALS:
one: 'one other item'
other: '{count} other items'
EMPTY: Empty
ITEMS_CHANGES:
one: '{total} (1 change)'
other: '{total} ({count} changes)'
ITEMS_TOTAL:
one: '1 total'
other: '{count} total'
NAME: Name
PLURALNAME: Campaigns
PLURALS:
one: 'A Campaign'
other: '{count} Campaigns'
PUBLISHED_DATE_BY: '{date} by {name}'
PUBLISHED_TODAY: 'Today {time}'
PUBLISHED_TODAY_BY: 'Today {time} by {name}'
PUBLISHER_NAME: 'Published by'
PUBLISH_DATE: 'Publish date'
SINGULARNAME: Campaign
STATE: State
STATE_OPEN: Active
STATE_PUBLISHED: Published
STATE_REVERTED: Reverted
SilverStripe\Versioned\ChangeSetItem:
PLURALNAME: 'Change Set Items'
PLURALS:
Expand Down
8 changes: 4 additions & 4 deletions src/ChangeSet.php
Expand Up @@ -525,7 +525,7 @@ public function getDetails()

// Empty state
if (empty($total)) {
return _t(__CLASS__ . 'EMPTY', 'Empty');
return _t(__CLASS__ . '.EMPTY', 'Empty');
}

// Count all items
Expand Down Expand Up @@ -577,7 +577,7 @@ public function getPublishedLabel()
if ($dateObj->IsToday()) {
if ($publisher) {
return _t(
__CLASS__ . 'PUBLISHED_TODAY_BY',
__CLASS__ . '.PUBLISHED_TODAY_BY',
'Today {time} by {name}',
[
'time' => $dateObj->Time12(),
Expand All @@ -587,7 +587,7 @@ public function getPublishedLabel()
}
// Today, no publisher
return _t(
__CLASS__ . 'PUBLISHED_TODAY',
__CLASS__ . '.PUBLISHED_TODAY',
'Today {time}',
['time' => $dateObj->Time12()]
);
Expand All @@ -596,7 +596,7 @@ public function getPublishedLabel()
// Use date
if ($publisher) {
return _t(
__CLASS__ . 'PUBLISHED_DATE_BY',
__CLASS__ . '.PUBLISHED_DATE_BY',
'{date} by {name}',
[
'date' => $dateObj->FormatFromSettings(),
Expand Down

0 comments on commit 6a5161b

Please sign in to comment.