Project

General

Profile

Patch #43379 » fix-alert-custom-title-v2.patch

Go MAEDA, 2025-10-31 05:01

View differences:

lib/redmine/wiki_formatting/common_mark/alerts_icons_filter.rb
48 48
            icon_name = ALERT_TYPE_TO_ICON_NAME[alert_type]
49 49
            next unless icon_name # Skip if no specific icon is defined for this alert type
50 50

  
51
            # label alert translation
52
            node.content = ::I18n.t("label_alert_#{alert_type}", default: node.content)
51
            # Translate the alert title only if it matches a known alert type
52
            # (i.e., the title has not been overridden)
53
            if ALERT_TYPE_TO_ICON_NAME.key?(node.content.downcase)
54
              node.content = ::I18n.t("label_alert_#{alert_type}", default: node.content)
55
            end
53 56

  
54 57
            icon_html = ApplicationController.helpers.sprite_icon(icon_name, node.text)
55 58

  
(5-5/5)