Bug 7644

Summary: Invalid markup in staff client language chooser
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Ian Walls <koha.sekjal>
Severity: normal    
Priority: P5 - low CC: katrin.fischer, paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7108
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7366    
Attachments: Bug 7644 - Invalid markup in staff client language chooser
[SIGNED-OFF] Bug 7644 - Invalid markup in staff client language chooser

Description Owen Leonard 2012-03-05 17:18:48 UTC
The language chooser which is displayed in the staff client if there are more than one translations enabled contains invalid markup:

<div id="changelanguage" class="ft">
    <ul id="i18nMenu" class="footermenu">
        <div class="lang">
           <li>English</li>
        </div>
        <div class="lang">
            <li><a href="/cgi-bin/koha/changelanguage.pl?language=fr-FR">Fran&ccedil;ais</a></li>
        </div>
    </ul>
</div>

It is not valid to wrap a <li> with a <div>. It would be better to find a valid way to constrict this so that "real" validation problems are easier to identify when testing.
Comment 1 Owen Leonard 2012-03-06 15:06:23 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-03-06 15:17:49 UTC
To test this patch fully one should apply the patch and then (re)install several translations (including at least two language variants like fr-FR and fr-CA). I tested with en, fr-FR, fr-CA, and de-DE enabled. The language chooser menu in the OPAC and staff client should both look and work as expected, and patch should not re-create Bug 7108. Running pages from the OPAC and staff client through a validator should not show errors related to the language chooser markup.
Comment 3 Katrin Fischer 2012-03-11 22:36:48 UTC
Created attachment 8167 [details] [review]
[SIGNED-OFF] Bug 7644 - Invalid markup in staff client language chooser

This patch removes invalid markup from the language chooser
in the intranet. It also copies the markup and style of
the staff client include to the OPAC so the two are
more consistent. I hope that will make future changes
and debugging a little easier.

I believe this patch also fixes Bug 7366, "Language chooser
display problems."

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes bug 7366, but there is still a difference between staff
and OPAC.
Installed languages: en, en-NZ, de-DE, fr-FR
Activated langauges: en, en-NZ, fr-FR
OPC shows English, staff shows en-NZ as label for the list.
Comment 4 Ian Walls 2012-03-14 14:22:21 UTC
Template and CSS only change. Produces valid HTML.  Marking as Passed QA.
Comment 5 Katrin Fischer 2012-04-09 16:26:40 UTC
Validator on master shows no more errors related to the language chooser. Choosing languages works nicely too.
Comment 6 Jared Camins-Esakov 2012-05-09 17:07:24 UTC
This bug will be included in the Koha 3.6.5 release.