Created attachment 22990 [details] screenshot showing locale selection The locale setting offers you a lot of cryptic choices according to the locales installed on your system. I can imagine that on some servers this list coudl grow even longer.
I think this could turn into some kind of bigger problem if you have multiple instances from different countries on one server - the list is already very long with 2 languages (de* and en*).
Created attachment 23032 [details] [review] Bug 11263: locale setting is not user friendly The locales list for subscriptions should not be retrieve from the locales of the system. This patch retrieves the locales list from the Koha DB (in the same way as pref language and opaclanguages). Test plan: Edit a subscription (or a numbering pattern) and verify the list of languages is the same as languages available in Koha. Note: with this patch we loose the saeson translation, it is normal. See report linked.
It works... almost :( 710 [% IF l.language == locale.language %] But correct parameter is locale, not locale.language Changing that line to 710 [% IF l.language == locale %] and then works
(In reply to Bernardo Gonzalez Kriegel from comment #3) > Changing that line to On line 710 of koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt If not, selected locale is not show, as in 11265. My test was on top of Bug 11265.
Created attachment 23128 [details] [review] Bug 11263: locale setting is not user friendly The locales list for subscriptions should not be retrieve from the locales of the system. This patch retrieves the locales list from the Koha DB (in the same way as pref language and opaclanguages). Test plan: Edit a subscription (or a numbering pattern) and verify the list of languages is the same as languages available in Koha. Note: with this patch we loose the saeson translation, it is normal. See report linked.
Created attachment 23131 [details] [review] [SIGNED-OFF] Bug 11263: locale setting is not user friendly The locales list for subscriptions should not be retrieve from the locales of the system. This patch retrieves the locales list from the Koha DB (in the same way as pref language and opaclanguages). Test plan: Edit a subscription (or a numbering pattern) and verify the list of languages is the same as languages available in Koha. Note: with this patch we loose the saeson translation, it is normal. See report linked. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. New locale is retrieved from installed languages. I wonder if that list can be restricted to 'enabled' ones (parsing syspref language value).
>New locale is retrieved from installed languages. >I wonder if that list can be restricted to >'enabled' ones (parsing syspref language value). I think listing all installed languages is ok here. I can imagine a library not wanting to enable all the installed languages they want to use for serials. Apart from that I still think this could be a good candidate for an authorized value or a small table. Installing languages takes time, updates are often forgotten when you don't actually use them etc. And it would allow for entering "custom" seasons, like abbreviated versions, fall instead of autumn etc. If we had a pref/tool wherepeople can change it, this could also allow to have other custom patterns.
(In reply to Katrin Fischer from comment #7) > Apart from that I still think this could be a good candidate for an > authorized value or a small table. Installing languages takes time, updates > are often forgotten when you don't actually use them etc. And it would allow > for entering "custom" seasons, like abbreviated versions, fall instead of > autumn etc. > If we had a pref/tool wherepeople can change it, this could also allow to > have other custom patterns. Agreed -- I'm not a big fan of relying on system locales for getting month and day names (with the exception of considering their use for command-line utilities, since one would be logged into the server anyway), for several reasons: - it creates an extra point of breakage for the naive user - they can't be customized - since they don't cover seasons, currently only English and French are supported for season names. A mechanism that would allow the user to set season names would be trivial to extend to month and day names.
Created attachment 23472 [details] [review] [PASSED QA] Bug 11263: locale setting is not user friendly The locales list for subscriptions should not be retrieve from the locales of the system. This patch retrieves the locales list from the Koha DB (in the same way as pref language and opaclanguages). Test plan: Edit a subscription (or a numbering pattern) and verify the list of languages is the same as languages available in Koha. Note: with this patch we loose the saeson translation, it is normal. See report linked. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors. New locale is retrieved from installed languages. I wonder if that list can be restricted to 'enabled' ones (parsing syspref language value). Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes QA script and all tests. Works according to description.
I am a bit worried about the consequences of this change, requiring to install templates, that won't be used apart from creating the list. How could we improve this? Using code similar to how we generate the list of searchable languages in advanced search maybe? Using a system preference? Still going to pass this as this looks like an improvement to me.
(In reply to Katrin Fischer from comment #10) > I am a bit worried about the consequences of this change, requiring > to install templates, that won't be used apart from creating the list. > How could we improve this? Using code similar to how we generate > the list of searchable languages in advanced search maybe? Using a system > preference? > Still going to pass this as this looks like an improvement to me. Katrin, I used translated languages in order to avoid the long list. But maybe you are right. I am submitting a new followup for getting all languages (as the adv search).
Created attachment 23478 [details] [review] Bug 11263: Use all languages instead of translated only. This patch produces the same dropdown list as the one in the adv search. With this way, it won't be necessary to install additional templates to fill the locale list. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Jonathan!