Bug 33913 - Improve translation of title tags: Circulation, holds, and ILL
Summary: Improve translation of title tags: Circulation, holds, and ILL
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 33906
  Show dependency treegraph
 
Reported: 2023-06-06 15:55 UTC by Owen Leonard
Modified: 2023-09-19 12:17 UTC (History)
3 users (show)

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


Attachments
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL (24.46 KB, patch)
2023-06-07 15:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL (24.41 KB, patch)
2023-06-07 15:53 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL (23.51 KB, patch)
2023-06-13 14:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL (23.56 KB, patch)
2023-08-18 19:14 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL (23.62 KB, patch)
2023-08-24 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33913: (QA follow-up) Move variables into strings (4.84 KB, patch)
2023-08-24 21:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33913: (QA follow-up) Move variables into strings (4.89 KB, patch)
2023-08-25 10:47 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-06-06 15:55:41 UTC
This patch will modify catalog, holds, and ILL templates in the staff client so that translatable strings in the <title> tag are wrapped in the correct translation function, e.g. [% t('Translate me') %]
Comment 1 Owen Leonard 2023-06-07 15:53:15 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2023-06-07 15:53:53 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2023-06-13 14:58:30 UTC
Created attachment 152305 [details] [review]
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL

This patch updates circulation, holds, and ILL templates so that title
tags can be more easily translated.

To test, apply the patch and confirm that the following pages have the
correct title tags:

 - Circulation -> Article requests
 - Catalog -> Bibliographic record -> Items -> View item's checkout history
 - Circulation -> Overdues with fines
 - Circulation -> Transfers
 - Circulation -> Checkout notes
 - Circulation -> Circulation home
 - Circulation -> Check out
 - Circulation -> Batch checkouts
 - Circulation -> Curbside pickups
 - Circulation -> On-site checkouts
 - Circulation -> Overdues
 - Circulation -> Holds to pull
 - Circulation -> Checkout to patron -> Print slip
 - Circulation -> Renew
 - Catalog -> Bibliographic record -> Request article
 - Circulation -> Hold ratios
 - Circulation -> Check in
 - Circulation -> Set library
 - Circulation -> Transfers to receive
 - Circulation -> Transfers to send
 - Circulation -> Holds queue
 - Circulation -> Holds awaiting pickup
 - ILL requests
 - Catalog -> Bibliographic record -> Holds
Comment 4 Phil Ringnalda 2023-08-18 19:14:28 UTC
Created attachment 154670 [details] [review]
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL

This patch updates circulation, holds, and ILL templates so that title
tags can be more easily translated.

To test, apply the patch and confirm that the following pages have the
correct title tags:

 - Circulation -> Article requests
 - Catalog -> Bibliographic record -> Items -> View item's checkout history
 - Circulation -> Overdues with fines
 - Circulation -> Transfers
 - Circulation -> Checkout notes
 - Circulation -> Circulation home
 - Circulation -> Check out
 - Circulation -> Batch checkouts
 - Circulation -> Curbside pickups
 - Circulation -> On-site checkouts
 - Circulation -> Overdues
 - Circulation -> Holds to pull
 - Circulation -> Checkout to patron -> Print slip
 - Circulation -> Renew
 - Catalog -> Bibliographic record -> Request article
 - Circulation -> Hold ratios
 - Circulation -> Check in
 - Circulation -> Set library
 - Circulation -> Transfers to receive
 - Circulation -> Transfers to send
 - Circulation -> Holds queue
 - Circulation -> Holds awaiting pickup
 - ILL requests
 - Catalog -> Bibliographic record -> Holds

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 5 Katrin Fischer 2023-08-24 20:25:42 UTC
Overall this is a nice improvement, but there are a few where we lose context:

Now:
%s Batch check out to %s &rsaquo; %s Circulation &rsaquo; Koha␠

%1$s: IF patron
%2$s: INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1
%3$s: END 

The second %s can be moved if needed, the hints make it clear that it's a patron's name.

New:
Batch check out to

