Why plural on these keys?

AI-generated summary

The discussion revolves around the use of plural forms in various translation keys within a software project, particularly in Slovenian translations. Lure questions the logic behind enabling plural for keys that don’t use %{count}, such as datetime.distance_in_words_verbose.less_than_x_seconds, which now reads ‘right now’ without a number. gerhard clarifies that some plural forms were retained due to legacy reasons and will be removed, while others, like js.number.human.storage_units.units.byte, are used in contexts where numbers are displayed. Lure also raises concerns about gender mismatches in Slovenian translations for filters like js.filters.new.title_with_count, which is used inconsistently across sections. gerhard explains that js.groups.title uses plural for multiple groups, and js.filters.with_topics and js.filters.with_category are used for page titles with filter names like ‘Latest topics’. The conversation also touches on the potential removal of outdated ‘Hot’ filter translations gerhard.

While going through plurals in Slovenian translations I have noticed some keys that have plural enabled, but I do not see %{count}, so it is hard to understand how they are used.

Does not make sense to have number for this, right?

  • datetime.distance_in_words_verbose.less_than_x_seconds

Is number just added in front for these?

  • js.number.human.storage_units.units.byte
  • js.links_lowercase
  • js.groups.title
  • js.post.actions.defer_flags

Does it make sense to have plural for pecentage?

  • admin_js.admin.flags.user_percentage.agreed
  • admin_js.admin.flags.user_percentage.disagreed
  • admin_js.admin.flags.user_percentage.ignored
2 Likes

There was a number in this string before it was changed to “right now”. Looks like we forgot to remove the plural.

I’m quite sure that happens for byte and it’s quite likely that the same thing happens for the others as well. I’ll check it out when I have some time.

I’m not sure. :thinking: It certainly doesn’t make sense for English and German. Maybe other languages need it? I guess using pluralization doesn’t hurt in this case. :man_shrugging:

2 Likes

Thanks for the clarification.
Related question: how is the plural used for titles:

  • js.groups.title

And for filters, it is difficult to decide which gender should be used as there is no context:

  • js.filters.latest.title_with_count
  • js.filters.unread.title_with_count
  • js.filters.new.title_with_count

In Slovene, “topic” is feminine, while “post” is masculine. If the same form is used for both, it will be incorrect or strange in some cases.

It’s shown in user profiles. If the user belongs to one group it shows “Group <group_name>” and if the user belongs to more than one it shows “Groups <group_name1>, <group_name2>, …”

Those filters are for topics.
image

2 Likes

It seems that at least New (js.filters.new.title_with_count) is also used in Admin/Users:

Which makes a strange mismatch between Nove and Novi uporabniki. Maybe something to separate in future?

Can you also explain use of these:

  • js.filters.with_topics
  • js.filters.with_category

Are they missing plural? Or is %{filter} name of filter?

I’ll remove the pluralization in an upcoming commit.

This is kind of a special case because the numbers are shown above the text.

The actual number isn’t shown, but the button text changes depending on the number of flags.

No, the admin panel uses admin_js.admin.users.nav.new for the navigation item shown in your screenshot.

Those are used as page title and are visible in the browser tab. Values for %{filter} are “Latest”, “Unread”, “New”, “Read”, “My Posts” and “Bookmarks”. The last 3 values aren’t visible by default.

So, for js.filters.with_topics you get titles like “Latest topics”, “Unread topics”,… js.filters.with_category is used when the filter is applied to a category and leads to titles like “Latest support topics” or “New support topics”.

While looking at this I noticed that we still have translations for the old “Hot” filter. I’ll remove those strings unless I find a place where this stuff is still used.

4 Likes