@@ -, +, @@ - catalogue/detail.pl - circ/circulation.pl - tools/quotes.pl - tools/letter.pl strings are translated --- .../prog/en/includes/datatables.inc | 24 ---------- .../prog/en/modules/circ/circulation.tt | 1 - .../prog/en/modules/tools/quotes.tt | 18 +------- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 5 +- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 46 +++++++++---------- koha-tmpl/intranet-tmpl/prog/js/letter.js | 4 +- .../intranet-tmpl/prog/js/table_filters.js | 4 +- 7 files changed, 31 insertions(+), 71 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc @@ -2,28 +2,4 @@ [% USE Asset %] [% INCLUDE 'format_price.inc' %] [% Asset.js("lib/datatables/datatables.min.js") | $raw %] - [% Asset.js("js/datatables.js") | $raw %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1030,7 +1030,6 @@ var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]"; var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]"; var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]"; - var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning."); var interface = "[% interface | html %]"; var theme = "[% theme | html %]"; var borrowernumber = "[% patron.borrowernumber | html %]"; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -90,23 +90,7 @@ { "sWidth": "75%" }, { "sWidth": "11%" }, ], - "oLanguage" : { - "oPaginate": { - "sFirst": MSG_DT_FIRST, - "sLast": MSG_DT_LAST, - "sNext": MSG_DT_NEXT, - "sPrevious": MSG_DT_PREVIOUS, - }, - "sEmptyTable": MSG_DT_EMPTY_TABLE, - "sInfo": MSG_DT_INFO, - "sInfoEmpty": MSG_DT_INFO_EMPTY, - "sInfoFiltered": MSG_DT_INFO_FILTERED, - "sLengthMenu": MSG_DT_LENGTH_MENU, - "sLoadingRecords": MSG_DT_LOADING_RECORDS, - "sProcessing": MSG_DT_PROCESSING, - "sSearch": MSG_DT_SEARCH, - "sZeroRecords": MSG_DT_ZERO_RECORDS, - }, + "oLanguage": dataTablesDefaults.oLanguage, "fnPreDrawCallback": function(oSettings) { return true; }, --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -233,10 +233,11 @@ $(document).ready(function() { $('#issues-table').show(); $('#issues-table-actions').show(); + var msg_loading = __('Loading... you may continue scanning.'); issuesTable = KohaTable("issues-table", { "oLanguage": { - "sEmptyTable" : MSG_DT_LOADING_RECORDS, - "sProcessing": MSG_DT_LOADING_RECORDS, + "sEmptyTable" : msg_loading, + "sProcessing": msg_loading, }, "bAutoWidth": false, "dom": 'B<"clearfix">rt', --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ a/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -1,6 +1,5 @@ // These default options are for translation but can be used // for any other datatables settings -// MSG_DT_* variables comes from datatables.inc // To use it, write: // $("#table_id").dataTable($.extend(true, {}, dataTableDefaults, { // // other settings @@ -8,26 +7,26 @@ var dataTablesDefaults = { "oLanguage": { "oPaginate": { - "sFirst" : window.MSG_DT_FIRST || "First", - "sLast" : window.MSG_DT_LAST || "Last", - "sNext" : window.MSG_DT_NEXT || "Next", - "sPrevious" : window.MSG_DT_PREVIOUS || "Previous" + "sFirst" : __('First'), + "sLast" : __('Last'), + "sNext" : __('Next'), + "sPrevious" : __('Previous'), }, - "sEmptyTable" : window.MSG_DT_EMPTY_TABLE || "No data available in table", - "sInfo" : window.MSG_DT_INFO || "Showing _START_ to _END_ of _TOTAL_ entries", - "sInfoEmpty" : window.MSG_DT_INFO_EMPTY || "No entries to show", - "sInfoFiltered" : window.MSG_DT_INFO_FILTERED || "(filtered from _MAX_ total entries)", - "sLengthMenu" : window.MSG_DT_LENGTH_MENU || "Show _MENU_ entries", - "sLoadingRecords" : window.MSG_DT_LOADING_RECORDS || "Loading...", - "sProcessing" : window.MSG_DT_PROCESSING || "Processing...", - "sSearch" : window.MSG_DT_SEARCH || "Search:", - "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found", + "sEmptyTable" : __('No data available in table'), + "sInfo" : __('Showing _START_ to _END_ of _TOTAL_ entries'), + "sInfoEmpty" : __('No entries to show'), + "sInfoFiltered" : __('(filtered from _MAX_ total entries)'), + "sLengthMenu" : __('Show _MENU_ entries'), + "sLoadingRecords" : __('Loading...'), + "sProcessing" : __('Processing...'), + "sSearch" : __('Search:'), + "sZeroRecords" : __('No matching records found'), buttons: { - "copyTitle" : window.MSG_DT_COPY_TITLE || "Copy to clipboard", - "copyKeys" : window.MSG_DT_COPY_KEYS || "Press ctrl or + C to copy the table data
to your system clipboard.

To cancel, click this message or press escape.", + "copyTitle" : __('Copy to clipboard'), + "copyKeys" : __('Press ctrl or + C to copy the table data
to your system clipboard.

To cancel, click this message or press escape.'), "copySuccess": { - _: window.MSG_DT_COPY_SUCCESS_X || "Copied %d rows to clipboard", - 1: window.MSG_DT_COPY_SUCCESS_ONE || "Copied one row to clipboard" + _: __('Copied %d rows to clipboard'), + 1: __('Copied one row to clipboard'), } } }, @@ -35,9 +34,9 @@ var dataTablesDefaults = { "buttons": [{ fade: 100, className: "dt_button_clear_filter", - titleAttr: MSG_CLEAR_FILTER, + titleAttr: __('Clear filter'), enabled: false, - text: ' ' + MSG_CLEAR_FILTER + '', + text: ' ' + __('Clear filter') + '', available: function ( dt ) { // The "clear filter" button is made available if this test returns true if( dt.settings()[0].aanFeatures.f ){ // aanFeatures.f is null if there is no search form @@ -49,7 +48,7 @@ var dataTablesDefaults = { node.addClass("disabled"); } }], - "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, window.MSG_DT_ALL || "All"]], + "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, __('All')]], "iDisplayLength": 20, initComplete: function( settings) { var tableId = settings.nTable.id @@ -356,8 +355,9 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { * from a configuration file (in English, "a," "an," and "the") */ - if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){ - var articles = CONFIG_EXCLUDE_ARTICLES_FROM_SORT.split(" "); + var config_exclude_articles_from_sort = __('a an the'); + if (config_exclude_articles_from_sort){ + var articles = config_exclude_articles_from_sort.split(" "); var rpattern = ""; for(i=0;i\"\" "+ MSG_DT_LOADING_RECORDS +""; +var modal_loading = "
\"\" "+ __('Loading...') +"
"; var editing = 0; if( add_form == 1 && code !== '' ){ --- a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js +++ a/koha-tmpl/intranet-tmpl/prog/js/table_filters.js @@ -23,7 +23,7 @@ function activate_filters(id) { } $('#' + id + '_activate_filters') - .html(' ' + MSG_DEACTIVATE_FILTERS ) + .html(' ' + __('Deactivate filters') ) .unbind('click') .click(function() { deactivate_filters(id); @@ -41,7 +41,7 @@ function deactivate_filters(id) { filters_row.hide(); $('#' + id + '_activate_filters') - .html(' ' + MSG_ACTIVATE_FILTERS ) + .html(' ' + __('Activate filters') ) .unbind('click') .click(function() { activate_filters(id); --