From f418e53d4d08afd18301970d036366109c2aba32 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 29 Jan 2021 19:48:53 +0000 Subject: [PATCH] Bug 27581: Rename USeICU preference to UseICUStyleQuotes Rather thna have a poorly named preference with an explanation of how it doesn't do what it implies it does, let's rename it! To test: 1 - Set UseICU to 'Using' 2 - Go to the details page of a record in the staff interface 3 - Hover over a subject heading that has subfields 4 - Note the link has curly brackets around the subject, like: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:{Winnie-the-Pooh Fictitious character} 5 - Change UseICU to 'Not using' 6 - Note the link is now: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Winnie-the-Pooh Fictitious character" 7 - Repeat on OPAC 8 - Apply patch 9 - Restart all 10 - Repeat tests, the behaviour has not changed 11 - Read the new syspref description and confirm it makes sense Signed-off-by: Andrew Fuerste-Henry --- C4/UsageStats.pm | 2 +- C4/XSLT.pm | 2 +- .../Bug_27581-rename-UseICU-to-UseICUStyleQuotes.perl | 5 +++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../prog/en/modules/admin/preferences/searching.pref | 8 ++++---- .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 4 ++-- .../intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl | 4 ++-- 9 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/Bug_27581-rename-UseICU-to-UseICUStyleQuotes.perl diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index e743d8e88c..ca0b8ce9ac 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -298,7 +298,7 @@ sub BuildReport { QueryWeightFields TraceCompleteSubfields TraceSubjectSubdivisions - UseICU + UseICUStyleQuotes defaultSortField displayFacetCount OPACdefaultSortField diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 1b3941c7fb..0484c2b733 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -164,7 +164,7 @@ sub get_xslt_sysprefs { my $sysxml = "\n"; foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow DisplayOPACiconsXSLT URLLinkText viewISBD - OPACBaseURL TraceCompleteSubfields UseICU + OPACBaseURL TraceCompleteSubfields UseICUStyleQuotes UseAuthoritiesForTracings TraceSubjectSubdivisions Display856uAsImage OPACDisplay856uAsImage UseControlNumber IntranetBiblioDefaultView BiblioDefaultView diff --git a/installer/data/mysql/atomicupdate/Bug_27581-rename-UseICU-to-UseICUStyleQuotes.perl b/installer/data/mysql/atomicupdate/Bug_27581-rename-UseICU-to-UseICUStyleQuotes.perl new file mode 100644 index 0000000000..5aea1fa077 --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug_27581-rename-UseICU-to-UseICUStyleQuotes.perl @@ -0,0 +1,5 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE systempreferences SET variable = 'UseICUStyleQUotes' WHERE variable = 'UseICU'" ); + NewVersion( $DBversion, 27581, "Rename UseICU to UseICUStyleQuotes"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 3a3fe6d315..e9e345c699 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -707,7 +707,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('useDefaultReplacementCost', '0', NULL, 'default replacement cost defined in item type', 'YesNo'), ('useDischarge','','','Allows librarians to discharge borrowers and borrowers to request a discharge','YesNo'), ('UseEmailReceipts','0','','Send email receipts for payments and write-offs','YesNo'), -('UseICU','0','1','Tell Koha if ICU indexing is in use for Zebra or not.','YesNo'), +('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'), ('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'), ('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'), ('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 71bcbfaa1c..bae50682a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -59,12 +59,12 @@ Searching: no: "Don't include" - subdivisions for searches generated by clicking on subject tracings. - - - pref: UseICU + - pref: UseICUStyleQuotes default: 0 choices: - yes: Using - no: "Not using" - - 'ICU Zebra indexing. Please note: This setting will not affect Zebra indexing, it should only be used to tell Koha that you have activated ICU indexing if you have actually done so, since there is no way for Koha to figure this out on its own.' + yes: Use + no: "Don't use" + - 'ICU style quotes ({}) when tracing subjects. The default is to use standard quotes ("").' - - pref: IncludeSeeFromInSearches default: 0 diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 3d8ba578d4..f9124f668d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -30,13 +30,13 @@ - { + { " - } + } " diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl index 4eb7ec1a4b..494b2ffb97 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl @@ -25,13 +25,13 @@ - { + { " - } + } " diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index 6cf2be7e65..0931ba2c04 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -33,13 +33,13 @@ - { + { " - } + } " diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl index 691e73a4e8..169628a3f2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl @@ -23,13 +23,13 @@ - { + { " - } + } " -- 2.11.0