Bug 29831 - Fix incorrect use of _() in .js files
Summary: Fix incorrect use of _() in .js files
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-09 11:14 UTC by Katrin Fischer
Modified: 2022-01-09 11:17 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-01-09 11:14:46 UTC
We need to make sure that we are using __() in .js files, instead of the _() from .tt files.

From bug 29688 comment 2:

background-job-progressbar.js:                humanMsg.displayMsg( '<p>' + _('Import of record(s) failed: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
calendar.js:                is_date_after: _("Validation error to be shown, i.e. End date must come after start date")
checkouts.js:        $(selected_option).text(_("%s (current status)").format($(selected_option).text()));
datatables.js:                        var search_title = _("%s search").format(title);
holds.js:            _("This pickup location is not allowed according to circulation rules") +
letter.js:        $(sms_counter).html(length + "/" + sms_limit + _(" characters"));
onboarding.js:function _(s) { return s; } // dummy function for gettext
pages/results.js:                            div.find(".hint").html(_("Coce image from Amazon.com"));
pages/results.js:                            div.find(".hint").html(_("Coce image from Google Books"));
pages/results.js:                            div.find(".hint").html(_("Coce image from Open Library"));
pages/tags-review.js:    // window.alert(_("AJAX approved tag: ") + tag);
pages/tags-review.js:    // window.alert(_("AJAX rejected tag: ") + tag);
pages/tags-review.js:    $('#test_button').html("<i class='fa fa-check-square-o' aria-hidden='true'></i>" +_(" Test"));
pages/tags-review.js:        // window.alert(_("Click detected on ") + event.target + ": " + $(event.target).html);
rotating-collections.js:        if(confirm(_("Are you sure you want to delete this rotating collection?"))){
xmlControlfield.js:                alert(_("AJAX error: receiving data from %s").format(settings.url));