From e677c15b86afd44118084e7a3a52d5f3fa4ea183 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 4 Feb 2020 19:45:07 -0300 Subject: [PATCH] Bug 24583: Rewrite mandatory/auth_values to YAML YAML version of mandatory auth_values. To test: 1) Do a clean install, dump auth_values, reserve. 2) Apply this patch and it's dependencies 3) Do a clean install, dump again and compare No differences expected 4) Try translation a) Go to misc/translator b) create files for a new language ./translate create xx-YY c) Check new file po/xx-YY-instaler.po Verify strings from this file. d) Install new language ./translate install xx-YY e) Try clean install with new files Signed-off-by: Martin Renvoize --- .../data/mysql/en/mandatory/auth_values.sql | 6 -- .../data/mysql/en/mandatory/auth_values.txt | 1 - .../data/mysql/en/mandatory/auth_values.yml | 60 +++++++++++++++++++ 3 files changed, 60 insertions(+), 7 deletions(-) delete mode 100644 installer/data/mysql/en/mandatory/auth_values.sql delete mode 100644 installer/data/mysql/en/mandatory/auth_values.txt create mode 100644 installer/data/mysql/en/mandatory/auth_values.yml diff --git a/installer/data/mysql/en/mandatory/auth_values.sql b/installer/data/mysql/en/mandatory/auth_values.sql deleted file mode 100644 index 894b2b9b68..0000000000 --- a/installer/data/mysql/en/mandatory/auth_values.sql +++ /dev/null @@ -1,6 +0,0 @@ -INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','0','No','No'); -INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','1','Yes','Yes'); -INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('PAYMENT_TYPE','SIP00','Cash via SIP2','Cash'); -INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('PAYMENT_TYPE','SIP01','Visa via SIP2','Visa'); -INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('PAYMENT_TYPE','SIP02','Creditcard via SIP2','Creditcard'); -INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HSBND_FREQ','EW','Every week'); diff --git a/installer/data/mysql/en/mandatory/auth_values.txt b/installer/data/mysql/en/mandatory/auth_values.txt deleted file mode 100644 index effc4542f0..0000000000 --- a/installer/data/mysql/en/mandatory/auth_values.txt +++ /dev/null @@ -1 +0,0 @@ -Default Koha system authorised values diff --git a/installer/data/mysql/en/mandatory/auth_values.yml b/installer/data/mysql/en/mandatory/auth_values.yml new file mode 100644 index 0000000000..8822b00674 --- /dev/null +++ b/installer/data/mysql/en/mandatory/auth_values.yml @@ -0,0 +1,60 @@ +--- +# +# 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 2 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +description: + - "Default Koha system authorised values" + +tables: + - authorised_values: + translatable: [ lib, lib_opac ] + multiline: [] + rows: + - category: "YES_NO" + authorised_value: "0" + lib: "No" + lib_opac: "No" + + - category: "YES_NO" + authorised_value: "1" + lib: "Yes" + lib_opac: "Yes" + + - category: "PAYMENT_TYPE" + authorised_value: "SIP00" + lib: "Cash via SIP2" + lib_opac: "Cash" + + - category: "PAYMENT_TYPE" + authorised_value: "SIP01" + lib: "Visa via SIP2" + lib_opac: "Visa" + + - category: "PAYMENT_TYPE" + authorised_value: "SIP02" + lib: "Creditcard via SIP2" + lib_opac: "Creditcard" + + - authorised_values: + translatable: [ lib ] + multiline: [] + rows: + - category: "HSBND_FREQ" + authorised_value: "EW" + lib: "Every week" -- 2.20.1