Bug 188693

Summary: Scripty does not support Qt plural messages.
Product: [I don't know] kde Reporter: Andrius Štikonas <andrius>
Component: generalAssignee: Chusslove Illich <caslav.ilic>
Status: RESOLVED FIXED    
Severity: wishlist CC: caslav.ilic, lueck
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrius Štikonas 2009-04-02 23:48:40 UTC
Version:           kde (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

Please enable Qt plurals support in scripty. Currently it ignores such strings thus making it impossible to use plural forms in some KDE applications. QObject::tr is used in some KDE applications such as marble, kalzium and step.

More info:
http://doc.trolltech.com/4.2/qobject.html#tr
http://groups.google.com/group/gnu.utils.bug/browse_thread/thread/92196e0da29c4aaa

Expected behaviour:

$ cat foo.cc
  QString msg = tr("%n bird(s)", "", 10); // plural call
  QString msg = tr("%1 bird(s)", "").arg(10); // ordinary call
  QString msg = tr("%1 eagle(s)").arg(10); // ordinary call
$ xgettext --omit-header --no-location \
    --qt --keyword=tr:1,1t --keyword=tr:1,2c,2t --keyword=tr:1,1,2c,3t \
    -o - foo.cc
#, qt-plural-format
msgctxt ""
msgid "%n bird(s)"
msgid_plural "%n bird(s)"
msgstr[0] ""
msgstr[1] ""

#, qt-format
msgctxt ""
msgid "%1 bird(s)"
msgstr ""

#, qt-format
msgid "%1 eagle(s)"
msgstr ""
Comment 1 Burkhard Lück 2014-10-29 19:16:33 UTC
In 4.14 + master I can not find incorrect plurals like "%1 bird(s)" in translation messages for marble, kalzium and step.

Where do you see this kind of error?
Comment 2 Andrius Štikonas 2014-10-29 19:41:22 UTC
Indeed, I can't see them now. But this bug is 5 years old. They were probably replaced...