Time localisation - "@count hour" (ago) instead of "1 hour"? Short story:

When Drupal 6 display time in format "x ago" (for example "3 hours ago"), there are two strings - for singular and plural. Singular string for hours is "1 hour", plural string is "@count hours". My question is - is this a bug? Shouldn't be there "@count hour"?

Long story:

Today, something strange happened to me. I went back to my site where I posted a comment yesterday around this time. However, in recent comments block, there was my comment marked as "1 hour 15 minutes ago" (in my language, not English - that's important!).

After I checked that time zone, server time and comment time are correct, I started debugging the Drupal. Finally, I found the culprit; it's the method format_interval(). At start of the method, there are strings definitions. For hour it's '1 hour|@count hours' - 1 hour for singular, @count hours for plural.

I found out that my comment was posted 21 hours ago and that locale_get_plural() function returned 0 - which is interpreted as singular.

And that's the problem - in my language we read "21 hour", NOT "21 hourS"! However, the count variable is not used, so for each numeric value read as singular (1, 21, 31, 41, ..., 91, 101, 121, 131, ...) (note: yeah, 11 is not singular in my language), the displayed value will be always 1!

I'm writing about hours, but this is same for all other values - years, weeks, minutes and seconds. Experimentally, I changed translation of "1 hour" to "@count hour" (in my language, not English) and the displayed time become correct. However, this is not clean solution, so my question is: is this a bug? If not, how should I solve this correctly?

Notes


I use Drupal 6
Happening on my machine (Xubuntu 14.04) and server (some Gentoo)
My language is Czech
The change you have made should work until you download and install an update to the drupal core language file.

The Drupal Localize site would allow you to download an check the latest versions of the  core language files to see if the bug also exists latest versions of 6, 7 and 8. 

https://localize.drupal.org/translate/languages/cs

Perhaps you could sign up and posting a message into the Czech language forum on the localize site.  You can also find out more about contributing on the localize website.

https://localize.drupal.org