Bug 27490

Summary: Rename system preference language to StaffInterfaceLanguages
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: System AdministrationAssignee: Doris Tam <doristam>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: david, doristam, gmcharlt, isobel.graham09, jonathan.druart, lucas, martin.renvoize, nicolas.hunstein, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement renames the 'language' system preference to 'StaffInterfaceLanguages', to make the name clearer and more meaningful.
Version(s) released in:
24.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 10327    
Attachments: Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages
Bug 27490: (follow-up) Fix custom installer files

Description Aleisha Amohia 2021-01-20 03:49:11 UTC
find all of the places in the code that refer to the 'language' system preference and rename them to 'StaffInterfaceLanguage'
write an atomic update to rename the language system preference to StaffInterfaceLanguage in the preferences table in the database
rename the language syspref in sysprefs.sql

refer to bug 10328 for an example
Comment 1 Aleisha Amohia 2021-01-20 04:00:07 UTC
instead of StaffInterfaceLanguage, make that StaffInterfaceLanguages
Comment 2 Koha Training Catalyst 2024-07-25 23:52:37 UTC
Created attachment 169631 [details] [review]
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'

Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'
Comment 3 David Nind 2024-07-26 02:03:27 UTC
Hi.

Everything works as per the test plan.

However, I tried with another language (de-DE) installed:
- Before the patch, I can switch languages in the staff interface.
- After the path, I can't switch languages. When trying to switch the language, the language didn't change and remained in English. (The OPAC worked correctly.)

In addition, to get credit on the dashboard (https://dashboard.koha-community.org/), and to be listed as a Koha developer on the Koha timeline page, I think the assignee for the bug needs updating.

I've changed the status to Failed QA 8-(

David

Testing notes (using koha-testing-docker (KTD)):
1. Apply the patch.
2. Update the database: updatedatabase
3. As per the test plan
4. To install another language:
   . koha-translate --install de-DE --dev kohadev
   . restart_all (not sure if this is really required)
   . enable the language: StaffInterfaceLanguages
Comment 4 Aleisha Amohia 2024-07-29 02:26:45 UTC
Created attachment 169805 [details] [review]
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages
Comment 5 David Nind 2024-07-31 20:28:50 UTC
Created attachment 169914 [details] [review]
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'

Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2024-07-31 20:28:53 UTC
Created attachment 169915 [details] [review]
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2024-09-02 09:17:55 UTC
I believe this is a good change, but we are missing a few occurences:

installer/data/mysql/localization/de-DE/custom.sql:UPDATE systempreferences SET value = 'de-DE,en' WHERE variable = 'language';
installer/data/mysql/localization/fr-CA/custom.sql:UPDATE systempreferences SET value = 'fr-CA,en' WHERE variable = 'language';
installer/data/mysql/localization/fr-FR/custom.sql:UPDATE systempreferences SET value = 'fr-FR' WHERE variable = 'language';
installer/data/mysql/localization/it-IT/custom.sql:UPDATE systempreferences SET value = 'en,it-IT' WHERE variable = 'language';
installer/data/mysql/localization/nb-NO/custom.sql:UPDATE systempreferences SET value = 'nb-NO' WHERE variable = 'language';
installer/data/mysql/localization/ru-RU/custom.sql:UPDATE systempreferences SET value = 'ru-RU,uk-UA,en,fr-FR,de-DE' WHERE variable = 'language';
Comment 8 Katrin Fischer 2024-09-02 09:18:34 UTC
I believe this was a Catathon patch - please let us know if you need help with the follow-up or someone to jump in here!
Comment 9 Doris Tam 2024-09-02 22:08:42 UTC
(In reply to Katrin Fischer from comment #8)
> I believe this was a Catathon patch - please let us know if you need help
> with the follow-up or someone to jump in here!

Yes, please feel free to follow up and jump in on fixing up this patch. It was a Catathon patch and I no longer have a Koha environment to continue :)
Comment 10 Katrin Fischer 2024-09-03 09:48:04 UTC
Created attachment 170965 [details] [review]
Bug 27490: Update systempreference 'language' to 'StaffInterfaceLanguages'

Test plan

1. Go to the staff client
2. Go to administration
3. Search systempreferences for 'StaffInterfaceLanguages'
4. Ensure there is a systempreference variable matching 'StaffInterfaceLanguages'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Comment 11 Katrin Fischer 2024-09-03 09:48:06 UTC
Created attachment 170966 [details] [review]
Bug 27490: More instances of changing language syspref to StaffInterfaceLanguages

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nicolas Hunstein <nicolas.hunstein@bsz-bw.de>
Comment 12 Katrin Fischer 2024-09-03 09:48:09 UTC
Created attachment 170967 [details] [review]
Bug 27490: (follow-up) Fix custom installer files
Comment 13 Martin Renvoize (ashimema) 2024-09-03 15:19:41 UTC
Follow-up looks great, thanks Katrin
Comment 14 Katrin Fischer 2024-09-03 16:00:36 UTC
(In reply to Martin Renvoize from comment #13)
> Follow-up looks great, thanks Katrin

Wasn't me :) Thanks Nicolas!
Comment 15 Katrin Fischer 2024-09-13 11:58:14 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 16 Jonathan Druart 2024-11-07 09:52:07 UTC
misc4dev needed adjustments, see https://gitlab.com/koha-community/koha-misc4dev/-/issues/80