Opened 11 years ago

Closed 11 years ago

#1298 closed defect (fixed)

Correctly handle plural forms in DirtyDocks.cpp

Reported by: Łukasz Jernaś Owned by: cbro@…
Priority: minor Milestone:
Component: merkaartor Version:
Keywords: Cc: deejay1@…

Description

Currently DirtyDocks?.cpp uses a hack to generate string for plural forms of a message. Attached is a patch which should handle it correctly in Qt. See http://doc.trolltech.com/qq/qq19-plurals.html

Attachments (2)

DirtyDock_plural_forms.patch (794 bytes) - added by Łukasz Jernaś 11 years ago.
DirtyDock_argument_passing.patch (424 bytes) - added by Łukasz Jernaś 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by Łukasz Jernaś

comment:1 Changed 11 years ago by dantje

I edited it a little and merged this patch in r11538. I see the benefit for the translators, but wasn't able to reproduce the exact current english strings ("is"/"are") with tr() alone. Close ticket if this is good enough.

ui.label->setText(tr("There are <b>%n</b> objects in the dirty layer", "", dirtyObjects));

comment:2 Changed 11 years ago by Łukasz Jernaś

Resolution: fixed
Status: newclosed

I can think of no other solution to keep the current English strings than yours, although it adds some duplication with at least two almost identical string being translated. Personally I wouldn't bother if there was like in my patch (There are 0 objects in the dirty layer; There is 1 object in the dirty layer etc). Closing it as it is acceptable for me.

comment:3 Changed 11 years ago by Łukasz Jernaś

Resolution: fixed
Status: closedreopened

Reopening - almost the same reason as in #1306, but this time it wasn't my fault ;)

Changed 11 years ago by Łukasz Jernaś

comment:4 Changed 11 years ago by Łukasz Jernaś

Resolution: fixed
Status: reopenedclosed

(In [12032]) FIX: Pass arguments to recently changed translatable strings.

Definitely closes #1298 and #1306.

Note: See TracTickets for help on using tickets.