Summary: | Can't choose languages if all choices are sublanguages | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | I18N/L10N | Assignee: | Bernardo Gonzalez Kriegel <bgkriegel> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | normal | ||
Priority: | P5 - low | CC: | bgkriegel, fridolin.somers, gmcharlt |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Small patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 5052 - Can't choose languages if all choices are sublanguage
[SIGNED-OFF] Bug 5052 - Can't choose languages if all choices are sublanguage Bug 5052 - Can't choose languages if all choices are sublanguage |
Description
Owen Leonard
2010-07-21 19:44:24 UTC
Still valid in master. Created attachment 26805 [details] [review] Bug 5052 - Can't choose languages 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. Created attachment 27040 [details] [review] [SIGNED-OFF] Bug 5052 - Can't choose languages 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> Created attachment 27126 [details] [review] Bug 5052 - Can't choose languages 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! Pushed to master. Thanks, Bernardo! Pushed to 3.14.x, will be in 3.14.10 |