From: Siebrand Mazeland Date: Tue, 16 Aug 2011 16:04:56 +0000 (+0200) Subject: Fix awkward attempt at i18n. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fd4c72bf85bf0e7379593b86290f0025650c0073;p=quix0rs-gnu-social.git Fix awkward attempt at i18n. --- diff --git a/plugins/Event/eventtimelist.php b/plugins/Event/eventtimelist.php index 4ca40cb61f..9238f294d0 100644 --- a/plugins/Event/eventtimelist.php +++ b/plugins/Event/eventtimelist.php @@ -31,7 +31,6 @@ * Class to get fancy times for the dropdowns on the new event form */ class EventTimeList { - /** * Round up to the nearest half hour * @@ -73,7 +72,6 @@ class EventTimeList { $len = 0; for ($i = 0; $i < 48; $i++) { - // make sure we store the time as UTC $newTime->setTimezone(new DateTimeZone('UTC')); $utcTime = $newTime->format('H:i:s'); @@ -86,22 +84,22 @@ class EventTimeList { if ($duration) { $len += 30; $hours = $len / 60; - // for i18n - $hourStr = _m('hour'); - $hoursStr = _m('hrs'); - $minStr = _m('mins'); switch ($hours) { case 0: - $total = " (0 {$minStr})"; + // TRANS: 0 minutes abbreviated. Used in a list. + $total = ' ' . _m('(0 min)'); break; case .5: - $total = " (30 {$minStr})"; + // TRANS: 30 minutes abbreviated. Used in a list. + $total = ' ' . _m('(30 min)'); break; case 1: - $total = " (1 {$hourStr})"; + // TRANS: 1 hour. Used in a list. + $total = ' ' . _m('(1 hour)'); break; default: - $total = " ({$hours} " . $hoursStr . ')'; + // TRANS: Number of hours (%d). Used in a list. + $total = ' ' . sprintf(_m('(%d hour)','(%d hours)',$hours), $hours); break; } $localTime .= $total; @@ -113,7 +111,4 @@ class EventTimeList { return $times; } - } - -