Description
Hugo Agud
2018-04-03 15:10:46 UTC
I can confirm this behaviour on master. Hi All, I confirm this is still the case. Test plan: 0- Make sure you have at least one language other than English installed 1- With staff interface in English, create a subscription with a seasonal numbering pattern and frequency, with locale in your other language 2- Check the prediction pattern, note that the season names are in English not the locale language 3- Change the staff interface to other language, redo the prediction pattern test with locale in other language, note that the season names are in other language Created attachment 130751 [details] [review] Bug 20511: Make seasons translatable in prediction pattern The season is stored in the DB in English and but not translated when displayed on the interface. This patch will translate the different seasons and their short form ('Spr' for 'Spring'). Test plan: Update the PO of the language you like Edit po/xx-XX-messages.po and translate the season names Setup a new language and use it for the staff interface Create a new subscription using the "Seasonal" subscription pattern Generate new serial items and confirm that the seasons are correctly translated when displayed Sponsored-by: Orex Digital (In reply to Jonathan Druart from comment #3) > Generate new serial items and confirm that the seasons are correctly > translated when displayed Where will this information appear? (In reply to Owen Leonard from comment #4) > (In reply to Jonathan Druart from comment #3) > > > Generate new serial items and confirm that the seasons are correctly > > translated when displayed > > Where will this information appear? You should see the season translated everywhere it's displayed (not when it appears in an input however). So on the catalogue/detail.pl tab "Subscriptions", or the subscription detail view (/serials/subscription-detail.pl?subscriptionid=1) You need to: gulp po:update --lang es-ES cd misc/translate Edit po/es-ES-messages.po, translate the season names ./translate install es-ES restart_all (strings are cached) I a trying to test into sandbox, but i have no way of updating po. I have seen that If I the pattern include to season like spring-summer, it only translates one of two. sample Número Fecha de publicación Vol. Primavera, Number Summer, Issue 0 04/01/2022 Vol. Verano, Number Fall, Issue 1 07/01/2022 Vol. Otoño, Number Winter, Issue 2 10/01/2022 Vol. Winter, Number Primavera, Issue 3 01/01/2023 (In reply to Hugo Agud from comment #6) > I a trying to test into sandbox, but i have no way of updating po. > > I have seen that If I the pattern include to season like spring-summer, it > only translates one of two. > > sample > Número Fecha de publicación > Vol. Primavera, Number Summer, Issue 0 04/01/2022 > Vol. Verano, Number Fall, Issue 1 07/01/2022 > Vol. Otoño, Number Winter, Issue 2 10/01/2022 > Vol. Winter, Number Primavera, Issue 3 01/01/2023 How did you generate that? On which page? Hi Pattern offer you the chance of define {x}, {y} , {z}... it is often use only one season, but there are certain serials that will need two season patter number: springer-summer, winter-auttum for example. when use season two times in the same pattern, koha it only translate one, perhaps it also happens with the rest of days, months...etc (In reply to Hugo Agud from comment #8) > Hi > > Pattern offer you the chance of define {x}, {y} , {z}... it is often use > only one season, but there are certain serials that will need two season > patter > > number: springer-summer, winter-auttum for example. > > when use season two times in the same pattern, koha it only translate one, > perhaps it also happens with the rest of days, months...etc I don't recreate the problem. Please post a screenshot of: 1. The "Numbering patterns" edit view /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=modify&id=XXX 2. The view where you are seeing the problem Created attachment 133107 [details] [review] Bug 20511: Remove translation support for short version of season Everything get messy when we translate "Sum", then "Summer" as it's a substring. Hum, may have found a bug however. This patch should fix a weirdness in translation. url: https://staff-bug20511.sandboxes.biblibre.eu/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=1 screenshot: https://orex.es/wp-content/uploads/2022/04/Captura-de-pantalla-2022-04-08-a-las-13.00.39.png but I still have no way of accessing to .po, sorry Yes, it should work if "Summer" is translated in the po file. Created attachment 135504 [details] [review] Bug 20511: Make seasons translatable in prediction pattern The season is stored in the DB in English and but not translated when displayed on the interface. This patch will translate the different seasons and their short form ('Spr' for 'Spring'). Test plan: Update the PO of the language you like Edit po/xx-XX-messages.po and translate the season names Setup a new language and use it for the staff interface Create a new subscription using the "Seasonal" subscription pattern Generate new serial items and confirm that the seasons are correctly translated when displayed Sponsored-by: Orex Digital Created attachment 135505 [details] [review] Bug 20511: Remove translation support for short version of season Everything get messy when we translate "Sum", then "Summer" as it's a substring. Created attachment 135775 [details] [review] Bug 13614: Compiled CSS Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 135776 [details] [review] Bug 20511: Make seasons translatable in prediction pattern The season is stored in the DB in English and but not translated when displayed on the interface. This patch will translate the different seasons and their short form ('Spr' for 'Spring'). Test plan: Update the PO of the language you like Edit po/xx-XX-messages.po and translate the season names Setup a new language and use it for the staff interface Create a new subscription using the "Seasonal" subscription pattern Generate new serial items and confirm that the seasons are correctly translated when displayed Sponsored-by: Orex Digital Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> Created attachment 135777 [details] [review] Bug 20511: Remove translation support for short version of season Everything get messy when we translate "Sum", then "Summer" as it's a substring. Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> Comment on attachment 135775 [details] [review] Bug 13614: Compiled CSS Apologies, not sure how that one sneaked in there I am a little worried by the patch comments: >Remove translation support for short version of season >The season is stored in the DB in English and but not translated when >displayed on the interface. I am not sure if that is correct? If a translated GUI is used, you will have created a string (serialseq I tihnk) using the numberpattern that contains the translation of the season. Will this still work as before after the patches? (In reply to Katrin Fischer from comment #20) > I am a little worried by the patch comments: > > >Remove translation support for short version of season > > >The season is stored in the DB in English and but not translated when > >displayed on the interface. > > I am not sure if that is correct? > > If a translated GUI is used, you will have created a string (serialseq I > tihnk) using the numberpattern that contains the translation of the season. > > Will this still work as before after the patches? The only thing this patch is doing is to translate the season names (stored in serialseq) in the language of the interface. If you have "Summer" and you browse in French, you will see "Été" instead. No data in DB is modified. The short versions are not supported, "Sum" will not be translatable. Could you please rebase? Created attachment 138684 [details] [review] Bug 20511: Make seasons translatable in prediction pattern The season is stored in the DB in English and but not translated when displayed on the interface. This patch will translate the different seasons and their short form ('Spr' for 'Spring'). Test plan: Update the PO of the language you like Edit po/xx-XX-messages.po and translate the season names Setup a new language and use it for the staff interface Create a new subscription using the "Seasonal" subscription pattern Generate new serial items and confirm that the seasons are correctly translated when displayed Sponsored-by: Orex Digital Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> Created attachment 138685 [details] [review] Bug 20511: Remove translation support for short version of season Everything get messy when we translate "Sum", then "Summer" as it's a substring. Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> Hm, I think think this doesn't fix what was reported as the bug initially: comment#1 The seasonal (season, day and month) prediction it doesn't change according the locale defined in the patterns, the pattern uses always the language of the staff user interface. I believe that the expectation here is that it should work like months/day of week do. You should be able to use the Locale setting of the subscription to determine the language used for the generated strings, so that it matches with what is printed on the issue. These are not meant to be multi-lingual, but to match the 'original' printed version. What this patch does is actually the bug: It makes the description switch depending on the GUI language used. Before this patch (tested in 20.11): Staff interface: German Locale: German Preview pattern: German Serial collection: German Edit serials: English OPAC: English Database: English With this patch set: Staff interface: *English* Locale: Spanish Preview pattern: English Serial collection: English Edit serials: English OPAC: English Database: English Update translations, switch interface to German: Staff interface: *German* Locale: Spanish Preview pattern: German Subscription detail view: German Serial collection German Edit serials: English (!) (input fields) Database: English Staff detail view: German Late issues/claims: German OPAC detail page - Subscription: English OPAC brief history: English Full history: English Conclusion: 1) This makes the display more consistent in the staff interface. OPAC has been missed and should work the same as staff. 2) Locale setting is ignored for seasons. This makes seasons work different to the other formatted strings. This doesn't sit well with me, because it's also an inconsistency, but I am not sure there is a fix as I believe the library used for other strings just doesn't support seasons. :( If we agree on the different behavior we should document it. Suggestion: Extend the hint below the Locale pull down by: "Not used for seasons." 3) Removing the limited support for abbreviated seasons is a little issue. We can hardly remove the setting if libraries have used it, but is it really useful if it works only for English? A compromise could be to add a hint to the entry in the formatting pull down: "Name of season (abbreviated, English)" What could help here in the future would be a feature to define your own "formatted strings" as a list of authorised values (thought I had filed that... but can't find it). Codes would be numerical, AV would be the string used and we could use them to extend the list of available formats. I had requests for Roman numbering and we could also imagine someone wanting to do Japanese numbering or similar. This could help solve that issue. (I'll file later if people like it :) ) |