diff --git a/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter.rb b/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter.rb index 73a09b15f..595c6cf58 100644 --- a/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter.rb +++ b/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter.rb @@ -48,8 +48,11 @@ module Redmine icon_name = ALERT_TYPE_TO_ICON_NAME[alert_type] next unless icon_name # Skip if no specific icon is defined for this alert type - # label alert translation - node.content = ::I18n.t("label_alert_#{alert_type}", default: node.content) + # Translate the alert title only if it matches a known alert type + # (i.e., the title has not been overridden) + if ALERT_TYPE_TO_ICON_NAME.key?(node.content.downcase) + node.content = ::I18n.t("label_alert_#{alert_type}", default: node.content) + end icon_html = ApplicationController.helpers.sprite_icon(icon_name, node.text)