]> git.koha-community.org Git - koha.git/commit
Bug 5052: make it possible to pick a language if all choices are sublanguage
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fri, 4 Apr 2014 01:37:09 +0000 (22:37 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 6 Aug 2014 09:15:39 +0000 (11:15 +0200)
commit269eb184e97652c48f8c04bdf512aaef421da5b8
tree2478754436b94e50771237e4157cf36dcb7ce3c3
parent7a9727fca4437b635946d910dca26dd2ce8e0f83
Bug 5052: make it possible to pick a language if all choices are sublanguage

This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.

This patch changes that condition to have more than one language
selected, grouped or not.

Also send $bidi value always, that was only sent if there is
more than one group language.

To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap

2. Go to Administration > System preferences > I18N
enable those languages on staff/opac

3. Check that language chooser is nowhere to be found

4. Apply the patch

5. Reload staff/opac, now you can see language chooser

NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c212b9328edd69a8e8f5082674a9f29741d159ee)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Templates.pm
koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc