From 3cda5b5821685b8ec9cd5e0b5d7e8d3549ad19bf Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Mon, 1 Dec 2025 09:32:16 +0000 Subject: [PATCH] Bug 41332: add Greek to KohaManualLanguage syspref The Koha Manual has been translated into Greek: https://koha-community.org/manual/latest/el/html/index.html However, 'Greek' is missing from the list of languages available in the 'KohaManualLanguage' System Preference. This patch fixes that. Test plan: 1) Without the patch, visit Administration > System preferences > Enhanced content, and under the 'Manual' section notice that 'Greek' is missing from the options of the 'KohaManualLanguage' syspref dropdown. 2) Apply the patch, and run updatedatabase.pl The 'KohaManualLanguage' dropdown should now list 'Greek'. --- Koha/Manual.pm | 2 +- installer/data/mysql/atomicupdate/bug_41332.pl | 18 ++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 +- .../admin/preferences/enhanced_content.pref | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_41332.pl diff --git a/Koha/Manual.pm b/Koha/Manual.pm index ddb8d749b5..e0a22e8dc7 100644 --- a/Koha/Manual.pm +++ b/Koha/Manual.pm @@ -57,7 +57,7 @@ Use system preferences 'KohaManualLanguage' and 'KohaManualBaseURL' to properly sub _get_base_url { my ($preferred_language) = @_; - my @available_languages = qw( en ar cs es fr it pt_BR tz zh_TW ); + my @available_languages = qw( el en ar cs es fr it pt_BR tz zh_TW ); my ($language) = grep { my $preferred_short = substr $preferred_language, 0, 2; diff --git a/installer/data/mysql/atomicupdate/bug_41332.pl b/installer/data/mysql/atomicupdate/bug_41332.pl new file mode 100644 index 0000000000..3cdfa6e7ee --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41332.pl @@ -0,0 +1,18 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41332", + description => "Adds new option for Greek (el) to system preference 'KohaManualLanguage'", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + UPDATE systempreferences SET options = 'el|en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW' WHERE variable = 'KohaManualLanguage' + } + ); + say_success( $out, "Added new option for Greek (el) to system preference 'KohaManualLanguage'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 35a5d15dd8..b55fc3dcad 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -380,7 +380,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('JobsNotificationMethod','STOMP','polling|STOMP','Define the preferred job worker notification method','Choice'), ('KohaAdminEmailAddress','root@localhost','','Define the email address where patron modification requests are sent','free'), ('KohaManualBaseURL','https://koha-community.org/manual/','','Where is the Koha manual/documentation located?','Free'), -('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'), +('KohaManualLanguage','en','el|en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'), ('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'), ('LanguageToUseOnMerge','',NULL,'If set, the authority field having the given language code in its $7 subfield will be used in the bibliographic record if it exists, rather than the first field. The code can be in a short, 2 characters long form (example: ba for latin) or in a long, 8 characters long form, with the short form in position 5 and 6 starting from 1 (example: ba0yba0y for latin). A list of available codes can be found here: https://documentation.abes.fr/sudoc/formats/unmb/DonneesCodees/CodesZone104.htm#$d. Please note that this feature is available only for UNIMARC.','Free'), ('LibraryName','','','Define the library name as displayed on the OPAC',''), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref index 1f088136f4..903f02de41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -422,6 +422,7 @@ Enhanced content: - Language of the online manual - pref: KohaManualLanguage choices: + el: Greek en: English ar: Arabic cs: Czech -- 2.39.5