Bugzilla – Attachment 103071 Details for
Bug 24973
Allow to localize and translate system preferences with new yaml based installer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24973: rewrite subset of system preferences as YAML
Bug-24973-rewrite-subset-of-system-preferences-as-.patch (text/plain), 22.30 KB, created by
Bernardo Gonzalez Kriegel
on 2020-04-16 11:15:55 UTC
(
hide
)
Description:
Bug 24973: rewrite subset of system preferences as YAML
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-04-16 11:15:55 UTC
Size:
22.30 KB
patch
obsolete
>From 14665bd8ab283f1607f87001af6948d0a0e9537a Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Wed, 15 Apr 2020 18:37:52 -0300 >Subject: [PATCH] Bug 24973: rewrite subset of system preferences as YAML > >This patch removes a subset of system preferences >from sysprefs.sql and rewrite them as YAML to >SET their value for different languages using >the translation process. > >The selected subset is an arbitrary, at this moment >is similar to the one present in de-DE sysprefs file. >Other languages update a different subset of sysprefs. > >I think that what the final subset will be falls >outside the scope of this report. It can be enlarged >or shortened at will. > >Test plan in following patch. >--- > installer/data/mysql/en/locale_sysprefs.yml | 122 ++++++++++++++++++++ > installer/data/mysql/sysprefs.sql | 16 --- > 2 files changed, 122 insertions(+), 16 deletions(-) > create mode 100644 installer/data/mysql/en/locale_sysprefs.yml > >diff --git a/installer/data/mysql/en/locale_sysprefs.yml b/installer/data/mysql/en/locale_sysprefs.yml >new file mode 100644 >index 0000000000..7376f2bba1 >--- /dev/null >+++ b/installer/data/mysql/en/locale_sysprefs.yml >@@ -0,0 +1,122 @@ >+--- >+# >+# Copyright 2020 Koha Development Team >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+# Localized Koha system preferences >+ >+tables: >+ - systempreferences: >+ translatable: [ value ] >+ multiline: [ ] >+ comments: [ variable, options, explanation ] >+ rows: >+ - variable: AddressFormat >+ value: "us" >+ options: "us|de|fr" >+ explanation: "Choose format to display postal addresses" >+ type: Choice >+ >+ - variable: AmazonLocale >+ value: "US" >+ options: "US|CA|DE|FR|IN|JP|UK" >+ explanation: "Use to set the Locale of your Amazon.com Web Services" >+ type: Choice >+ >+ - variable: borrowerRelationship >+ value: "father|mother" >+ options: "" >+ explanation: "Define valid relationships between a guarantor & a guarantee (separated by | or ,)" >+ type: free >+ >+ - variable: BorrowersTitles >+ value: "Mr|Mrs|Miss|Ms" >+ options: "" >+ explanation: "Define appropriate Titles for patrons" >+ type: free >+ >+ - variable: CalendarFirstDayOfWeek >+ value: 0 >+ options: "0|1|2|3|4|5|6" >+ explanation: "Select the first day of week to use in the calendar." >+ type: Choice >+ >+ - variable: CurrencyFormat >+ value: "US" >+ options: "US|FR|CH" >+ explanation: "Determines the display format of currencies. eg: '360000' is displayed as '360 000,00' in 'FR' or '360,000.00' in 'US'." >+ type: Choice >+ >+ - variable: dateformat >+ value: "us" >+ options: "metric|us|iso|dmydot" >+ explanation: "Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)" >+ type: Choice >+ >+ - variable: DefaultClassificationSource >+ value: "ddc" >+ options: "" >+ explanation: "Default classification scheme used by the collection. E.g., Dewey, LCC, etc." >+ type: ClassSources >+ >+ - variable: gist >+ value: 0 >+ options: "" >+ explanation: "Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST" >+ type: Integer >+ >+ - variable: opaclanguagesdisplay >+ value: 0 >+ options: "" >+ explanation: "If ON, enables display of Change Language feature on OPAC" >+ type: YesNo >+ >+ - variable: OpacMainUserBlock >+ value: "Welcome to Koha...<hr>" >+ options: "70|10" >+ explanation: "A user-defined block of HTML in the main content area of the opac main page" >+ type: Textarea >+ >+ - variable: OpacNav >+ value: "Important links here." >+ options: "70|10" >+ explanation: "Use HTML tags to add navigational links to the left-hand navigational bar in OPAC" >+ type: Textarea >+ >+ - variable: OpacNavBottom >+ value: "Important links here." >+ options: "70|10" >+ explanation: "Use HTML tags to add navigational links to the left-hand navigational bar in OPAC" >+ type: Textarea >+ >+ - variable: OPACSearchForTitleIn >+ value: "<li><a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a></li><li><a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a></li><li><a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a></li><li><a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a></li>" >+ options: "70|10" >+ explanation: "Enter the HTML that will appear in the 'Search for this title in' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable 'More Searches' menu." >+ type: Textarea >+ >+ - variable: RoutingListNote >+ value: "To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference." >+ options: "70|10" >+ explanation: "Define a note to be shown on all routing lists" >+ type: Textarea >+ >+ - variable: UniqueItemFields >+ value: "barcode" >+ options: "" >+ explanation: "Pipe-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table" >+ type: Free >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 2c5b01fba8..7260e4dd3c 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -9,7 +9,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), > ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), > ('AdditionalFieldsInZ3950ResultSearch', '', NULL, 'Determines which MARC field/subfields are displayed in -Additional field- column in the result of a search Z3950', 'Free'), >-('AddressFormat','us','us|de|fr','Choose format to display postal addresses', 'Choice'), > ('AdlibrisCoversEnabled','0',NULL,'Display cover images in OPAC results and detail listing from Swedish retailer Adlibris.','YesNo'), > ('AdlibrisCoversURL','http://www.adlibris.com/se/organisationer/showimagesafe.aspx',NULL,'Base URL for Adlibris cover image web service.','Free'), > ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), >@@ -52,7 +51,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AlternateHoldingsSeparator','',NULL,'The string to use to separate subfields in alternate holdings displays.','free'), > ('AmazonAssocTag','','','See: http://aws.amazon.com','free'), > ('AmazonCoverImages','0','','Display Cover Images in Staff Client from Amazon Web Services','YesNo'), >-('AmazonLocale','US','US|CA|DE|FR|IN|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'), > ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'), > ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), > ('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'), >@@ -102,16 +100,13 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('BlockReturnOfLostItems','0','0','If enabled, items that are marked as lost cannot be returned.','YesNo'), > ('BlockReturnOfWithdrawnItems','1','0','If enabled, items that are marked as withdrawn cannot be returned.','YesNo'), > ('BorrowerMandatoryField','surname|cardnumber',NULL,'Choose the mandatory fields for a patron\'s account','free'), >-('borrowerRelationship','father|mother','','Define valid relationships between a guarantor & a guarantee (separated by | or ,)','free'), > ('BorrowerRenewalPeriodBase','now','dateexpiry|now|combination','Set whether the borrower renewal date should be counted from the dateexpiry, from the current date or by combination: if the dateexpiry is in future use dateexpiry, else use current date ','Choice'), > ('BorrowersLog','1',NULL,'If ON, log edit/create/delete actions on patron data','YesNo'), >-('BorrowersTitles','Mr|Mrs|Miss|Ms',NULL,'Define appropriate Titles for patrons','free'), > ('BorrowerUnwantedField','',NULL,'Name the fields you don\'t need to store for a patron\'s account','free'), > ('BranchTransferLimitsType','ccode','itemtype|ccode','When using branch transfer limits, choose whether to limit by itemtype or collection code.','Choice'), > ('BrowseResultSelection','0',NULL,'Enable/Disable browsing search results fromt the bibliographic record detail page in staff client','YesNo'), > ('CalculateFinesOnReturn','1','','Switch to control if overdue fines are calculated on return or not','YesNo'), > ('CalculateFinesOnBackdate','1','','Switch to control if overdue fines are calculated on return when backdating','YesNo'), >-('CalendarFirstDayOfWeek','0','0|1|2|3|4|5|6','Select the first day of week to use in the calendar.','Choice'), > ('CanMarkHoldsToPullAsLost','do_not_allow','do_not_allow|allow|allow_and_notify','Add a button to the "Holds to pull" screen to mark an item as lost and notify the patron.','Choice'), > ('canreservefromotherbranches','1','','With Independent branches on, can a user from one library place a hold on an item from another library','YesNo'), > ('CardnumberLength', '', '', 'Set a length for card numbers with a maximum of 32 characters.', 'Free'), >@@ -137,17 +132,14 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), > ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), > ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), >-('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), > ('CustomCoverImages','0',NULL,'If enabled, the custom cover images will be displayed in the staff client. CustomCoverImagesURL must be defined.','YesNo'), > ('CustomCoverImagesURL','',NULL,'Define an URL serving book cover images, using the following patterns: %issn%, %isbn%, FIXME ADD MORE (use it with CustomCoverImages and/or OPACCustomCoverImages)','free'), >-('dateformat','us','metric|us|iso|dmydot','Define global date format (us mm/dd/yyyy, metric dd/mm/yyy, ISO yyyy-mm-dd, dmydot dd.mm.yyyy)','Choice'), > ('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'), > ('decreaseLoanHighHolds',NULL,'','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'), > ('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'), > ('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'), > ('decreaseLoanHighHoldsIgnoreStatuses', '', 'damaged|itemlost|notforloan|withdrawn', "Ignore items with these statuses for dynamic high holds checking", 'Choice'), > ('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'), >-('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'), > ('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'), > ('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'), > ('DefaultLongOverdueChargeValue', '', NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'), >@@ -206,7 +198,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('finesMode','off','off|production','Choose the fines mode, \'off\' (no charges), \'production\' (accrue overdue fines). Requires accruefines cronjob.','Choice'), > ('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'), > ('GDPR_Policy','','Enforced|Permissive|Disabled','General Data Protection Regulation - policy', 'Choice'), >-('gist','0','','Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','Integer'), > ('GoogleIndicTransliteration','0','','GoogleIndicTransliteration on the OPAC.','YesNo'), > ('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'), > ('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'), >@@ -402,7 +393,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL), > ('OpacLangSelectorMode','both','top|both|footer','Select the location to display the language selector in OPAC','Choice'), > ('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'), >-('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'), > ('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'), > ('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'), > ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'), >@@ -410,13 +400,10 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacLoginInstructions', '', '60|10', 'Instructions to display on the OPAC login form when a patron is not logged in', 'Textarea'), > ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), > ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'), >-('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML in the main content area of the opac main page','Textarea'), > ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'), > ('OpacMoreSearches', '', NULL, 'Add additional elements to the OPAC more searches bar', 'Textarea'), > ('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'), > ('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'), >-('OpacNav','Important links here.','70|10','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','Textarea'), >-('OpacNavBottom','Important links here.','70|10','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','Textarea'), > ('OpacNewsLibrarySelect','0','','Show selector for branches on OPAC news page','YesNo'), > ('OpacNoItemTypeImages','0',NULL,'If ON, disables itemtype images in the OPAC','YesNo'), > ('OPACNoResultsFound','','70|10','Display this HTML when no results are found for a search in the OPAC','Textarea'), >@@ -435,7 +422,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacResetPassword','0','','Shows the ''Forgot your password?'' link in the OPAC','YesNo'), > ('OPACResultsLibrary', 'homebranch', 'homebranch|holdingbranch', 'Defines whether the OPAC displays the holding or home branch in search results when using XSLT', 'Choice'), > ('OPACResultsSidebar','','70|10','Define HTML to be included on the search results page, underneath the facets sidebar','Textarea'), >-('OPACSearchForTitleIn','<li><a href=\"https://worldcat.org/search?q={TITLE}\" target=\"_blank\">Other Libraries (WorldCat)</a></li>\n<li><a href=\"https://scholar.google.com/scholar?q={TITLE}\" target=\"_blank\">Other Databases (Google Scholar)</a></li>\n<li><a href=\"https://www.bookfinder.com/search/?author={AUTHOR}&title={TITLE}&st=xl&ac=qr\" target=\"_blank\">Online Stores (Bookfinder.com)</a></li>\n<li><a href=\"https://openlibrary.org/search?author=({AUTHOR})&title=({TITLE})\" target=\"_blank\">Open Library (openlibrary.org)</a></li>','70|10','Enter the HTML that will appear in the \'Search for this title in\' box on the detail page in the OPAC. Enter {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the URL. Leave blank to disable \'More Searches\' menu.','Textarea'), > ('OpacSeparateHoldings','0',NULL,'Separate current branch holdings from other holdings (OPAC)','YesNo'), > ('OpacSeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings (OPAC)','Choice'), > ('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'), >@@ -555,7 +541,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RisExportAdditionalFields', '', NULL , 'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), > ('RoundFinesAtPayment','0', NULL,'If enabled any fines with fractions of a cent will be rounded to the nearest cent when payments are coll ected. e.g. 1.004 will be paid off by a 1.00 payment','YesNo'), > ('RoutingListAddReserves','0','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'), >-('RoutingListNote','To change this note edit <a href=\"/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped\">RoutingListNote</a> system preference.','70|10','Define a note to be shown on all routing lists','Textarea'), > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), > ('SCOMainUserBlock','','70|10','Add a block of HTML that will display on the self checkout screen','Textarea'), > ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'), >@@ -655,7 +640,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('UNIMARCAuthorsFacetsSeparator',', ',NULL,'UNIMARC authors facets separator','short'), > ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), > ('UpdateItemWhenLostFromHoldList','',NULL,'This is a list of values to update an item when it is marked as lost from the holds to pull screen','Free'), >-('UniqueItemFields','barcode','','Pipe-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'), > ('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'), > ('UpdateItemLocationOnCheckin', '', 'NULL', 'This is a list of value pairs.\n Examples:\n\nPROC: FIC - causes an item in the Processing Center location to be updated into the Fiction location on check in.\nFIC: GEN - causes an item in the Fiction location to be updated into the General stacks location on check in.\n_BLANK_:FIC - causes an item that has no location to be updated into the Fiction location on check in.\nFIC: _BLANK_ - causes an item in location FIC to be updated to a blank location on check in.\n_ALL_:FIC - causes all items to be updated into the Fiction location on check in.\nPROC: _PERM_ - causes an item that is in the Processing Center to be updated to it''s permanent location.\n\nGeneral rule: if the location value on the left matches the item''s current location, it will be updated to match the location value on the right.\nNote: PROC and CART are special values, for these locations only can location and permanent_location differ, in all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout.\n\nThe special term _BLANK_ may be used on either side of a value pair to update or remove the location from items with no location assigned.\nThe special term _ALL_ is used on the left side of the colon (:) to affect all items.\nThe special term _PERM_ is used on the right side of the colon (:) to return items to their permanent location.', 'Free'), > ('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'), >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24973
:
103071
|
103072
|
103073
|
103074
|
103075
|
104971
|
105032
|
108130
|
108166
|
108946