Bugzilla – Attachment 95790 Details for
Bug 23452
Multiple select options in system preferences are not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23452: Multiple select options in system preferences are not translatable
Bug-23452-Multiple-select-options-in-system-prefer.patch (text/plain), 2.37 KB, created by
Jonathan Druart
on 2019-11-25 14:18:23 UTC
(
hide
)
Description:
Bug 23452: Multiple select options in system preferences are not translatable
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-25 14:18:23 UTC
Size:
2.37 KB
patch
obsolete
>From cb58a55490d515394f219e7af2ffe378845bdb36 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Mon, 4 Nov 2019 10:50:11 -0300 >Subject: [PATCH] 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> >--- > misc/translator/LangInstaller.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm >index 55003af92e..47bddd6f36 100644 >--- a/misc/translator/LangInstaller.pm >+++ b/misc/translator/LangInstaller.pm >@@ -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}; >-- >2.11.0
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 23452
:
95008
|
95764
|
95765
|
95789
| 95790