Skip to content

Wrong plural forms in translations #4139

@Withalion

Description

@Withalion

Currently we don't have correct translations for languages with multiple plural forms. Fortunately the translation framework supports this, but our code doesn't. Often times we pass the string for translation as tr( QStringLiteral("I love %1 apple(s)").arg(appleCount)), however this format doesn't generate the multiple plural forms for languages that need that. We should change it to tr( "I love %n apple(s)", "", appleCount). More info. Another improvement would be to also change code which uses ternary operators to decide between plural and singular forms

Example:

  • the notification text is in Slovak and the language has 3 plural forms, the last word is in 3. form but should be in 2.
Image

Thanks @RastoHu for catching this.

Metadata

Metadata

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions