[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: KLocale::formatDuration
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2007-12-23 15:12:58
Message-ID: 200712231612.58861.caslav.ilic () gmx ! net
[Download RAW message or body]


> [: Nick Shaforostoff :]
>   return i18n( "%1 days", formatNumber( mSec/(24*3600000), 3));
> [...]
> ok for me to replace i18n with i18ncp ?

These can't be plural calls, since the number is real (with decimals). Only
the final one:

  i18n( "%1 milliseconds", formatNumber(mSec, 0));

is going to come out as integer, so it could use a plural call (but the
number must be sent as integer, formatNumber() is superfluous here anyway).
Though adding a comment (// i18n: Blah...) that the numbers are real would
be nice for translators not to think a plural call is missing.

On the other hand, all these calls shouldn't use formatNumber(), but k18n*()
series, in order to have the number localized according to the language:

  return ki18n( "%1 days" ).subs( mSec/(24*3600000), 0, 'g', 3 ).toString();

> it is a good idea to use i18n( "%1 B", 0); instead of i18n( "0 B" );

Frankly, I haven't a clue why the else branch at all :)

-- 
Chusslove Illich (Часлав Илић)
Serbian KDE translation team

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic