Bug 9772 - Display Norwegian chars correctly in the patron category dropdown
authorMagnus Enger <magnus@enger.priv.no>
Fri, 8 Mar 2013 16:12:33 +0000 (17:12 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 20 Mar 2013 12:02:52 +0000 (08:02 -0400)
To reproduce:
- Install Norwegian translation
- Run through the web installer in Norwegian, and make sure you choose
  the optionl ("2-Valgfritt") patron_categories.sql data
- Log in and visit the "Patrons" page
- The dropdown should contain black diamonds with question marks instead
  of the Norwegian chars æøå

To test
- Apply the patch to the situation above
- Check the dropdown again - æøå should be displayed
- If you want to check with other interface languages than Norwegian,
  remember to re-install the nb-NO translation after the patch has been
  applied

This feels slightly like curing the symptom instead of the disease,
alternative patches are welcome!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I agree that this doesn't seem like a broad enough solution, but it
doesn't do any harm to apply an incomplete fix as long as the underlying
problem can be followed up on. Note that this problem isn't specific to
Norwegian, but doesn't happen with all non-basic characters.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I tested with German umlauts and the Norwegian characters given
on the bug report and problem went away after applying the patch.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc

index 374d388..8d36da3 100644 (file)
@@ -4,7 +4,7 @@
         <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New patron <span class="caret"></span></button>
             <ul class="dropdown-menu">
                 [% IF ( AddPatronLists_categorycode ) %]
-                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description %]</a></li>[% END %]
+                    [% FOREACH categorie IN categories %]<li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;categorycode=[% categorie.categorycode %]">[% categorie.description | html_entity %]</a></li>[% END %]
                 [% ELSE %]
                     <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=A">Adult patron</a></li>
                     <li><a href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;category_type=C">Child patron</a></li>
@@ -16,4 +16,4 @@
             </ul>
     </div>
 </div>
-[% END %]
\ No newline at end of file
+[% END %]