From 5fabcc96ba14d38052b792443f5d025168b1bd6b Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Tue, 30 Nov 2021 14:10:58 +0100
Subject: [PATCH] Bug 29589: MARCOverlayRules - fix translatability issue

Strings must not contain html tags, we should use KohaSpan instead.

Test plan:
Apply the patch, update translation for a given language, edit XX-YY-staff-prog.po

Notice that the string is now
"The %s preference is not set, don't forget to enable it for rules to take effect."

Signed-off-by: David Nind <david@davidnind.com>
---
 .../intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt
index 0f767e3940..894ba40bd3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt
@@ -2,6 +2,7 @@
 [% USE Asset %]
 [% SET footerjs = 1 %]
 [% USE Koha %]
+[% USE KohaSpan %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>MARC overlay rules &rsaquo; Koha &rsaquo; Administration</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -53,8 +54,9 @@
                 [% END %]
 
                 [% UNLESS Koha.Preference( 'MARCOverlayRules' ) %]
+                [% SET pref_MARCOverlayRules_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=MARCOverlayRules">MARCOverlayRules</a>' %]
                 <div class="dialog message">
-                    The <b>MARCOverlayRules</b> preference is not set, don't forget to enable it for rules to take effect.
+                    The [%  pref_MARCOverlayRules_link | $KohaSpan %] preference is not set, don't forget to enable it for rules to take effect.
                 </div>
                 [% END %]
                 [% IF removeConfirm %]
-- 
2.20.1