From 9437db7979ae7e08ce290f220f8c33e8ad6cdf5e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 20 Jun 2022 11:14:53 +0100 Subject: [PATCH] Bug 28854: (follow-up) Translations fixes This patch wraps and unwraps strings appropriately for trasnlation. Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/catalogue/detail.tt | 40 +++++++++---------- .../prog/en/modules/circ/returns.tt | 20 +++++----- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 99550019db..cb64e8e6e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1616,8 +1616,8 @@ Note that permanent location is a code, and location may be an authval. // Toolbar var bundle_toolbar = $('
'); - bundle_toolbar.append(' Add to bundle'); - bundle_toolbar.append(' Remove from bundle'); + bundle_toolbar.append(' ' + _("Add to bundle") + ''); + bundle_toolbar.append(' ' + _("Remove from bundle") + ''); // This is the table we'll convert into a DataTable var bundles_table = $(''); @@ -1649,7 +1649,7 @@ Note that permanent location is a code, and location may be an authval. "columns": [ { "data": "biblio.title:biblio.medium", - "title": "Title", + "title": _("Title"), "searchable": true, "orderable": true, "render": function(data, type, row, meta) { @@ -1668,37 +1668,37 @@ Note that permanent location is a code, and location may be an authval. }, { "data": "biblio.author", - "title": "Author", + "title": _("Author"), "searchable": true, "orderable": true, }, { "data": "collection_code", - "title": "Collection code", + "title": _("Collection"), "searchable": true, "orderable": true, }, { "data": "item_type", - "title": "Item Type", + "title": _("Item type"), "searchable": false, "orderable": true, }, { "data": "callnumber", - "title": "Callnumber", + "title": _("Callnumber"), "searchable": true, "orderable": true, }, { "data": "external_id", - "title": "Barcode", + "title": _("Barcode"), "searchable": true, "orderable": true, }, { "data": "lost_status:last_seen_date:return_claim.patron", - "title": "Status", + "title": _("Status"), "searchable": false, "orderable": true, "render": function(data, type, row, meta) { @@ -1720,7 +1720,7 @@ Note that permanent location is a code, and location may be an authval. var result = '\n'; return result; }, - "title": "Actions", + "title": _("Actions"), "searchable": false, "orderable": false, "class": "noExport" @@ -1776,7 +1776,7 @@ Note that permanent location is a code, and location may be an authval. /* Report the results */ posting.done(function(data) { var barcode = $('#external_id').val(); - $('#addResult').replaceWith('
Success: Added '+barcode+'
'); + $('#addResult').replaceWith('
'+_("Success: Added '%s'").format(barcode)+'
'); $('#external_id').val('').focus(); bundle_changed = 1; }); @@ -1785,12 +1785,12 @@ Note that permanent location is a code, and location may be an authval. if ( data.status === 409 ) { var response = data.responseJSON; if ( response.key === "PRIMARY" ) { - $('#addResult').replaceWith('
Warning: Item '+barcode+' already attached
'); + $('#addResult').replaceWith('
'+_("Warning: Item '%s' aready attached").format(barcode)+'
'); } else { - $('#addResult').replaceWith('
Failure: Item '+barcode+' belongs to another bundle
'); + $('#addResult').replaceWith('
'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'
'); } } else { - $('#addResult').replaceWith('
Failure: Check the logs for details
'); + $('#addResult').replaceWith('
'+_("Failure: Check the logs for details")+'
'); } $('#external_id').val('').focus(); }); @@ -1843,7 +1843,7 @@ Note that permanent location is a code, and location may be an authval. /* Report the results */ deleteReq.done(function(data) { var barcode = $('#rm_external_id').val(); - $('#removeResult').replaceWith('
'+_("Success: Removed ")+barcode+'
'); + $('#removeResult').replaceWith('
'+_("Success: Removed '%s'").format(barcode)+'
'); $('#rm_external_id').val('').focus(); bundle_changed = 1; }); @@ -1852,21 +1852,21 @@ Note that permanent location is a code, and location may be an authval. if ( data.status === 409 ) { var response = data.responseJSON; if ( response.key === "PRIMARY" ) { - $('#removeResult').replaceWith('
Warning: Item '+barcode+' already attached
'); + $('#removeResult').replaceWith('
'+_("Warning: Item '%s' already attached").format(barcode)+'
'); } else { - $('#removeResult').replaceWith('
Failure: Item '+barcode+' belongs to another bundle
'); + $('#removeResult').replaceWith('
'+_("Failure: Item '%s' belongs to another bundle").format(barcode)+'
'); } } else { - $('#removeResult').replaceWith('
Failure: Check the logs for details
'); + $('#removeResult').replaceWith('
'+_("Failure: Check the logs for details")+'
'); } $('#rm_external_id').val('').focus(); }); } else { - $('#removeResult').replaceWith('
'+_("Failed: Barcode matched more than one item ")+barcode+'
'); + $('#removeResult').replaceWith('
'+_("Failed: Barcode matched more than one item '%s'").format(barcode)+'
'); } }); itemReq.fail(function(data) { - $('#removeResult').replaceWith('
'+_("Failed: Item not found ")+barcode+'
'); + $('#removeResult').replaceWith('
'+_("Failed: Item not found '%s'").format(barcode)+'
'); $('#rm_external_id').val('').focus(); }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index d3fdc3291c..dd295153a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -436,12 +436,12 @@
- - - - + + + + [% IF !item.onloan %] - + [% END %] @@ -478,9 +478,9 @@ [% IF item.onloan %] -
[% t('Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost') | html %]
+
Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost
[% ELSE %] -
[% t('Optionally scan all barcodes of items found in the items bundle to perform an inventory check. If any items are missing, they will be marked as lost') | html %]
+
Optionally scan all barcodes of items found in the items bundle to perform an inventory check. If any items are missing, they will be marked as lost
[% END %] @@ -496,11 +496,11 @@ [% END %] [% IF item.onloan %] - + [% ELSE %] - + [% END %] - + -- 2.39.5
[% t('Title') | html %][% t('Author') | html %][% t('Item type') | html %][% t('Barcode') | html %]TitleAuthorItem typeBarcode[% t('Status') | html %]Status