Bug 23452: Multiple select options in system preferences are not translatable
Translate script ignores multiple options in system preferences, this patch fix that. To test: 1) Apply the patch 2) Go to misc/translator cd misc/translator 3) Update your preferred language perl translate update xx-YY 4) Updated pref file must contain new strings, eg. egrep "when cataloguing an item" po/xx-YY-pref.po 5) Edit & translate that string 6) Install the updated translation perl translate install xx-YY 7) Check that the translated pref file has a) multiple options present b) the message from 5) is translated see for example circulation.pref en: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref xx: koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/preferences/circulation.pref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
7da1644fd5
commit
7657163d8f
|
|
@ -185,7 +185,7 @@ sub add_prefs {
|
|||
for my $element ( @$pref ) {
|
||||
if ( ref( $element) eq 'HASH' ) {
|
||||
while ( my ($key, $value) = each(%$element) ) {
|
||||
next unless $key eq 'choices';
|
||||
next unless $key eq 'choices' or $key eq 'multiple';
|
||||
next unless ref($value) eq 'HASH';
|
||||
for my $ckey ( keys %$value ) {
|
||||
my $id = $self->{file} . "#$pref_name# " . $value->{$ckey};
|
||||
|
|
@ -226,7 +226,7 @@ sub update_tab_prefs {
|
|||
my $element = $p->[$i];
|
||||
if ( ref( $element) eq 'HASH' ) {
|
||||
while ( my ($key, $value) = each(%$element) ) {
|
||||
next unless $key eq 'choices';
|
||||
next unless $key eq 'choices' or $key eq 'multiple';
|
||||
next unless ref($value) eq 'HASH';
|
||||
for my $ckey ( keys %$value ) {
|
||||
my $id = $self->{file} . "#$pref_name# " . $value->{$ckey};
|
||||
|
|
|
|||
Loading…
Reference in New Issue