Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations - plural forms #41

Closed
wikiyu opened this issue Oct 2, 2020 · 3 comments · Fixed by #166
Closed

Translations - plural forms #41

wikiyu opened this issue Oct 2, 2020 · 3 comments · Fixed by #166
Labels
enhancement Improve quality of existing features
Milestone

Comments

@wikiyu
Copy link
Contributor

wikiyu commented Oct 2, 2020

Is your feature request related to a problem? Please describe.

There is a lot of languages with more than two forms - singular and plural. For example in polish (and most of slavic languages) we have
1 comment - 1 komentarz
2 comments - 2 komentarze
5 comments - 5 komentarzy
here we have two different forms of plurals. But ... there is much more fun in this area.
https://doc.qt.io/archives/qq/qq19-plurals.html - in QT library docs is quite nice example

Describe the solution you'd like

Best method that i even know about translations with support of many plural (and null) forms is gettext https://www.gnu.org/software/gettext/
with poEditor - tool to make very fast translations, and even online tool. As i found there is also javascript gettext implementation.
https://github.com/guillaumepotier/gettext.js/

Describe alternatives you've considered

Additional context

https://www.gnu.org/software/gettext/manual/gettext.html#Translating-plural-forms

@devmount devmount added the enhancement Improve quality of existing features label Oct 2, 2020
@devmount
Copy link
Owner

devmount commented Oct 2, 2020

Thank you for this request. This add-ons internationalization is built on vue-i18n, which has an option for custom pluralization:
https://kazupon.github.io/vue-i18n/guide/pluralization.html#custom-pluralization

So you just have to pass an optional pluralizationRules object into VueI18n constructor options.
@wikiyu Can you formulate these rules for Polish and create such an object?

@devmount
Copy link
Owner

Are you still interested in this feature request? If yes, I need some help creating the corresponding object to implement the special pluralization. @wikiyu @dfoltynski ?

arndissler added a commit to arndissler/third-stats that referenced this issue Dec 4, 2020
@devmount
Copy link
Owner

devmount commented Dec 5, 2020

@wikiyu Thanks to @arndissler, we now have Polish pluralization rules implemented. You can now translate l.6 of pl/messages.json like this: "Konto | Konta | Kont"

Would be awesome if you find some time to translate Polish to the latest state. You can use our localization tool for this (see #135). Wielkie dzięki!

@devmount devmount added this to the v1.1.0 milestone Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve quality of existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants