Bug 35475 - Untranslatable strings in booking modal and JS
Summary: Untranslatable strings in booking modal and JS
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 29002
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-04 11:13 UTC by Katrin Fischer
Modified: 2024-02-02 16:20 UTC (History)
5 users (show)

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


Attachments
Bug 35475: Makes strings in booking JS file translatable (6.84 KB, patch)
2023-12-10 17:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35475: Makes strings in booking JS file translatable (6.84 KB, patch)
2023-12-23 16:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35475: Improve concatenated string and fix error in JS file (1.75 KB, patch)
2023-12-23 16:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 35475: Makes strings in booking JS file translatable (6.92 KB, patch)
2024-01-11 08:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35475: Improve concatenated string and fix error in JS file (1.83 KB, patch)
2024-01-11 08:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35475: Makes strings in booking JS file translatable (6.98 KB, patch)
2024-01-11 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35475: Improve concatenated string and fix error in JS file (1.89 KB, patch)
2024-01-11 14:18 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-12-04 11:13:10 UTC
When booking an item there is an untranslatable string in the modal:

"Search for a patron"

The calendar was also behaving a little oddly requiring a double click to take the date (just leaving the note here to see if someone else sees that)
Comment 1 Katrin Fischer 2023-12-10 17:26:47 UTC
Created attachment 159704 [details] [review]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected
Comment 2 Jonathan Druart 2023-12-11 10:05:02 UTC
Inconsistent use of _() and __() in .js
Comment 3 Jonathan Druart 2023-12-11 10:08:33 UTC
Also I think that the following line

  content: _("Item") + " " + item.external_id,

should be replaced with

  content: _("Item %s").format(item.external_id),
Comment 4 Katrin Fischer 2023-12-23 16:22:04 UTC
Created attachment 160284 [details] [review]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected
Comment 5 Katrin Fischer 2023-12-23 16:22:07 UTC
Created attachment 160285 [details] [review]
Bug 35475: Improve concatenated string and fix error in JS file

Fixes 2 problems noted in comment#2 and comment#3 on the bug
report.
Comment 6 Jonathan Druart 2024-01-11 08:31:31 UTC
Created attachment 160812 [details] [review]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2024-01-11 08:31:33 UTC
Created attachment 160813 [details] [review]
Bug 35475: Improve concatenated string and fix error in JS file

Fixes 2 problems noted in comment#2 and comment#3 on the bug
report.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Martin Renvoize 2024-01-11 14:18:17 UTC
Created attachment 160848 [details] [review]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2024-01-11 14:18:20 UTC
Created attachment 160849 [details] [review]
Bug 35475: Improve concatenated string and fix error in JS file

Fixes 2 problems noted in comment#2 and comment#3 on the bug
report.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2024-01-11 14:19:21 UTC
Yup, I agree, all looking good here.
Comment 11 Katrin Fischer 2024-01-16 11:09:26 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 12 Fridolin Somers 2024-01-17 09:17:21 UTC
Pushed to 23.11.x for 23.11.02
Comment 13 Lucas Gass 2024-02-02 16:20:01 UTC
Missing 23.05.x dependencies, no backport.