Summary: | Untranslatable pull-down in auth_subfields_structure.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | paxed <pasi.kallinen> |
Component: | I18N/L10N | Assignee: | Bernardo Gonzalez Kriegel <bgkriegel> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | bgkriegel, f.demians, fridolin.somers, gmcharlt |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12091 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl
Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl [SIGNED OFF] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl 0001-PASSED-QA-Bug-11508-Untranslatable-pull-down-in-auth.patch |
Description
paxed
2014-01-09 12:23:27 UTC
Created attachment 26829 [details] [review] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl OMG!!, this file is full of tabs and CGI::scrolling_list !!! 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. The change to the template includes improperly nested [% IF %]s inside HTML tags: <option value= "0" [%- IF ( loo.ohidden.default == 0 ) -%]selected="selected"[%- END -%]>Show all</option> This should be written: [%- IF ( loo.ohidden.default == 0 ) -%] <option value= "0" selected="selected">Show all</option> [%- ELSE -% <option value= "0">Show all</option> [%- END -%] This is because of problems the translation script has with parsing template directives nested inside tags: http://wiki.koha-community.org/wiki/Coding_Guidelines#HTML1:_Template_Toolkit_markup_inside_HTML This should have been caught by the QA tool, but it looks like the "-" in "[%- IF" isn't an expected pattern. It would be nice if the QA test tool were updated to be aware of that construction. What is the reason for the -? (In reply to Katrin Fischer from comment #3) > What is the reason for the -? It's a valid TT construct to make sure it doesn't emit extra whitespace before the value to be put in, and is fine to use -- just not within a tag. See bug 12076 for a change to the test case to catch the problem. Created attachment 27042 [details] [review] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl OMG!!, this file is full of tabs and CGI::scrolling_list !!! 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. (In reply to Owen Leonard from comment #2) > > This should be written: > > [%- IF ( loo.ohidden.default == 0 ) -%] > <option value= "0" selected="selected">Show all</option> > [%- ELSE -% > <option value= "0">Show all</option> > [%- END -%] Sorry for that, and thanks for testing and the reference :) Now is fixed. Created attachment 27144 [details] [review] [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. Comment on attachment 27144 [details] [review] [SIGNED OFF] Bug 11508 - Untranslatable pull-down in auth_subfields_structure.pl Review of attachment 27144 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ +94,5 @@ > + <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'] -%] There's a tab '10'? Well, it was in the old dropdown too, so no problem. It is just strange. (In reply to M. Tompsett from comment #8) > > + [%- FOREACH t IN [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -%] > > There's a tab '10'? Well, it was in the old dropdown too, so no problem. It > is just strange. Perhaps by copy of biblio's one, where tab 10 is for items... Created attachment 27307 [details] [review] 0001-PASSED-QA-Bug-11508-Untranslatable-pull-down-in-auth.patch Pushed to master. Thanks, Bernardo! Pushed to 3.14.x, will be in 3.14.10 |