Bugzilla – Attachment 101019 Details for
Bug 24870
Translate installer data label
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24870: Translate installer data label
Bug-24870-Translate-installer-data-label.patch (text/plain), 3.46 KB, created by
Jonathan Druart
on 2020-03-19 14:16:43 UTC
(
hide
)
Description:
Bug 24870: Translate installer data label
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-19 14:16:43 UTC
Size:
3.46 KB
patch
obsolete
>From aae33063fc31b2418c75cfc8e95613e0b037ab7e Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sat, 14 Mar 2020 21:00:24 -0300 >Subject: [PATCH] Bug 24870: Translate installer data label > >This patch enable the translation of the >labels 'Mandatory' or 'Optional' present at install time >for groups of installer files. > >To test: >1) Try install using de-DE language, > at step3 verify 'Mandatory' and 'Optional' > labels for marc21 or other data checklist > Do not close this window! >2) Apply this patch >3) Update de-DE translation files, reinstall lang files > cd misc/translator > ./translate update de-DE > ./translate install de-DE >4) Reload page at step3, now 'Mandatory' label >is translated to 'Pflichtfeld' >5) Verify strings in translation file >Search for >^msgid \"Mandatory\" >^msgid \"Optional\" >in po/de-DE-staff-prog.po. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Installer.pm | 4 ++-- > .../intranet-tmpl/prog/en/modules/installer/step3.tt | 10 ++++++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/C4/Installer.pm b/C4/Installer.pm >index 012bc1c3cd..a1c6f5f6a6 100644 >--- a/C4/Installer.pm >+++ b/C4/Installer.pm >@@ -175,7 +175,7 @@ sub marc_framework_sql_list { > sort { $a->{'fwkname'} cmp $b->{'fwkname'} } @frameworklist; > > $cell{"frameworks"} = \@fwks; >- $cell{"label"} = ucfirst($requirelevel); >+ $cell{"label"} = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i)?'mandatory':'optional'; > $cell{"code"} = lc($requirelevel); > push @fwklist, \%cell; > } >@@ -257,7 +257,7 @@ sub sample_data_sql_list { > my @fwks = sort { $a->{'fwkname'} cmp $b->{'fwkname'} } @frameworklist; > > $cell{"frameworks"} = \@fwks; >- $cell{"label"} = ucfirst($requirelevel); >+ $cell{"label"} = ($requirelevel =~ /(mandatory|requi|oblig|necess)/i)?'mandatory':'optional'; > $cell{"code"} = lc($requirelevel); > push @levellist, \%cell; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >index 9f37a5abc1..d6bcaedd76 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tt >@@ -88,7 +88,10 @@ > Defaulting to the frameworks supplied for English (en)<span></h4> > [% END %] > [% FOREACH frameworksloo IN frameworksloop %] >- <h4>[% frameworksloo.label | html %]</h4> >+ [%- SWITCH frameworksloo.label -%] >+ [%- CASE 'mandatory' -%]<h4>Mandatory</h4> >+ [%- CASE 'optional' -%]<h4>Optional</h4> >+ [%- END -%] > > <div class="checkboxes"> > >@@ -125,7 +128,10 @@ > [% END %] > > [% FOREACH levelloo IN levelloop %] >- <h4>[% levelloo.label | html %]</h4> >+ [%- SWITCH levelloo.label -%] >+ [%- CASE 'mandatory' -%]<h4>Mandatory</h4> >+ [%- CASE 'optional' -%]<h4>Optional</h4> >+ [%- END -%] > > <div class="checkboxes"> > >-- >2.20.1
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 24870
:
100710
|
100711
| 101019