Bug 36095 - Improve translation of title tags: OPAC part 2
Summary: Improve translation of title tags: OPAC part 2
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: RM_priority
Depends on: 33907
Blocks: 33906
  Show dependency treegraph
 
Reported: 2024-02-14 16:53 UTC by Owen Leonard
Modified: 2025-05-15 07:18 UTC (History)
4 users (show)

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


Attachments
Bug 36095: Improve translation of title tags: OPAC part 2 (28.67 KB, patch)
2025-03-04 18:32 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36095: Improve translation of title tags: OPAC part 2 (28.76 KB, patch)
2025-04-07 11:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36095: Improve translation of title tags: OPAC part 2 (28.77 KB, patch)
2025-05-08 23:35 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-02-14 16:53:23 UTC
This patch will modify more OPAC templates so that translatable strings in the <title> tag are wrapped in the correct translation function, e.g. [% t('Translate me') %]
Comment 1 Owen Leonard 2025-03-04 18:32:12 UTC
Created attachment 178933 [details] [review]
Bug 36095: Improve translation of title tags: OPAC part 2

This patch updates a batch of OPAC templates so that title tags can
be more easily translated.

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

- Check the OPAC main page
- Follow the "Libraries" link
  - Check one of the individual library pages
- From the OPAC main page, view the RSS feed for OPAC news (requires at
  least one news item be added via Tools -> News -> New entry).
- Search the catalog and view the detail page for one of the results.
- View the IDREF page, e.g.
  http://localhost:8080/cgi-bin/koha/opac-idref.pl?unimarc3=032581270
- With OverDrive configured and enabled, perform a catalog search.
  - Follow the "Found X results in the library's OverDrive credentials"
    link to view OverDrive search results.
- These pages normally aren't accessed directly but they are modified:
  Download cart, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=5302/4893/4594
  Download shelf, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X
  Checkout  note, e.g. http://localhost:8080/cgi-bin/koha/opac-issue-note.pl?issue_id=X
- In the staff client, add a local cover image to a bibliographic record
  (requires the OPACLocalCoverImages system preference be enabled).
  - View the detail page for that record in the OPAC.
    - Under the images tab, right-click the image thumbnail and open in
      a new tab.
- Search the catalog for a record with a subscription and view the
  detail page. Under the "Subscriptions" page, click "More details,"
  then the "Full history" tab.
- In the staff client, go to Tools -> Pages and create a page for the
  OPAC. View that page.
- Log in to the OPAC. From your "Summary" page,
  - View the curbside pickups page (requires the CurbsidePickup
    preference be enabled)
  - View the "Ask for discharge" page (requires the useDischarge
    preference be enabled)
  - View the holds history page (requires the OPACHoldsHistory
    preference be enabled)
  - View the ILL requests page (requires the ILLModule preference be
    enabled
  - View the "Personal details" page.
  - View the messaging page (requires the
    EnhancedMessagingPreferencesOPAC preference be enabled)
  - From the "Summary" page, under the "Checked out" tab, click the "Add
    note" for one of the checkouts (requires the AllowCheckoutNotes
    preference be enabled).
    - After adding a note
  - View the "Personal details" page and submit an edit (requires
    the OPACPatronDetails preference be enabled). Check the confirmation
    page.

Sponsored-by: Athens County Public Libraries
Comment 2 Felicie 2025-04-03 13:27:14 UTC
There's a conflict on the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt file
Comment 3 Owen Leonard 2025-04-07 11:44:03 UTC
Created attachment 180690 [details] [review]
Bug 36095: Improve translation of title tags: OPAC part 2

This patch updates a batch of OPAC templates so that title tags can
be more easily translated.

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

- Check the OPAC main page
- Follow the "Libraries" link
  - Check one of the individual library pages
- From the OPAC main page, view the RSS feed for OPAC news (requires at
  least one news item be added via Tools -> News -> New entry).
- Search the catalog and view the detail page for one of the results.
- View the IDREF page, e.g.
  http://localhost:8080/cgi-bin/koha/opac-idref.pl?unimarc3=032581270
- With OverDrive configured and enabled, perform a catalog search.
  - Follow the "Found X results in the library's OverDrive credentials"
    link to view OverDrive search results.
- These pages normally aren't accessed directly but they are modified:
  Download cart, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=5302/4893/4594
  Download shelf, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X
  Checkout  note, e.g. http://localhost:8080/cgi-bin/koha/opac-issue-note.pl?issue_id=X
- In the staff client, add a local cover image to a bibliographic record
  (requires the OPACLocalCoverImages system preference be enabled).
  - View the detail page for that record in the OPAC.
    - Under the images tab, right-click the image thumbnail and open in
      a new tab.
