While writing the patch for 11264 I tried a few things with the new locale setting. There are 2 notable problems: 1) When you explicitly pick a locale it is save to the database correctly, but when you edit the subscription later, the pull down is shown empty. 2) It didn't detect my system locale correctly. I am not sure if I am missing an additional thing in the code? After applying 11264 and picking de-DE explicitly the season names show in German. But if I don't pick the locale, the season names are in English. I can't test this with French right now, maybe someone else can? That's the result of running locale on my system: LANG=de_DE.UTF-8 LANGUAGE=de_DE:en LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL=
Created attachment 23023 [details] [review] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected
(In reply to Katrin Fischer from comment #0) > While writing the patch for 11264 I tried a few things with the new locale > setting. There are 2 notable problems: > > 1) When you explicitly pick a locale it is save to the database correctly, > but when you edit the subscription later, the pull down is shown empty. Should be fix by the patch. > 2) It didn't detect my system locale correctly. I am not sure if I am > missing an additional thing in the code? In fact Apache does not export the system locales. A workaround would be to export the needed value in the Apache conf: SetEnv LC_TIME 'LANG.utf8' (with LANG is fr_FR or de_DE, etc.)
Depending on the server locale is a bit worrying to me. Is it possible to investigate other ways here? Like having a system preference list or an authorized value? When Apache doesn't support locales, then this can never have worked. Maybe we should remove the hint from the template in that case.
Created attachment 23026 [details] [review] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected 4/ do the same on editing a numbering pattern (serials/subscription-numberpatterns.pl?op=modify&id=XX)
(In reply to Katrin Fischer from comment #3) > Depending on the server locale is a bit worrying to me. Is it possible to > investigate other ways here? Like having a system preference list or an > authorized value? > > When Apache doesn't support locales, then this can never have worked. Maybe > we should remove the hint from the template in that case. I will propose another way on another bug.
Created attachment 23029 [details] [review] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected 4/ do the same on editing a numbering pattern (serials/subscription-numberpatterns.pl?op=modify&id=XX)
Created attachment 23031 [details] [review] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected
The 4th step in the test plan was wrong.
Created attachment 23125 [details] [review] [SIGNED-OFF] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. Tested creating a suscription, selecting locale (have many) and saving. When editing suscription: 1) Without patch locale value is not showed on page, empty value 2) With patch correct value is displayed
Created attachment 23126 [details] [review] [PASSED QA] Bug 11265: the locale value is not selected on editing a subscription Test plan: 0/ you have to have some locales defined, run dpkg-reconfigure locales to configure locales 1/ edit a subscription (or add a new one) and select a locale 2/ save 3/ edit again and verify the locale value is selected Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. Tested creating a suscription, selecting locale (have many) and saving. When editing suscription: 1) Without patch locale value is not showed on page, empty value 2) With patch correct value is displayed Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Template change only. Works as expected - saved locale is now shown on editing the subscription and will not be deleted upon saving.
Pushed to master. Thanks, Jonathan!
This patch has been pushed to 3.14.x, will be in 3.14.1