From 2a621af36b7cffc8f3199803d6a893d00d08e218 Mon Sep 17 00:00:00 2001 From: jeremy breuillard Date: Mon, 25 Apr 2022 15:03:32 +0200 Subject: [PATCH] Bug 22490: Some strings in JavaScript files are untranslatable This patch updates the translation functions of the strings in Javascript files Test Plan: 1) Find a string in a popup or from a Javascript file who is still not translated or 1) Home > Administration > Authority types 2) Make sure to have at least one Authority type saved 3) Click on Action > Import 4) Import button without adding any file to trigger the popup 5) The string inside the popup appears without translation 6) Apply patch and repeat from 3) to 5) : now the string is translated --- .../lib/koha/cateditor/koha-backend.js | 6 ++--- .../lib/koha/cateditor/marc-editor.js | 2 +- .../prog/en/modules/circ/overdue.tt | 25 +++++++++++++++++++ koha-tmpl/intranet-tmpl/prog/js/authtype.js | 8 +++--- .../prog/js/background-job-progressbar.js | 2 +- koha-tmpl/intranet-tmpl/prog/js/calendar.js | 2 +- .../prog/js/item_search_fields.js | 2 +- koha-tmpl/intranet-tmpl/prog/js/letter.js | 2 +- .../intranet-tmpl/prog/js/pages/results.js | 6 ++--- .../prog/js/pages/tags-review.js | 2 +- .../prog/js/rotating-collections.js | 2 +- 11 files changed, 42 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js index eeca779440..5f7fdd9ec1 100644 --- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js +++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js @@ -121,7 +121,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin } }); } ).fail( function( data ) { - callback( { error: _('Could not fetch frameworkcode for record') } ); + callback( { error: __('Could not fetch frameworkcode for record') } ); } ); } ); }, @@ -143,7 +143,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin } callback( record ); } ).fail( function( data ) { - callback( { error: _('Could not save record') } ); + callback( { error: __('Could not save record') } ); } ); }, @@ -164,7 +164,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin } callback( record ); } ).fail( function( data ) { - callback( { error: _('Could not save record') } ); + callback( { error: __('Could not save record') } ); } ); }, diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js index 6d90176e0a..7392e659ad 100644 --- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js +++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js @@ -691,7 +691,7 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], false, function ( error ) { if ( typeof error !== 'undefined' ) { - humanMsg.displayAlert( _(error), { className: 'humanError' } ); + humanMsg.displayAlert( __(error), { className: 'humanError' } ); } } ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index 34df3aedec..8d604b2746 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE AuthorisedValues %] [% USE KohaDates %] +[% USE Koha %] [%- USE Branches -%] [%- USE Price -%] [%- USE ItemTypes -%] @@ -9,6 +10,7 @@ [%- USE TablesSettings -%] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] +[% PROCESS 'modal-claims.inc' %] Items overdue as of [% todaysdate | html %] › Circulation › Koha [% INCLUDE 'doc-head-close.inc' %] [% FILTER collapse %] @@ -92,6 +94,9 @@ Item type Price Non-public note + [% IF ( overdueloo.return_claim_id != 0 ) %] + Return claims + [% END %] [%- BLOCK subject -%]Overdue:[%- END -%] @@ -117,12 +122,30 @@ [% ItemTypes.GetDescription( overdueloo.itemtype ) | html %] [% overdueloo.replacementprice | $Price %] [% overdueloo.itemnotes_nonpublic | html %] + [% IF ( overdueloo.return_claim_id != 0 ) %] + + [% IF ( overdueloo.return_claim_created_on ) %] + [% overdueloo.return_claim_created_on | html %] + [% ELSIF Koha.Preference('ClaimReturnedLostValue') %] + + Claim returned + + [% ELSE %] + + Claim returned + + [% END %] + + [% END %] [% END %] + + [% PROCESS 'modal-claims-display' %] + [% ELSE %]

Overdue report

@@ -266,6 +289,8 @@ [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] [% INCLUDE 'select2.inc' %] + [% INCLUDE 'js-date-format.inc' %] + [% PROCESS 'modal-claims-js' %]