There will no longer be a clue, that this string is followed by a name and you will no longer be able to move the placeholder as it might be required for correct grammar.

There are a few more of these:

+        [% t("Checking out to") | html %] [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %] &rsaquo;

+ [% t("Batch check out to") | html %] [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %] &rsaquo;

+    [% t("Items overdue as of") | html %] [% todaysdate | $KohaDates %] &rsaquo;
Comment 6 Katrin Fischer 2023-08-24 20:26:44 UTC
Also:

[% t("Place a hold on") | html %] [% INCLUDE 'biblio-title-head.inc' %] &rsaquo;
Comment 7 Katrin Fischer 2023-08-24 21:01:23 UTC
Created attachment 154752 [details] [review]
Bug 33913: Improve translation of title tags: Circulation, holds, and ILL

This patch updates circulation, holds, and ILL templates so that title
tags can be more easily translated.

To test, apply the patch and confirm that the following pages have the
correct title tags:

 - Circulation -> Article requests
 - Catalog -> Bibliographic record -> Items -> View item's checkout history
 - Circulation -> Overdues with fines
 - Circulation -> Transfers
 - Circulation -> Checkout notes
 - Circulation -> Circulation home
 - Circulation -> Check out
 - Circulation -> Batch checkouts
 - Circulation -> Curbside pickups
 - Circulation -> On-site checkouts
 - Circulation -> Overdues
 - Circulation -> Holds to pull
 - Circulation -> Checkout to patron -> Print slip
 - Circulation -> Renew
 - Catalog -> Bibliographic record -> Request article
 - Circulation -> Hold ratios
 - Circulation -> Check in
 - Circulation -> Set library
 - Circulation -> Transfers to receive
 - Circulation -> Transfers to send
 - Circulation -> Holds queue
 - Circulation -> Holds awaiting pickup
 - ILL requests
 - Catalog -> Bibliographic record -> Holds

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2023-08-24 21:01:27 UTC
Created attachment 154753 [details] [review]
Bug 33913: (QA follow-up) Move variables into strings

To test:

1) Checking out to {patron}
* Search for any patron
* Click on cardnumber in patron search results
* Verify that page title reads correctly and includes patron's name

2) Batch check out to {patron}
* Activate BatchCheckouts system preference
* Check all patron categories for BatchCheckoutsValidCategories
* Go to any patron account
* Click on batch checkout tab
* Verify that the page title reads correctly and includes patron's name

3) Place a hold on {title}
* Search for a record with items in the staff interface catalog
* Click on 'place holds'
* Verify that the page title reads correctly and includes the title of the record

4) Overdues as of {date}
* Set DateFormat system preference to any other than default
* Go to circulation > overdues
* Verify the page title includes today's date in the correct format

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2023-08-24 21:02:28 UTC
Owen or Caroline - could you maybe double-check my last patch?
Comment 10 Owen Leonard 2023-08-25 10:47:04 UTC
Created attachment 154800 [details] [review]
Bug 33913: (QA follow-up) Move variables into strings

To test:

1) Checking out to {patron}
* Search for any patron
* Click on cardnumber in patron search results
* Verify that page title reads correctly and includes patron's name

2) Batch check out to {patron}
* Activate BatchCheckouts system preference
* Check all patron categories for BatchCheckoutsValidCategories
* Go to any patron account
* Click on batch checkout tab
* Verify that the page title reads correctly and includes patron's name

3) Place a hold on {title}
* Search for a record with items in the staff interface catalog
* Click on 'place holds'
* Verify that the page title reads correctly and includes the title of the record

4) Overdues as of {date}
* Set DateFormat system preference to any other than default
* Go to circulation > overdues
* Verify the page title includes today's date in the correct format

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Katrin Fischer 2023-08-25 11:01:12 UTC
Thx, Owen!
Comment 12 Tomás Cohen Arazi 2023-08-29 17:58:00 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 13 Fridolin Somers 2023-08-30 07:16:20 UTC
I choose to not backport to stable to avoid too much translation work