[Bug 42727] New: Languages displayed in random order in language menu
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Bug ID: 42727 Summary: Languages displayed in random order in language menu Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff interface Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39001 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39851 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 199736 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199736&action=edit Bug 42727: Add tests Patch from commit d77533b -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 199737 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199737&action=edit Bug 42727: List languages in a determinist order The list of languages are displayed in a random order in: * language picker at the bottom of the page * language tab when editing a notice template or an additional content This patch fixes it to display them in a determinist order Test plan: Have several languages installed, and some of them enabled, change the order of the languages in the syspref Reload the mainpage several times and notice that the languages are always displayed in the same order. Same when editing a notice template or an additional content. Note that I have not investigated yet why on the notice template and additinal content edit views they are not listed in the same order. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Reported by qa tool: Result: [FAIL] C4/Languages.pm FAIL pod_coverage sub _get_opac_language_dirs has no pod coverage. sub _get_intranet_language_dirs has no pod coverage. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Owen Leonard from comment #3)
Reported by qa tool:
Result: [FAIL] C4/Languages.pm FAIL pod_coverage sub _get_opac_language_dirs has no pod coverage. sub _get_intranet_language_dirs has no pod coverage.
The patches don't add new subs, they are false positive. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- Attempted to test, but it is unclear to me what to expect: - Order should match what is set in StaffInterfaceLanguages? - Language code order? - Alphabetical order? I would expect it should show in the same order you set in the system preference. My testing (using KTD): 0. No patches applied. 1. Install several languages: koha-translate --install de-DE --dev kohadev koha-translate --install fr-CA --dev kohadev koha-translate --install fr-FR --dev kohadev koha-translate --install es-ES --dev kohadev koha-translate --install mi-NZ --dev kohadev koha-translate --install pt-BR --dev kohadev koha-translate --install pt-PT --dev kohadev 2. Restart everything: restart_all 3. Go to Administration > System preferences > I18/L10 4. Enable the languages for StaffInterfaceLanguages 5. As per the test plan, turn some off, and rearrange. 6. Language footer in the staff interface home page: - Note the order shown for the languages in the staff interface home page footer - Should match the order in the system preference - Refreshing the page, logging out, logging in: stays the same - After patches: no change 7. Notices (Tools > Patrons and circulation > Notices and slips): - Enable the TranslateNotices system preference - Go to any notice and edit - Order doesn't match the system preference - Hard refresh the page, order doesn't change - Note, also shows tabs for languages not selected - After patches: no change, not in alphabetical order, not in language code order 8. Additional contents (Tools > Additional tools > Pages > New entry): - Order doesn't match the system preference - Hard refresh the page, order changes - Note, also shows tabs for languages not selected - After patches: in language code order, stays the same, but doesn't match system preference 9. Note: After applying the patches I cleared the browser cache and did a restart_all -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Hi David, In the notice templates and additional contents edit views, we list all the languages installed. In the footer, we list all the languages enabled. The main goal of the patch was to prevent the randomness, but I will see if I can improve a bit more. I guess we can move the languages that are not enabled at the end of the list. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200624&action=edit Bug 42727: Sort using the order from the staff syspref The main goal of the previous patch was to prevent the randomness, the languages were displayed by code. The languages in the footer are the languages enabled for the staff interface. This patch suggests to use the order of the syspref, and append the languages not enabled at the end of the list. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org