Bug 25149 - The Zebra language option for Greek should be 'el', not 'gr'
Summary: The Zebra language option for Greek should be 'el', not 'gr'
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Zebra (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Andreas Roussos
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 08:11 UTC by Andreas Roussos
Modified: 2020-11-30 21:49 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Please note that the configuration file (/etc/koha/koha-sites.conf) of existing installations that have been set up using ZEBRA_LANGUAGE="gr" will not be affected by this change.
Version(s) released in:
20.05.00
Circulation function:


Attachments
Bug 25149: Fix Zebra language code for Greek (4.63 KB, patch)
2020-04-15 09:11 UTC, Andreas Roussos
Details | Diff | Splinter Review
Bug 25149: Fix Zebra language code for Greek (4.69 KB, patch)
2020-04-22 21:16 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 25149: Fix Zebra language code for Greek (4.75 KB, patch)
2020-04-22 22:58 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Roussos 2020-04-15 08:11:26 UTC
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'.

This was brought to my attention by Evgenios Papadopoulos from the Koha
Hellenic Users' Group back in November 2018 (right after Bug 21416 was
pushed), but owing to extreme procrastination on my part a patch for it
was never submitted until now ;-)
Comment 1 Andreas Roussos 2020-04-15 09:11:31 UTC
Created attachment 102970 [details] [review]
Bug 25149: Fix Zebra language code for Greek

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
Comment 2 Bernardo Gonzalez Kriegel 2020-04-22 21:16:00 UTC
Created attachment 103515 [details] [review]
Bug 25149: Fix Zebra language code for Greek

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>
Comment 3 Katrin Fischer 2020-04-22 22:58:53 UTC
Created attachment 103519 [details] [review]
Bug 25149: Fix Zebra language code for Greek

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>
Comment 4 Katrin Fischer 2020-04-22 23:00:16 UTC
Changing to trivial patch, since the strings changed here don't affect translations.

I think this catches all cases for new installations, but I wonder about existing ones set up with 'gr'. I assume the 'gr' remains in the config files and that we can't intervene here as part of the update process? Could we put a warning in the release notes or even Koha/updatedatabase?
Comment 5 Andreas Roussos 2020-04-28 07:12:32 UTC
(In reply to Katrin Fischer from comment #4)
> I think this catches all cases for new installations, but I wonder about
> existing ones set up with 'gr'. I assume the 'gr' remains in the config
> files and that we can't intervene here as part of the update process? Could
> we put a warning in the release notes or even Koha/updatedatabase?
I think so myself -- an existing installation set up with ZEBRA_LANGUAGE="gr"
will retain its configuration file. I have added a note in the "Text to go in
the release notes:" section of this Bug report, let me know what you think.
Comment 6 Martin Renvoize (ashimema) 2020-04-29 16:36:11 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-05-08 22:39:11 UTC
enhancement not backported to 19.11