MDL-84697 calendar: Move untranslatable strings from langconfig
This commit is contained in:
@@ -265,11 +265,23 @@ class humandate implements renderable, templatable {
|
||||
private function format_relative_date(): ?string {
|
||||
$usertimestamp = $this->get_user_date($this->datetime->getTimestamp());
|
||||
if ($usertimestamp == $this->get_user_date($this->clock->now()->getTimestamp())) {
|
||||
$format = get_string('strftimerelativetoday', 'langconfig');
|
||||
$format = get_string(
|
||||
'timerelativetoday',
|
||||
'calendar',
|
||||
get_string('strftimedateshort', 'langconfig')
|
||||
);
|
||||
} else if ($usertimestamp == $this->get_user_date(strtotime('yesterday', $this->clock->now()->getTimestamp()))) {
|
||||
$format = get_string('strftimerelativeyesterday', 'langconfig');
|
||||
$format = get_string(
|
||||
'timerelativeyesterday',
|
||||
'calendar',
|
||||
get_string('strftimedateshort', 'langconfig')
|
||||
);
|
||||
} else if ($usertimestamp == $this->get_user_date(strtotime('tomorrow', $this->clock->now()->getTimestamp()))) {
|
||||
$format = get_string('strftimerelativetomorrow', 'langconfig');
|
||||
$format = get_string(
|
||||
'timerelativetomorrow',
|
||||
'calendar',
|
||||
get_string('strftimedateshort', 'langconfig')
|
||||
);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -245,6 +245,9 @@ $string['subscriptionsource'] = 'Event source: {$a}';
|
||||
$string['subscriptionupdated'] = 'The \'{$a}\' calendar subscription has been updated';
|
||||
$string['sun'] = 'Sun';
|
||||
$string['sunday'] = 'Sunday';
|
||||
$string['timerelativetoday'] = 'Today, {$a}';
|
||||
$string['timerelativetomorrow'] = 'Tomorrow, {$a}';
|
||||
$string['timerelativeyesterday'] = 'Yesterday, {$a}';
|
||||
$string['thu'] = 'Thu';
|
||||
$string['thursday'] = 'Thursday';
|
||||
$string['timeformat_12'] = '12-hour (am/pm)';
|
||||
|
||||
@@ -189,9 +189,6 @@ $string['strftimemonth'] = '%B';
|
||||
$string['strftimemonthyear'] = '%B %Y';
|
||||
$string['strftimerecent'] = '%d %b, %H:%M';
|
||||
$string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
|
||||
$string['strftimerelativetoday'] = 'Today, %d %B';
|
||||
$string['strftimerelativetomorrow'] = 'Tomorrow, %d %B';
|
||||
$string['strftimerelativeyesterday'] = 'Yesterday, %d %B';
|
||||
$string['strftimetime'] = '%I:%M %p';
|
||||
$string['strftimetime12'] = '%I:%M %p';
|
||||
$string['strftimetime24'] = '%H:%M';
|
||||
|
||||
Reference in New Issue
Block a user