From 6c1c9229d4436d28a2ab47ca56c44f0681f00423 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 6 Mar 2026 11:09:45 +0100 Subject: [PATCH] Bug 41769: Translate "%s, by %s" Instead of translating ", by" we add more flexibility for languages that need to invert author and title for instance. --- .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 47bdf455990..c95514081bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -1369,10 +1369,8 @@ searchable: true, orderable: true, render: function (data, type, row, meta) { - let node = '%s'.format(row.suggestion_id, _("suggestion"), row.title); - if(row.author) { - node += ", %s %s".format(_("by"),row.author.escapeHtml()); - } + let a = ''.format(row.suggestion_id, _("suggestion")); + let node = a + ( row.author ? a + _("%s, by %s").format(row.title.escapeHtml(), row.author.escapeHtml()) : row.title.escapeHtml()); node += '
'; if(row.copyright_date) node += ' © %s'.format(row.copyright_date); if(row.volume_desc) node += '; %s:%s'.format(_("Volume"), row.volume_desc); -- 2.43.0