From bae6560a26d207049b93c289216643fb4ed10919 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 18 Sep 2023 14:09:48 +0000 Subject: [PATCH] Bug 33907: Improve translation of title tags: OPAC part 1 This patch updates a batch of OPAC templates so that title tags can be more easily translated. Some templates have been updated for consistency as well: Harmonizing page title, breaddrumb navigation, and page headers. To test, apply the patch and confirm that the following pages have correct title tags: - Log in to the OPAC by navigating directly to a user page like /cgi-bin/koha/opac-user.pl - From your user summary page, click "Charges." - Check the advanced search page. - Search for a bibliographic record and view the details, and then click "MARC view" and "ISBD view." - From this page click "Save to your lists" and check the title in the popup window." - Still on a detail page, click "Add to your cart." Open the cart and check that page. - Go to authority search (must have OpacAuthorities enabled). - Perform an authority search which will return results. - View the detail page for one of the results, and check the MARC view as well. - With UseCourseReserves enabled, view the course reserves page, then the course reserve detail page. - Search for a subscription which has patron notification enabled. - View the detail page, then open the "Subscriptions" tab. Click "More details." - On this page you should see a "Subscribe to email notification" button. Click it to open the subscription page. - Check both /cgi-bin/koha/opac-browse.pl and /cgi-bin/koha/opac-browser.pl. Whether or not the features are enabled you should be able to check the title. - Check /cgi-bin/koha/ilsdi.pl as well as one or more views linked to on that page. - Navigate to a page in the OPAC which doesn't exist to test the error page template. - Go to Administration -> System preferences and enable the OpacMaintenance preference. - Go to the OPAC and check the system maintenance page. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- .../bootstrap/en/includes/html_helpers.inc | 8 +++++ .../bootstrap/en/modules/errors/errorpage.tt | 7 +++- .../opac-tmpl/bootstrap/en/modules/ilsdi.tt | 35 ++++++++++--------- .../bootstrap/en/modules/maintenance.tt | 7 +++- .../bootstrap/en/modules/opac-ISBDdetail.tt | 9 +++-- .../bootstrap/en/modules/opac-MARCdetail.tt | 7 +++- .../bootstrap/en/modules/opac-account.tt | 9 +++-- .../en/modules/opac-addbybiblionumber.tt | 8 ++++- .../bootstrap/en/modules/opac-advsearch.tt | 7 +++- .../en/modules/opac-alert-subscribe.tt | 12 ++++++- .../en/modules/opac-auth-MARCdetail.tt | 16 +++++++-- .../bootstrap/en/modules/opac-auth-detail.tt | 11 +++++- .../bootstrap/en/modules/opac-auth.tt | 23 +++++++----- .../en/modules/opac-authorities-home.tt | 7 +++- .../opac-authoritiessearchresultlist.tt | 8 ++++- .../bootstrap/en/modules/opac-basket.tt | 7 +++- .../bootstrap/en/modules/opac-blocked.tt | 18 +++++----- .../bootstrap/en/modules/opac-browse.tt | 9 +++-- .../bootstrap/en/modules/opac-browser.tt | 7 +++- .../en/modules/opac-course-details.tt | 10 ++++-- .../en/modules/opac-course-reserves.tt | 9 +++-- opac/opac-authoritiesdetail.pl | 2 ++ 22 files changed, 175 insertions(+), 61 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc index f6e3f07123..3be0de52fb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc @@ -168,3 +168,11 @@ [% END %] [% END %] + +[% BLOCK library_name_title %] + [% IF ( LibraryNameTitle ) %] + [% tx("{library} catalog", { library = LibraryNameTitle }) | html %] + [% ELSE %] + [% t("Koha online catalog") | html %] + [% END %] +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt index 6dbf3f4df5..e0c06070e1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/errors/errorpage.tt @@ -1,9 +1,14 @@ [% USE raw %] [% USE AdditionalContents %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] -An error has occurred › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% t("An error has occurred") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt index 3fc3bb45ff..1336393738 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt @@ -1,38 +1,39 @@ [% USE raw %] [% USE Koha %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] - +<title>[% FILTER collapse %] [% IF ( GetAvailability ) %] - ILS-DI › GetAvailability + [% t("GetAvailability") | html %] › [% ELSIF ( GetRecords ) %] - ILS-DI › GetRecords + [% t("GetRecords") | html %] › [% ELSIF ( GetAuthorityRecords ) %] - ILS-DI › GetAuthorityRecords + [% t("GetAuthorityRecords") | html %] › [% ELSIF ( LookupPatron ) %] - ILS-DI › LookupPatron + [% t("LookupPatron") | html %] › [% ELSIF ( AuthenticatePatron ) %] - ILS-DI › AuthenticatePatron + [% t("AuthenticatePatron") | html %] › [% ELSIF ( GetPatronInfo ) %] - ILS-DI › GetPatronInfo + [% t("GetPatronInfo") | html %] › [% ELSIF ( GetPatronStatus ) %] - ILS-DI › GetPatronStatus + [% t("GetPatronStatus") | html %] › [% ELSIF ( GetServices ) %] - ILS-DI › GetServices + [% t("GetServices") | html %] › [% ELSIF ( RenewLoan ) %] - ILS-DI › RenewLoan + [% t("RenewLoan") | html %] › [% ELSIF ( HoldTitle ) %] - ILS-DI › HoldTitle + [% t("HoldTitle") | html %] › [% ELSIF ( HoldItem ) %] - ILS-DI › HoldItem + [% t("HoldItem") | html %] › [% ELSIF ( CancelHold ) %] - ILS-DI › CancelHold - [% ELSE %] - ILS-DI + [% t("CancelHold") | html %] › [% END %] - › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog - + [% t("ILS-DI") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt index e98ce78334..a4324618b7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt @@ -1,12 +1,17 @@ [% USE raw %] [% USE Koha %] [% USE AdditionalContents %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% INCLUDE 'doc-head-open.inc' %] [% SET OpacHeader = AdditionalContents.get( location => "opacheader", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacMaintenanceNotice = AdditionalContents.get( location => "OpacMaintenanceNotice", lang => lang, library => branchcode || default_branch ) %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] [% SET opaclanguagedisplay = Koha.Preference('opaclanguagedisplay') %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% t("System maintenance") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-blocked.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-blocked.tt index c942a6f2c4..906ebeb7d5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-blocked.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-blocked.tt @@ -1,15 +1,13 @@ [% USE raw %] [% USE AdditionalContents %] [% SET OpacSuppressionMessage = AdditionalContents.get( location => "OpacSuppressionMessage", lang => lang, library => branchcode || default_branch ) %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% INCLUDE 'doc-head-open.inc' %] - - Record blocked › - [% IF ( LibraryNameTitle ) %] - [% LibraryNameTitle | html %] - [% ELSE %] - Koha online - [% END %] catalog - +[% FILTER collapse %] + [% t("Record blocked") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] @@ -18,7 +16,7 @@
[% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Blocked record + Record blocked [% END %] [% END #/ WRAPPER breadcrumbs %] @@ -26,7 +24,7 @@
-

Blocked

+

Record blocked

You are not authorized to view this record.

[% IF ( OpacSuppressionMessage ) %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt index ea6f0364e6..92b05ac446 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt @@ -1,11 +1,16 @@ +[% USE raw %] [% USE Koha %] [% USE Asset %] -[% USE raw %] [% USE AdditionalContents %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] -Browse our catalog › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% t("Browse search") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt index 37dc42dac5..c0077a4770 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browser.tt @@ -1,10 +1,15 @@ [% USE raw %] [% USE Koha %] [% USE AdditionalContents %] +[% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] -Browse our catalog › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% t("Browse our catalog") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index d9e2e1da1c..3839893eb4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -7,8 +7,12 @@ [% USE Branches %] [% USE TablesSettings %] [% PROCESS 'i18n.inc' %] +[% PROCESS 'html_helpers.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Course reserves for [% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% tx("Course reserves for '{course_name}'", { course_name = course.course_name }) | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] @@ -22,7 +26,7 @@ Course reserves [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Course reserves for  [% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%] + [% tx("Course reserves for '{course_name}'", { course_name = course.course_name }) | html %] [% END %] [% END #/ WRAPPER breadcrumbs %] @@ -31,7 +35,7 @@
-

Course reserves for [% course.course_name | html %][%- IF course.section -%] - [% course.section | html %][%- END -%]

+

[% tx("Course reserves for '{course_name}'", { course_name = course.course_name }) | html %]

    [% IF ( course.term ) %]
  1. [% tp('Semester', 'Term:') | html %] [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]
  2. [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt index f35e422dd1..806bd93292 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt @@ -4,9 +4,12 @@ [% USE AuthorisedValues %] [% USE TablesSettings %] [% PROCESS 'i18n.inc' %] - +[% PROCESS 'html_helpers.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Courses › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog +[% FILTER collapse %] + [% t("Course reserves") | html %] › + [% PROCESS 'library_name_title' %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] @@ -25,7 +28,7 @@
    -

    Courses

    +

    Courses reserves

    diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl index c8993d1f01..2d271c1f86 100755 --- a/opac/opac-authoritiesdetail.pl +++ b/opac/opac-authoritiesdetail.pl @@ -167,6 +167,8 @@ if ($show_marc) { } } $template->param( "Tab0XX" => \@loop_data ); + my $summary = BuildSummary( $record, $authid, $authtypecode ); + $template->param( summary => $summary ); } else { my $AuthorityXSLTOpacDetailsDisplay = C4::Context->preference('AuthorityXSLTOpacDetailsDisplay'); if ($AuthorityXSLTOpacDetailsDisplay) { -- 2.39.5
    Courses