Make WordPress Core


Ignore:
Timestamp:
12/21/2006 11:06:18 PM (19 years ago)
Author:
markjaquith
Message:

i18n fixes, logic cleanup, wording clarifications, and more from nbachiyski. fixes #3474

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r4657 r4658  
    739739    if ($diff <= 3600) {
    740740        $mins = round($diff / 60);
    741         if ($mins <= 1)
    742             $since = __('1 min');
    743         else
    744             $since = sprintf( __('%s mins'), $mins);
     741        if ($mins <= 1) {
     742            $mins = 1;
     743        }
     744        $since = sprintf(__ngettext('%s min', '%s mins', $mins), $mins);
    745745    } else if (($diff <= 86400) && ($diff > 3600)) {
    746746        $hours = round($diff / 3600);
    747         if ($hours <= 1)
    748             $since = __('1 hour');
    749         else
    750             $since = sprintf( __('%s hours'), $hours );
     747        if ($hours <= 1) {
     748            $hour = 1;
     749        }
     750        $since = sprintf(__ngettext('%s hour', '%s hours', $hours), $hours);
    751751    } elseif ($diff >= 86400) {
    752752        $days = round($diff / 86400);
    753         if ($days <= 1)
    754             $since = __('1 day');
    755         else
    756             $since = sprintf( __('%s days'), $days );
     753        if ($days <= 1) {
     754            $days = 1;
     755        }
     756        $since = sprintf(__('%s day', '%s days', $days), $days);
    757757    }
    758758    return $since;
Note: See TracChangeset for help on using the changeset viewer.