Bug 39350

Summary: The language switch is not displayed at the bottom of ERM module pages
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: ERMAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: david, dcook, jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
This restores the language selector at the bottom of the pages for the ERM and preservation modules.
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 38664    
Bug Blocks:    
Attachments: Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module
Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module
Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module

Description Mathieu Saby 2025-03-16 19:56:01 UTC
If the staff interface is available in several language, a langage switch is displayed at the bottom ok Koha's page (id=i18nMenu).
It is not displayed at the bottom of ERM pages
Comment 1 Jonathan Druart 2025-03-17 08:43:16 UTC
Created attachment 179379 [details] [review]
Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module

ERM and Preservation modules have lost the language selector during the
tidy work.
There has been a closing div added to the "home" files, which broke the
HTML structure.

Test plan:
Have more than one language selected for StaffInterfaceLanguages.
Go to the ERM and Preservation module and confirm that with this patch
applied the language selector menu is displayed.
Comment 2 David Nind 2025-03-18 03:05:45 UTC
This works as per the test plan.

However:
- the language selector is displayed on the ERM and preservation module pages only if the language selected is English.
- if you change the language, say to Deutsch, the language selector is no longer shown on the ERM and preservation module pages.

Steps to replicate (with the patch applied):
1. Apply the patch.
2. Rebuild things: yarn install
3. Enable the ERM and preservation modules - set these system preferences to "Enable":
   - ERMModule
   - PreservationModule
4. Install a language: koha-translate --install de-DE --dev kohadev
5. Restart everything: restart_all
6. Enable the language installed in the StaffInterfaceLanguages system preference.
7. Check that the language selector (English Deutsch) is visible at the bottom of these pages:
   - Home page
   - ERM module page
   - Preservation module page
8. Change the language.
9. Repeat step 7 and note that the language selector is only visible on the home page.
Comment 3 Jonathan Druart 2025-03-18 08:36:16 UTC
It is working for me. Could you try `yarn js:build` at step 2 (instead of `yarn install`).

`install` won't regenerate the assets, only install the node modules (in the node_modules directory)
Comment 4 David Nind 2025-03-18 10:09:37 UTC
(In reply to Jonathan Druart from comment #3)
> It is working for me. Could you try `yarn js:build` at step 2 (instead of
> `yarn install`).
> 
> `install` won't regenerate the assets, only install the node modules (in the
> node_modules directory)

Thanks Jonathan, that did the trick!

Sign off on the way.
Comment 5 David Nind 2025-03-18 10:10:07 UTC
Created attachment 179427 [details] [review]
Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module

ERM and Preservation modules have lost the language selector during the
tidy work.
There has been a closing div added to the "home" files, which broke the
HTML structure.

Test plan:
Have more than one language selected for StaffInterfaceLanguages.
Go to the ERM and Preservation module and confirm that with this patch
applied the language selector menu is displayed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Martin Renvoize (ashimema) 2025-04-02 07:39:25 UTC
Created attachment 180242 [details] [review]
Bug 39350: (bug 38664 follow-up) Restore language selector for Vue.js module

ERM and Preservation modules have lost the language selector during the
tidy work.
There has been a closing div added to the "home" files, which broke the
HTML structure.

Test plan:
Have more than one language selected for StaffInterfaceLanguages.
Go to the ERM and Preservation module and confirm that with this patch
applied the language selector menu is displayed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 7 Katrin Fischer 2025-04-11 07:56:12 UTC
Pushed for 25.05!

Well done everyone, thank you!