Bug 29688 - Incorrect use of _() in holds.js
Summary: Incorrect use of _() in holds.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 29404
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-13 13:39 UTC by Tomás Cohen Arazi
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.02


Attachments
Bug 29688: Incorrect use of _() in holds.js (1.19 KB, patch)
2021-12-13 13:42 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29688: Incorrect use of _() in holds.js (1.24 KB, patch)
2022-01-09 11:16 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2021-12-13 13:39:35 UTC

    
Comment 1 Tomás Cohen Arazi 2021-12-13 13:42:00 UTC
Created attachment 128463 [details] [review]
Bug 29688: Incorrect use of _() in holds.js

Bug 29404 moved code from request.tt into holds.js, and I didn't know
about the _() vs. __().

This patch fixes that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2021-12-14 09:21:17 UTC
Shouldn't we fix all the existing occurrences?

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));
Comment 3 Katrin Fischer 2022-01-09 11:15:18 UTC
I've split the other appearances Joubu found into a separate bug 29831 so this can be pushed before string freeze.
Comment 4 Katrin Fischer 2022-01-09 11:16:51 UTC
Created attachment 129234 [details] [review]
Bug 29688: Incorrect use of _() in holds.js

Bug 29404 moved code from request.tt into holds.js, and I didn't know
about the _() vs. __().

This patch fixes that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2022-01-09 11:17:23 UTC
Moving directly to PQA.
Comment 6 Fridolin Somers 2022-01-11 22:51:44 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-01-14 14:05:07 UTC
Pushed to 21.11.x for 21.11.02
Comment 8 Andrew Fuerste-Henry 2022-01-21 18:02:30 UTC
Missing dependency, not backported to 21.05