The language chooser displays languages in a different order when the page is refresh. It should stick to the same order. A default order can depend on the pref values.
Created attachment 71094 [details] [review] Bug 20115: Set the languages order with the pref values To avoid the languages to be ordered randomly, it is better to stick on a default order. Let's suppose that the order in the pref is correct.
Created attachment 71095 [details] [review] Bug 20115: Make the prefs sortable If we depend on the order, we should make it sortable. I let the customization to someone else (we would need an icon to tell the user it's sortable). Something does not work here: If fr-FR and fr-CA is installed, but only 1 is ticked, it will be considered as last. I do not think it's a blocker as it does not make really make sense to have it installed but not used (the interface is also weird, there is a dropdown list with only 1 entry)
Created attachment 71096 [details] [review] Bug 20115: Trigger "modified" when sort is changed
*** Bug 20094 has been marked as a duplicate of this bug. ***
Is there a test plan for this? I loaded en-NZ and de-DE translations onto my Kohadevbox but the order still seems pretty random (its different between the staff and the OPAC for example, even after doing a restart_all and refreshing both web pages). Or is it random because the sorting in the syspref isn't written yet? Is that part of this bug (in which case it can't be signed off really) or should it be considered as a separate bug that this one depends on?
I retest and everything looks ok. You need to 1. Install the patch 2. Install or update new languages, for instance: sudo koha-translate --install en-NZ --dev kohadev sudo koha-translate --install fr-FR --dev kohadev sudo koha-translate --install es-ES --dev kohadev 3. Restart all (memcached, plack) Test plan: Search for "language" in the I18N/L10N syspref section and tick/untick and reorder the values as you wish. On the OPAC and staff interfaces you should see the languages displayed with the same order as the pref, and preserved from one reload to the other
Works as described on the staff client side but the order on the opac side remains unchanged regardless of the order of languages set.
Created attachment 71661 [details] [review] Bug 20115: Remove sort on rfc4646_subtag in OPAC templates
(In reply to Dilan Johnpullé from comment #7) > Works as described on the staff client side but the order on the opac side > remains unchanged regardless of the order of languages set. True, good catch Dilan. There was another sort in the template, I removed it.
Hi Jonathan I've tested the patch again and the OPAC appears to still be displaying language options completely randomly. I have attempted restarting plack and emptying my cache to no avail.
Created attachment 73027 [details] [review] Bug 20115: Set the languages order with the pref values To avoid the languages to be ordered randomly, it is better to stick on a default order. Let's suppose that the order in the pref is correct. Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Created attachment 73028 [details] [review] Bug 20115: Make the prefs sortable If we depend on the order, we should make it sortable. I let the customization to someone else (we would need an icon to tell the user it's sortable). Something does not work here: If fr-FR and fr-CA is installed, but only 1 is ticked, it will be considered as last. I do not think it's a blocker as it does not make really make sense to have it installed but not used (the interface is also weird, there is a dropdown list with only 1 entry) Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Created attachment 73029 [details] [review] Bug 20115: Trigger "modified" when sort is changed Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Created attachment 73030 [details] [review] Bug 20115: Remove sort on rfc4646_subtag in OPAC templates Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Jonathan, it's great feature and works perfectly. Just one small thing: I think that the ability to sort (and the information that the sorted system preference matter) should be descriped on system preference.
Created attachment 73433 [details] [review] Bug 20115: Add information about this feature in the pref descriptions I guess a native English speaker will have a better wording :)
Created attachment 73610 [details] [review] Bug 20115: Set the languages order with the pref values To avoid the languages to be ordered randomly, it is better to stick on a default order. Let's suppose that the order in the pref is correct. Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 73611 [details] [review] Bug 20115: Make the prefs sortable If we depend on the order, we should make it sortable. I let the customization to someone else (we would need an icon to tell the user it's sortable). Something does not work here: If fr-FR and fr-CA is installed, but only 1 is ticked, it will be considered as last. I do not think it's a blocker as it does not make really make sense to have it installed but not used (the interface is also weird, there is a dropdown list with only 1 entry) Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 73612 [details] [review] Bug 20115: Trigger "modified" when sort is changed Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 73613 [details] [review] Bug 20115: Remove sort on rfc4646_subtag in OPAC templates Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 73614 [details] [review] Bug 20115: Add information about this feature in the pref descriptions I guess a native English speaker will have a better wording :) Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Pushed to master for 18.05, thanks to everybody involved!