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'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Doris Tam 2024-07-25 23:48:30 +00:00 committed by Katrin Fischer
parent f57cf24553
commit e086eda769
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
5 changed files with 18 additions and 4 deletions

View file

@ -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;

View file

@ -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 ) {

View file

@ -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'";
},
};

View file

@ -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'),

View file

@ -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."
-