davy7125 / polyphone

A soundfont editor for quickly designing musical instruments.
https://www.polyphone.io
GNU General Public License v3.0
363 stars 49 forks source link

Apply plural forms. #90

Closed lexeii closed 4 years ago

lexeii commented 4 years ago

Allow tr() to make own suggestions about plural forms in the destination language.

For example, both English and French use simple rules to find out plurals, but 0 in English is plural, while in French it is singular. Moreover, for example, Russian uses 3 forms:

  1. for 1, 21, 31, ...
  2. for 2-4, 22-24, ...
  3. for 5-20, 25-30, ...

Combining all the 3 forms in one Russian word looks bulky and unprofessional and hard to read.

Fortunately, the problems of i18n and localization have long been resolved in Qt: https://doc.qt.io/qt-5/i18n-source-translation.html#handling-plurals

davy7125 commented 4 years ago

Oof!! I didn't know plurals could be this complicated! Thank you for this update