Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Correctly handle plural forms in DirtyDocks.cpp #1298

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

Correctly handle plural forms in DirtyDocks.cpp #1298

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: deejay1
[Submitted to the original trac issue database at 12.15pm, Sunday, 26th October 2008]

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

@openstreetmap-trac
Copy link
Author

Author: dantje
[Added to the original trac issue at 10.31pm, Tuesday, 28th October 2008]

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));

@openstreetmap-trac
Copy link
Author

Author: deejay1
[Added to the original trac issue at 7.20pm, Wednesday, 29th October 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: deejay1
[Added to the original trac issue at 12.46pm, Saturday, 15th November 2008]

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

@openstreetmap-trac
Copy link
Author

Author: deejay1
[Added to the original trac issue at 7.15am, Saturday, 22nd November 2008]

(In [12032]) FIX: Pass arguments to recently changed translatable strings.
Definitely closes #1298 and #1306.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant