Bug 24593: Rewrite marc21_default_matching_rules to YAML
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Wed, 5 Feb 2020 13:11:16 +0000 (10:11 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Mar 2020 13:54:39 +0000 (13:54 +0000)
commit2c8f894b96dd2e340d3aa8562ba9914ccbfb1d4f
tree28f398f6a29d37cb017e93ce74cc206ee1097fa7
parent95884c204c5bfd8f97bf0580dbf40a3e12d15f8b
Bug 24593: Rewrite marc21_default_matching_rules to YAML

YAML version of marc21 optional marc21_default_matching_rules.

To test:
1) Do a clean install with optional data,
   dump table marc_matchers, reserve.

2) Apply this patch and it's dependencies

3) Do a clean install, dump again and compare
   No major 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-MARC21.po
     Verify strings from this file.
  d) Install new language
     ./translate install xx-YY
  e) Try clean install with new files

NOTE: This patch fails with qa tools!
Reason is that qa tools use YAML.pm module to
check files, but Installer.pm or LangInstaller.pm
are using YAML::Syck, using that module gives
no error, check for example:

perl -e 'use YAML::Syck qw( LoadFile ); $y = LoadFile("marc21_default_matching_rules.yml");'
No error!

perl -e 'use YAML qw( LoadFile ); $y = LoadFile("marc21_default_matching_rules.yml");'
Error!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql [deleted file]
installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.txt [deleted file]
installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml [new file with mode: 0644]