- Search the catalog for a record with a subscription and view the
  detail page. Under the "Subscriptions" page, click "More details,"
  then the "Full history" tab.
- In the staff client, go to Tools -> Pages and create a page for the
  OPAC. View that page.
- Log in to the OPAC. From your "Summary" page,
  - View the curbside pickups page (requires the CurbsidePickup
    preference be enabled)
  - View the "Ask for discharge" page (requires the useDischarge
    preference be enabled)
  - View the holds history page (requires the OPACHoldsHistory
    preference be enabled)
  - View the ILL requests page (requires the ILLModule preference be
    enabled
  - View the "Personal details" page.
  - View the messaging page (requires the
    EnhancedMessagingPreferencesOPAC preference be enabled)
  - From the "Summary" page, under the "Checked out" tab, click the "Add
    note" for one of the checkouts (requires the AllowCheckoutNotes
    preference be enabled).
    - After adding a note
  - View the "Personal details" page and submit an edit (requires
    the OPACPatronDetails preference be enabled). Check the confirmation
    page.

Sponsored-by: Athens County Public Libraries
Comment 4 Brendan Gallagher 2025-04-14 21:26:02 UTC
Getting some conflicts on the qa scripts (could always be me and my set up :) )
Comment 5 Owen Leonard 2025-04-15 12:19:08 UTC
It's working for me. What is the error?
Comment 6 David Nind 2025-05-08 23:35:03 UTC
Created attachment 182133 [details] [review]
Bug 36095: Improve translation of title tags: OPAC part 2

This patch updates a batch of OPAC templates so that title tags can
be more easily translated.

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

- Check the OPAC main page
- Follow the "Libraries" link
  - Check one of the individual library pages
- From the OPAC main page, view the RSS feed for OPAC news (requires at
  least one news item be added via Tools -> News -> New entry).
- Search the catalog and view the detail page for one of the results.
- View the IDREF page, e.g.
  http://localhost:8080/cgi-bin/koha/opac-idref.pl?unimarc3=032581270
- With OverDrive configured and enabled, perform a catalog search.
  - Follow the "Found X results in the library's OverDrive credentials"
    link to view OverDrive search results.
- These pages normally aren't accessed directly but they are modified:
  Download cart, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadcart.pl?bib_list=5302/4893/4594
  Download shelf, e.g. http://localhost:8080/cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X
  Checkout  note, e.g. http://localhost:8080/cgi-bin/koha/opac-issue-note.pl?issue_id=X
- In the staff client, add a local cover image to a bibliographic record
  (requires the OPACLocalCoverImages system preference be enabled).
  - View the detail page for that record in the OPAC.
    - Under the images tab, right-click the image thumbnail and open in
      a new tab.
- Search the catalog for a record with a subscription and view the
  detail page. Under the "Subscriptions" page, click "More details,"
  then the "Full history" tab.
- In the staff client, go to Tools -> Pages and create a page for the
  OPAC. View that page.
- Log in to the OPAC. From your "Summary" page,
  - View the curbside pickups page (requires the CurbsidePickup
    preference be enabled)
  - View the "Ask for discharge" page (requires the useDischarge
    preference be enabled)
  - View the holds history page (requires the OPACHoldsHistory
    preference be enabled)
  - View the ILL requests page (requires the ILLModule preference be
    enabled
  - View the "Personal details" page.
  - View the messaging page (requires the
    EnhancedMessagingPreferencesOPAC preference be enabled)
  - From the "Summary" page, under the "Checked out" tab, click the "Add
    note" for one of the checkouts (requires the AllowCheckoutNotes
    preference be enabled).
    - After adding a note
  - View the "Personal details" page and submit an edit (requires
    the OPACPatronDetails preference be enabled). Check the confirmation
    page.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2025-05-08 23:39:07 UTC
Testing notes (using KTD):
1. Everything looks OK, but I didn't install another language and check that the strings are available for translation.
2. I ran the qa script - everything says OK, but there were some "Argument "" isn't numeric..." messages.
3. I had a quick look at the patch, but I'm not sure exactly what I'm looking for 8-)


qa
testing 1 commit(s) (applied to a2f190f '1f Bug 38356: (follow-up) Add code bl')

Processing files before patches
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 501.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 506.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 509.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt line 333.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt line 19.
|========================>| 19 / 19 (100.00%)
Processing files after patches
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 508.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 513.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt line 516.
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt line 343.
|========================>| 19 / 19 (100.00%)

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-issue-note.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-library.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry-update-submitted.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-news-rss.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-overdrive-search.tt

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-page.tt


Processing additional checks OK!