Bugzilla – Attachment 169631 Details for
Bug 27490
Rename system preference language to StaffInterfaceLanguages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Bug-27490-Update-systempreference-language-to-Staf.patch (text/plain), 4.43 KB, created by
Koha Training Catalyst
on 2024-07-25 23:52:37 UTC
(
hide
)
Description:
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Filename:
MIME Type:
Creator:
Koha Training Catalyst
Created:
2024-07-25 23:52:37 UTC
Size:
4.43 KB
patch
obsolete
>From 27c64e48b4e881c3610a7728756fff219211b4e3 Mon Sep 17 00:00:00 2001 >From: Doris Tam <doristam@catalyst.net.nz> >Date: Thu, 25 Jul 2024 23:48:30 +0000 >Subject: [PATCH] Bug 27490: Update systempreference 'language' to > 'StaffInterfaceLanguages' > >Test plan > >1. Go to the staff client >2. Go to administration >3. Search systempreferences for 'StaffInterfaceLanguages' >4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages' >--- > C4/Languages.pm | 2 +- > Koha/SharedContent.pm | 2 +- > .../mysql/atomicupdate/bug_27490-change-syspref.pl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../en/modules/admin/preferences/i18n_l10n.pref | 2 +- > 5 files changed, 18 insertions(+), 4 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_27490-change-syspref.pl > >diff --git a/C4/Languages.pm b/C4/Languages.pm >index 079737da8c..ac17631320 100644 >--- a/C4/Languages.pm >+++ b/C4/Languages.pm >@@ -115,7 +115,7 @@ sub getTranslatedLanguages { > my @languages; > my @enabled_languages = > ( $interface && $interface eq 'intranet' ) >- ? split ",", C4::Context->preference('language') >+ ? split ",", C4::Context->preference('StaffInterfaceLanguages') > : split ",", C4::Context->preference('OPACLanguages'); > > my $cache = Koha::Caches->get_instance; >diff --git a/Koha/SharedContent.pm b/Koha/SharedContent.pm >index 0c5e406caf..08193fbafc 100644 >--- a/Koha/SharedContent.pm >+++ b/Koha/SharedContent.pm >@@ -133,7 +133,7 @@ Prepare Koha entity data to be sent to Mana KB. > > sub prepare_entity_data { > my ($lang, $loggedinuser, $ressourceid, $ressourcetype) = @_; >- $lang ||= C4::Context->preference('language'); >+ $lang ||= C4::Context->preference('StaffInterfaceLanguages'); > > my $mana_email; > if ( $loggedinuser ne 0 ) { >diff --git a/installer/data/mysql/atomicupdate/bug_27490-change-syspref.pl b/installer/data/mysql/atomicupdate/bug_27490-change-syspref.pl >new file mode 100755 >index 0000000000..58cae586c2 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_27490-change-syspref.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "27490", >+ description => "Changing language syspref to StaffInterfaceLanguages", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{UPDATE systempreferences SET variable='StaffInterfaceLanguages' WHERE variable='language'}); >+ >+ say $out "Updated system preference 'Change language to StaffInterfaceLanguages'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 1a7cd033e9..f54029bc64 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -362,7 +362,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('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'), > ('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'), >-('language','en',NULL,'Set the default language in the staff interface.','Languages'), >+('StaffInterfaceLanguages','en',NULL,'Set the default language in the staff interface.','Languages'), > ('LibraryName','','','Define the library name as displayed on the OPAC',''), > ('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'), > ('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref >index b7f2baa881..a32c178ebc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref >@@ -33,7 +33,7 @@ I18N/L10N: > - as the first day of week in the calendar. > - > - "Enable the following languages on the staff interface:" >- - pref: language >+ - pref: StaffInterfaceLanguages > type: staff-languages > - "This list can be sorted to modify the order of the languages on the interface." > - >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27490
:
169631
|
169805
|
169914
|
169915
|
170965
|
170966
|
170967