[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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- ping? This would be helpful for the screenshot for the manual, especially thise one: https://koha-manual-screenshots-wip.koha-community.org/images/addnews It's flagged as "needs revalidation" because the tabs changed. -- 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 ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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 ---------------------------------------------------------------------------- Attachment #199736|0 |1 is obsolete| | Attachment #199737|0 |1 is obsolete| | Attachment #200624|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 204186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204186&action=edit Bug 42727: Add tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 204187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204187&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. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 204188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204188&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. Signed-off-by: David Nind <david@davidnind.com> -- 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 ---------------------------------------------------------------------------- Text to go in the| |This fixes how language release notes| |selectors/tabs are shown in | |the staff interface for | |notices and slips and | |additional contents (such | |as news and customizations) | |- now shown in a consistent | |order, and removes the | |"randomness" when pages are | |refreshed: | | | |1. For the staff interface | |footer: shows enabled | |languages in the order | |shown in the | |StaffInterfaceLanguages | |system preference. | | | |2. For notices and slips | |(with TranslateNotices | |system preference enabled) | |the language tabs are now | |shown in this order: | |Default, English, then all | |languages installed in | |language code order (de-DE, | |fr-CA, fr-FR, pt-BR, pt-PT, | |...) (notes: not in the | |order shown in the | |StaffInterfaceLanguages | |system preference, shows | |all installed languages - | |not just enabled | |languages). | | | |3. For additional contents | |(news, HTML customizations, | |...) the language tabs are | |now shown in this order: | |Default, all enabled | |languages in the order | |shown in the | |StaffInterfaceLanguages | |system preference, then | |languages not enabled at | |the end (note: if there is | |more than one language code | |for a language installed | |(such as fr-CA and fr-FR) | |but one is not enabled, the | |languages are grouped | |together - the language not | |enabled doesn't go to the | |end). --- Comment #12 from David Nind <david@davidnind.com> --- I've re-tested - see comment #5 for the languages I installed. I've signed off, as it prevents the randomness. That is, things now show consistently (even though there are differences between how languages are shown in the notices and additional contents). This is the behavour that I get: 1. For the staff interface footer - as expected: before and after the patches, the order is the order of the StaffInterfaceLanguages system preference, with languages not enabled not shown. 2. For the additional contents (news, HTML customizations, ...): 2.1 Order after the patches is the order shown in the StaffInterfaceLanguages system preference, with languages not enabled at the end 2.2 There is a wrinkle with this though: . If there is more than one language code for a language installed, such as fr-CA (enabled) and fr-FR (not enabled), and only one is enabled: ==> They appear in the order shown in the system preference, in the above case fr-FR doesn't go to the end, it is after fr-CA 3. For notices and slips (with TranslateNotices enabled): 3.1 In language code order (de-DE, es_ES, ...) with English always first after the "Default" tab. 3.2 Doesn't matter if the language is enabled or not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #204186|0 |1 is obsolete| | Attachment #204187|0 |1 is obsolete| | Attachment #204188|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #13 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 204241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204241&action=edit Bug 42727: Add tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #14 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 204242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204242&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. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #15 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 204243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204243&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. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #16 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to David Nind from comment #12)
2. For the additional contents (news, HTML customizations, ...): 2.1 Order after the patches is the order shown in the StaffInterfaceLanguages system preference, with languages not enabled at the end 2.2 There is a wrinkle with this though: . If there is more than one language code for a language installed, such as fr-CA (enabled) and fr-FR (not enabled), and only one is enabled: ==> They appear in the order shown in the system preference, in the above case fr-FR doesn't go to the end, it is after fr-CA I think this largely makes sense, the consistency here does enough to simplify editing - if we are seeing the same order everytime we can knwo what to expect
3. For notices and slips (with TranslateNotices enabled): 3.1 In language code order (de-DE, es_ES, ...) with English always first after the "Default" tab. 3.2 Doesn't matter if the language is enabled or not.
I actually find it follows the OPACLanguages preference order with disabled ones at the end - consistency being better here I can let this go unless Jonathan wants to fix or Pedro doesn't approve - there is some sense in that the OPAC and notices are sent to patrons, so the same order may make sense -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42727 --- Comment #17 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org