fix: fixed hacky pluralization of contributors#3385
fix: fixed hacky pluralization of contributors#3385Ducica wants to merge 1 commit intoinveniosoftware:masterfrom
Conversation
| {%- for group in record_ui["ui"]["contributors"]["contributors"]|groupby('role.title')%} | ||
| <div> | ||
| <h3 class="creatibutors-header ui small header">{{group.grouper}}{%- if group.list|length > 1 -%}s{%- endif -%}:</h3> | ||
| <h3 class="creatibutors-header ui small header">{{group.grouper}}:</h3> |
There was a problem hiding this comment.
Won't be the extra "s" missing now for English?
There was a problem hiding this comment.
Yes sure, but it is not possible to actually make pluralization here in a reasonable way, so in my opinion, it is better to have correct text in all languages without pluralization, thank to have correct pluralization in English, but gibberish in all other languages.
There was a problem hiding this comment.
Hi, can't we instead define on the group.grouper an extra property e.g group.grouper_plural to be able to translate both and not hack the s in the template?
There was a problem hiding this comment.
Hey, in my opinion, the issue is, that role.title, is a localized value from a vocabulary and you don't know what plural of that is. Meaning in english you know Supervisor is Supervisors, in Czech for example it is Supervizor and Supervizory. So I would say, unless you would store plurals of everything in the vocabulary, which is a humongous change, this cannot be done properly. If the english version pluralization is very important, we could keep the existing hack, only in case selected language is english, or potentially provide number in a bracket i.e. Supervisor (3):. Please let me know what you think
There was a problem hiding this comment.
Agree that we can't do pluralization properly unless we translate all the strings in their plural form (cc @utnapischtim and @tmorrell), so the ({count}) is a good middle-ground.
There was a problem hiding this comment.
I agree ({count}) is probably the best option without completely refactoring the translations to include plurals
There was a problem hiding this comment.
Thanks everyone, I've modified to use count instead.
2fcc084 to
272e004
Compare
❤️ Thank you for your contribution!
Description
Contributors widget on detail has a hacky pluralization that works only with English language. When used in any other language, it looks really strange:
We think it is not correct to use such a principle for pluralization, especially since this is supposed to be a multilingual value (title from a vocabulary item). Please if possible to merge.
Thank you,
Dusan S CESNET