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

List:       kde-devel
Subject:    Re: i18n strings containing two separate plural forms
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2010-07-23 20:42:27
Message-ID: 201007232242.30817.caslav.ilic () gmx ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


> [: David Jarvie :]
> A bug has been raised on KAlarm (
> https://bugs.kde.org/show_bug.cgi?id=245575) about bad i18n strings. They
> are supposed to cope with two separate plural forms, but evidently don't
> work properly. [...] Is there a good way of coding this?

I'd say there is no good way, but a tolerable one, and that is just what the
bug reporter suggested. This:

  QString msg = i18ncp("@info",
                       "in 1 hour %2 minutes' time",
                       "in %1 hours %2 minutes' time",
                        mins/60, mins%60);

would be replaced with something like:

  QString hourfmt = i18ncp("@item:intext inserted into 'in ... time' below",
                           "1 hour", "%1 hours", mins/60);
  QString minfmt = i18ncp("@item:intext inserted into 'in ... time' below",
                          "1 minute's", "%1 minutes'", mins/60);
  QString msg = i18nc("@info %1 and %2 are the two previous messages",
                      "in %1 %2 time", hourfmt, minfmt);

-- 
Chusslove Illich (Часлав Илић)

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

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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