From 04b20a751f4ebe5188fd458390d1c0cc24411bfe Mon Sep 17 00:00:00 2001 From: caroline Date: Tue, 4 Feb 2025 15:29:13 -0500 Subject: [PATCH] Bug 39032: "Items selected" in item search untranslatable This patch corrects a syntax error that prevented the string "Items selected" from being picked up by the translation tool. To recreate: 1. Go to Item search 2. Click 'Search' 3. Select one or more results --> In the bar at the top of the results there is a rectangle with "Items selected: N XClear" 4. Install another language (e.g. fr-CA) 4.1. For ktd, do the following commands ktd --shell gulp po:update --lang fr-CA Ctrl+D (exit shell) ktd --root --shell koha-translate --install fr-CA --dev kohadev koha-translate --update fr-CA --dev kohadev 4.2. Go to Administration > System preferences 4.3. Search for StaffInterfaceLanguages 4.4. Check fr-CA 4.5. Click 'Save all I18N/L10N preferences' 5. Redo steps 1-3 in French --> "Items selected" is not translated 6. Apply patch 7. Update translations (for ktd) ktd --shell gulp po:update --lang fr-CA 8. Open misc/translator/po/fr-CA-staff-prog.po 9. Search for "Items selected" --> It should be there, with a fuzzy flag 10. Translate the phrase in msgstr and remove the line with the fuzzy flag 11. Apply translations (for ktd) ktd --root --shell koha-translate --update fr-CA --dev kohadev 12. Redo steps 1-3 in French --> "Items selected" is now translated! --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 01e12c6a14..fb640df5d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -370,7 +370,7 @@ function showItemSelections( number ){ let caret = ' '; if( number > 0 ){ - $("#table_search_selections").show().find("span").text(_("Items selected: " + number ) ); + $("#table_search_selections").show().find("span").html(_("Items selected: ") + number ); $("#batch_mod_menu").removeClass("disabled").prop("disabled", false); $("#export-button").html(_("Export selected results (%s) to").format ( number ) + caret); } else { -- 2.43.0