From c5bd893c61623035a2be19746d3f3a4fb9e11775 Mon Sep 17 00:00:00 2001 From: Ayoub Glizi-Vicioso Date: Thu, 5 Feb 2026 14:03:39 -0500 Subject: [PATCH] Bug 41769: Make ', by' string translatable in suggestions To test: 1. Add another language to Koha ./misc/translator/translate install fr-CA 2. Enable the new language in StaffInterfaceLanguages 2.1. Go to Administration > System preferences 2.2. Search for StaffInterfaceLanguages 2.3. Check the new language 2.4. Click Save all I18N/L10N preferences 3. Create a new purchase suggestion 3.1. Go to More > Suggestions 3.2. Click New purchase suggestion 3.3. Fill out the title AND the author at least 3.4. Click Submit your suggestion 4. View the suggestion in the table --> It says title, by author 5. Switch language --> The ", by" is still in English 6. Apply patch. 7. Reload page. 8. Notice that ", by" is now translated. --> in this instance, you will see ", par" Signed-off-by: David Nind --- .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 806d9a1b26..165dfb9a95 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -1354,7 +1354,9 @@ orderable: true, render: function (data, type, row, meta) { let node = '%s'.format(row.suggestion_id, _("suggestion"), row.title); - if(row.author) node += ', by %s'.format(row.author); + if(row.author) { + node += _("%s%s, by %s%s").format("", "", row.author.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.39.5