Change request: plural in time
-
Hello and thanks for this great plugin!
Please in a feauture version change the time function so it can support plural translation.
For everyone that needs that this is the modified function.
function yumprint_recipe_time($time) { if (empty($time)) { return null; } $time = intval($time); $minutes = $time % 60; $hours = floor(($time - $minutes) / 60); if ($hours > 0) { $result = $hours . _n(" hr", " hrs", $hours, "yumprint-recipe"); } else { $result = ""; } if ($minutes > 0) { $result = $result . " " . $minutes . _n(" min", " mins", $minutes, "yumprint-recipe"); } return trim($result); }Thanks again!
George
The topic ‘Change request: plural in time’ is closed to new replies.