Bug 25149: Fix Zebra language code for Greek
authorAndreas Roussos <a.roussos@dataly.gr>
Wed, 15 Apr 2020 07:46:50 +0000 (09:46 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 29 Apr 2020 16:14:30 +0000 (17:14 +0100)
According to the list of two-letter language codes found in ISO 639-1
(https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), the correct
Zebra language option for Greek should be 'el', not 'gr'.

This patch fixes that.

Test plan:
0) Apply the patch.
1) Confirm that 'gr' has been changed to 'el' in all relevant files.
2) Create a new Koha instance using `koha-create --zebralang el testinst1`.
3) Edit /etc/koha/koha-sites.conf and set ZEBRA_LANGUAGE to 'el'. Then,
   create another Koha instance with `koha-create testinst2`.
4) Confirm that both instances created in steps 2) and 3) have picked up
   the Zebra CHR file from the /etc/koha/zebradb/lang_defs/el/ directory.
   This is done by inspecting the value of 'profilePath' in these files:
   /etc/koha/sites/testinst{1,2}/zebra-authorities-dom.cfg
   /etc/koha/sites/testinst{1,2}/zebra-biblios-dom.cfg

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Makefile.PL
debian/docs/koha-create.xml
debian/scripts/koha-create
debian/templates/koha-sites.conf
etc/zebradb/lang_defs/el/sort-string-utf.chr [moved from etc/zebradb/lang_defs/gr/sort-string-utf.chr with 100% similarity]

index 4c52f0e..ad98d8b 100644 (file)
@@ -535,7 +535,7 @@ my %valid_config_values = (
   'DB_USE_TLS' => {'yes', 'no'},
   'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 },
   'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'normarc' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
-  'ZEBRA_LANGUAGE'    => { 'cs' => 1, 'en' => 1, 'es' => 1, 'fr' => 1, 'gr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
+  'ZEBRA_LANGUAGE'    => { 'cs' => 1, 'el' => 1, 'en' => 1, 'es' => 1, 'fr' => 1, 'nb' => 1, 'ru' => 1, 'uk' => 1 }, # FIXME should generate from contents of distribution
   'ZEBRA_TOKENIZER' => { chr => 1, icu => 1 },
   'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
   'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
index c5be386..f37eb20 100644 (file)
@@ -26,7 +26,7 @@
       <command>koha-create</command>
       <arg choice="req"><option>--create-db</option>|<option>--request-db</option>|<option>--populate-db</option>|<option>--use-db</option></arg>
       <arg><option>--marcflavor</option> marc21|normarc|unimarc</arg>
-      <arg><option>--zebralang</option> en|es|fr|gr|nb|ru|uk</arg>
+      <arg><option>--zebralang</option> el|en|es|fr|nb|ru|uk</arg>
       <arg><option>--memcached-servers</option> server:port</arg>
       <arg><option>--memcached-prefix</option> namespace_prefix</arg>
       <arg><option>--elasticsearch-server</option> server:port</arg>
index a4f1220..43d58fd 100755 (executable)
@@ -52,7 +52,7 @@ Options:
   --marcflavor flavor       Set the MARC flavor. Valid values are marc21 (default),
                             normarc and unimarc.
   --zebralang lang          Choose the primary language for Zebra indexing. Valid
-                            values are cs, en (default), es, fr, gr, nb, ru and uk.
+                            values are cs, el, en (default), es, fr, nb, ru and uk.
   --elasticsearch-server s  Enforce the use of the specified Elasticsearch server(s)
                             (default: localhost:9200).
   --memcached-servers str   Set a comma-separated list of host:port memcached servers.
index 3be4c55..23ec0a5 100644 (file)
@@ -28,7 +28,7 @@ DEFAULTSQL=""
 # default: 'marc21'
 ZEBRA_MARC_FORMAT="marc21"
 
-# ZEBRA_LANGUAGE: 'cs' | 'en' | 'es' | 'fr' | 'gr' | 'nb' | 'ru' | 'uk'
+# ZEBRA_LANGUAGE: 'cs' | 'el' | 'en' | 'es' | 'fr' | 'nb' | 'ru' | 'uk'
 # Primary language for Zebra indexing
 # default: 'en'
 ZEBRA_LANGUAGE="en"