diff --git a/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb b/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb index 2a062625fc6f..c19ccd4bb1aa 100644 --- a/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb +++ b/app/components/work_packages/activities_tab/journals/item_component/add_reactions.html.erb @@ -25,7 +25,7 @@ tag: :a, href: toggle_reaction_work_package_activity_path(journal.journable.id, id: journal.id, reaction:), data: { "turbo-stream": true, "turbo-method": :put }, - "aria-label": I18n.t("reactions.react_with", reaction: reaction.tr("_", "")) + "aria-label": I18n.t("reactions.react_with", reaction: reaction.to_s.humanize(capitalize: false)) )) do emoji end 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 a7fbee62fb15..a6c083b82b33 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 @@ -62,7 +62,8 @@ def reacted_by_current_user?(users) # ARIA-label, show names and emoji type: "{Name of reaction} by {user A}, {user B} and {user C}". def aria_label_text(reaction, users) - "#{I18n.t('reactions.reaction_by', reaction: reaction.to_s.tr('_', ' '))} #{number_of_user_reactions_text(users)}" + "#{I18n.t('reactions.reaction_by', + reaction: reaction.to_s.humanize(capitalize: false))} #{number_of_user_reactions_text(users)}" end # Visually, show just names: "{user A}, {user B} and {user C}"