Bugzilla – Attachment 27144 Details for
Bug 11508
Untranslatable pull-down in auth_subfields_structure.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl
SIGNED-OFF-Bug-11508---Untranslatable-pull-down-in.patch (text/plain), 7.20 KB, created by
Mark Tompsett
on 2014-04-15 19:21:24 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-04-15 19:21:24 UTC
Size:
7.20 KB
patch
obsolete
>From 6d31e06d8d951f4a29be6f3a0e9daaa1b050aa86 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Fri, 4 Apr 2014 20:37:54 -0300 >Subject: [PATCH] [SIGNED OFF] Bug 11508 - Untranslatable pull-down in > auth_subfields_structure.pl > >OMG!!, this file is full of tabs and CGI::scrolling_list !!! > >-- I know, right? YUCK! [Mark Tompsett] > >This patch fix the reported strings and also another one. >It removes 2 occurrences of CGI::scrolling_list with >untranslatable labels. Fixed capitalization. > >To test >1. Go to Administration > Authority types, >click 'MARC structure' of any auth type, >click 'subfields' for any Tag >= 010, >clic 'Edit subfields' > >Check pulldowns 'Manged in tab' and 'Select to display or not' > >2. Apply the patch > >3. Reload and verify functionality of both pulldowns > >4. Check that strings are not present on staff PO file >egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po > >5. Update language file >(cd misc/translator/; perl translate update fi-FI) > >6. Check that strings are now present, repeat 4. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >NOTE: drop-downs work identically. Show all, Hide all, and > ignore were added to the po files too. >--- > admin/auth_subfields_structure.pl | 43 ++++---------------- > .../en/modules/admin/auth_subfields_structure.tt | 33 ++++++++++++++- > 2 files changed, 39 insertions(+), 37 deletions(-) > >diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl >index fb0e59c..321e54c 100755 >--- a/admin/auth_subfields_structure.pl >+++ b/admin/auth_subfields_structure.pl >@@ -140,41 +140,14 @@ if ($op eq 'add_form') { > > my %row_data; # get a fresh hash for the row data > $row_data{defaultvalue} = $data->{defaultvalue}; >- $row_data{tab} = CGI::scrolling_list(-name=>'tab', >- -id=>"tab$i", >- -values => >- [ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ], >- -labels => { >- '-1' => 'ignore', >- '0' => '0', >- '1' => '1', >- '2' => '2', >- '3' => '3', >- '4' => '4', >- '5' => '5', >- '6' => '6', >- '7' => '7', >- '8' => '8', >- '9' => '9', >- }, >- -default=>$data->{'tab'}, >- -size=>1, >- -tabindex=>'', >- -multiple=>0, >- ); >- $row_data{ohidden} = CGI::scrolling_list(-name=>'ohidden', >- -id=>"ohidden$i", >- #-values=>['0','1','2'], >- #-labels => {'0'=>'Show','1'=>'Show Collapsed', >- # '2' =>'Hide', >- # }, >- -values=>['0','-5'], >- -labels => {'0'=>'Show All','-5'=>'Hide All',}, >- -default=>$data->{'hidden'}, >- #-default=>"-5", >- -size=>1, >- -multiple=>0, >- ); >+ $row_data{tab} = { >+ id => "tab$i", >+ default => $data->{'tab'}, >+ }; >+ $row_data{ohidden} = { >+ id => "ohidden$i", >+ default => $data->{'hidden'} >+ }; > #$row_data{ihidden} = CGI::scrolling_list(-name=>'ihidden', > # -id=>"ihidden$i", > # -values=>['0','1','2'], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >index 3d22192..94d53bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt >@@ -88,12 +88,41 @@ function displayMoreConstraint(numlayer){ > <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %] </li> > <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian %]" size="40" maxlength="80" /></li> > <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li> >- <li><label for="tab[% loo.row %]">Managed in tab: </label>[% loo.tab %] (ignore means that the subfield does not display in the record editor)</li> >+ <li><label for="tab[% loo.row %]">Managed in tab: </label> >+ <select name="tab" tabindex="" size="1" id="[% loo.tab.id %]"> >+ [%- IF ( loo.tab.default == -1 ) -%] >+ <option value="-1" selected="selected">ignore</option> >+ [%- ELSE -%] >+ <option value="-1">ignore</option> >+ [%- END -%] >+ [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%] >+ [%- IF ( loo.tab.default == t ) -%] >+ <option value="[%- t -%]" selected="selected">[%- t -%]</option> >+ [%- ELSE -%] >+ <option value="[%- t -%]">[%- t -%]</option> >+ [%- END -%] >+ [%- END -%] >+ </select> >+ (ignore means that the subfield does not display in the record editor) >+ </li> > <li> > <fieldset> > <legend>Display</legend> > <ol> >- <li><label for="ohidden[% loo.row %]">Select to display or not:</label>[% loo.ohidden %] </li> >+ <li><label for="ohidden[% loo.row %]">Select to display or not:</label> >+ <select name="ohidden" size="1" id="[% loo.ohidden.id %]"> >+ [%- IF ( loo.ohidden.default == 0 ) -%] >+ <option value= "0" selected="selected">Show all</option> >+ <option value="-5">Hide all</option> >+ [%- ELSIF ( loo.ohidden.default == -5 ) -%] >+ <option value= "0">Show all</option> >+ <option value="-5" selected="selected">Hide all</option> >+ [%- ELSE -%] >+ <option value= "0">Show all</option> >+ <option value="-5">Hide all</option> >+ [%- END -%] >+ </select> >+ </li> > <!-- <li><label for="ihidden[% loo.row %]">Intranet:</label>[% loo.ihidden %] </li> --> > <!-- <li><label for="ehidden[% loo.row %]">Editor:</label>[% loo.ehidden %] (see online help)</li> --> > </ol> >-- >1.7.9.5
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 11508
:
26829
|
27042
|
27144
|
27307