Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix[Op#40437]: switch to i18n pluralization

Kabiru Mwenja2627f2ce5739
diff --git a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb b/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
index c4e387d324d..6c651f7e8f9 100644
--- a/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
+++ b/app/components/work_packages/activities_tab/journals/item_component/reactions.rb
@@ -74,11 +74,9 @@ module WorkPackages
if user_count <= max_displayed_users_count
"#{displayed_users[0..-2].join(', ')} #{I18n.t('reactions.and_user', user: displayed_users.last)}"
- elsif user_count == max_displayed_users_count + 1
- "#{displayed_users.join(', ')} #{I18n.t('reactions.and_n_others_singular', n: 1)}"
else
- "#{displayed_users.join(', ')} #{I18n.t('reactions.and_n_others_plural',
- n: user_count - max_displayed_users_count)}"
+ "#{displayed_users.join(', ')} #{I18n.t('reactions.and_others',
+ count: user_count - max_displayed_users_count)}"
end
end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5de5d229a93..81234865011 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -551,8 +551,9 @@ en:
add_reaction: "Add reaction"
react_with: "React with %{reaction}"
and_user: "and %{user}"
- and_n_others_singular: "and %{n} other"
- and_n_others_plural: "and %{n} others"
+ and_others:
+ one: and 1 other
+ other: and %{count} others
reaction_by: "%{reaction} by"
reportings: