diff --git a/classes/models/outage.php b/classes/models/outage.php index 320f7ab..ebc2894 100644 --- a/classes/models/outage.php +++ b/classes/models/outage.php @@ -144,8 +144,8 @@ class outage { '{{stop}}' ], [ - userdate($this->starttime, get_string('strftimedatetimeshort')), - userdate($this->stoptime, get_string('strftimedatetimeshort')), + userdate($this->starttime, get_string('datetimeformat', 'auth_outage')), + userdate($this->stoptime, get_string('datetimeformat', 'auth_outage')), ], $str ); diff --git a/classes/tables/manage.php b/classes/tables/manage.php index c6fa874..418fba8 100644 --- a/classes/tables/manage.php +++ b/classes/tables/manage.php @@ -101,7 +101,7 @@ class manage extends \flexible_table { $this->add_data([ format_time($outage->get_warning_duration()), - userdate($outage->starttime, get_string('tablerowstarts', 'auth_outage')), + userdate($outage->starttime, get_string('datetimeformat', 'auth_outage')), format_time($outage->get_duration()), $title, $buttons, diff --git a/lang/en/auth_outage.php b/lang/en/auth_outage.php index 6fbc561..68a95d9 100644 --- a/lang/en/auth_outage.php +++ b/lang/en/auth_outage.php @@ -24,6 +24,7 @@ */ $string['auth_outagedescription'] = 'Auxiliary plugin that warns users about a future outage and prevents them from logging in once the outage starts.'; +$string['datetimeformat'] = '%d %h %Y at %I:%M%P'; $string['defaultlayoutcss'] = 'Layout CSS'; $string['defaultlayoutcssdescription'] = 'This CSS code will be used to display the Outage Warning Bar.'; $string['defaultoutageduration'] = 'Outage Duration'; @@ -37,10 +38,6 @@ $string['defaultwarningdescription'] = 'Description'; $string['defaultwarningdescriptiondescription'] = 'Default warning message for outages. Use {{start}} and {{stop}} placeholders as required.'; $string['defaultwarningdescriptionvalue'] = 'There is an scheduled maintenance from {{start}} to {{stop}} and our system will not be available during that time.'; $string['description'] = 'Public Description'; -$string['durationseconds'] = 'second(s)'; -$string['durationminutes'] = 'minutes(s)'; -$string['durationhours'] = 'hour(s)'; -$string['durationdays'] = 'day(s)'; $string['menudefaults'] = 'Default Settings'; $string['menumanage'] = 'Manage'; $string['messageoutageongoing'] = 'Our system will be under maintenance until {$a->stop}.'; @@ -61,7 +58,6 @@ $string['tableheaderstarttime'] = 'Starts on'; $string['tableheaderstopsafter'] = 'Stops after'; $string['tableheaderwarnbefore'] = 'Warns before'; $string['tableheadertitle'] = 'Title'; -$string['tablerowstarts'] = '%d %h %Y at %H:%M'; $string['textplaceholdershint'] = 'You can use {{start}} and {{stop}} as placeholders on the title/description for the actual start/stop time.'; $string['titleerrorinvalid'] = 'Title cannot be left blank.'; $string['titleerrortoolong'] = 'Title cannot have more than {$a} characters.';