← All bug reports

FS#1716Wrong plural forms in translations

Type
Bug
Status
Closed
Resolution
Implemented
Category
Translation
Severity
Low
Priority
Low
Reported version
3.19.2
Operating system
All
Reported
2018-02-11 by psokol
Closed
2018-02-21 by andrew
Votes
1

I found that words which has plural forms are translated in manner where only two forms are possible - like in English language. For example: "Object" and "Objects". But other languages (for example Polish) very often have more than 2 plural forms.
There are also strings which use only one form (for example: "Reset label position of %1 dimension(s).") but cardinal number placed in string point on more forms than one.
All these strings looks bad when translated and sometimes even in English. I mark most of them using comments:

http://translate.qcad.org/pl/qcad/translate/#search=plural&sfields=notes

http://translate.qcad.org/pl/qcadpro/translate/#search=plural&sfields=notes

http://translate.qcad.org/pl/qcadcam/translate/#search=plural&sfields=notes

I believe problem can be fixed using plural form strings: https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html

Comments (1)

andrew 2018-02-21

Thanks for pointing this out.

I've adjusted the plural forms to allow multiple translations as described on:
http://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals

You can see what pootle does with that at:
http://translate.qcad.org/pl/qcad/translate/scripts/Edit/Duplicate/ts/Duplicate_pl.ts#unit=292889

Unfortunately, not quite clear, but here's what it means:
plural form 0: singular
plural form 1: paucal
plural form 2: plural

I hope this makes sense. Here's the math behind it:
http://doc.qt.io/qt-5/i18n-plural-rules.html

Let me know if you bump into any problems.