Summary: | Wrong month name in numbering pattern | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Serials | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, hagud, kyle, victor |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | Sponsored | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Sponsored-by: Orex Digital
|
Version(s) released in: |
22.05.00,21.11.04,21.05.14
|
Circulation function: | |||
Attachments: |
Bug 30035: Fix month name in prediction pattern
Bug 30035: Fix month name in prediction pattern Bug 30035: Fix month name in prediction pattern Bug 30035: Fix failing test |
Description
Jonathan Druart
2022-02-07 08:49:48 UTC
Created attachment 130206 [details] [review] Bug 30035: Fix month name in prediction pattern We are using %B to display the month name but it seems that using the CLDR pattern LLLL would be more appropriated. https://metacpan.org/pod/DateTime#CLDR-Patterns %B - The full month name. LLLL - The wide stand-alone form for the month. For instance in Catalan: https://metacpan.org/pod/DateTime::Locale::ca %B will display "de gener" when LLLL will be "gener" Test plan: Create a new numbering pattern: Home > Serials > Numbering patterns > New numbering pattern Numbering formula: {X} Label: monthname Add: 1 Every: 1 Set back to: 1 When more than: 999 Formatting: Name of month And test it at the bottom of the form Locale: Catalan The number column should contain "gener", not "de gener" Test other locales and confirm that the output is correct (no change expected for English, French and Spanish for instance). Created attachment 130913 [details] [review] Bug 30035: Fix month name in prediction pattern We are using %B to display the month name but it seems that using the CLDR pattern LLLL would be more appropriated. https://metacpan.org/pod/DateTime#CLDR-Patterns %B - The full month name. LLLL - The wide stand-alone form for the month. For instance in Catalan: https://metacpan.org/pod/DateTime::Locale::ca %B will display "de gener" when LLLL will be "gener" Test plan: Create a new numbering pattern: Home > Serials > Numbering patterns > New numbering pattern Numbering formula: {X} Label: monthname Add: 1 Every: 1 Set back to: 1 When more than: 999 Formatting: Name of month And test it at the bottom of the form Locale: Catalan The number column should contain "gener", not "de gener" Test other locales and confirm that the output is correct (no change expected for English, French and Spanish for instance). Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 131120 [details] [review] Bug 30035: Fix month name in prediction pattern We are using %B to display the month name but it seems that using the CLDR pattern LLLL would be more appropriated. https://metacpan.org/pod/DateTime#CLDR-Patterns %B - The full month name. LLLL - The wide stand-alone form for the month. For instance in Catalan: https://metacpan.org/pod/DateTime::Locale::ca %B will display "de gener" when LLLL will be "gener" Test plan: Create a new numbering pattern: Home > Serials > Numbering patterns > New numbering pattern Numbering formula: {X} Label: monthname Add: 1 Every: 1 Set back to: 1 When more than: 999 Formatting: Name of month And test it at the bottom of the form Locale: Catalan The number column should contain "gener", not "de gener" Test other locales and confirm that the output is correct (no change expected for English, French and Spanish for instance). Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 22.05, thanks to everybody involved [U+1F984] Unit test in t/db_dependent/Serials.t fails in Jenkins for D9 D10 U18 U20. 01:00:42.317 koha_1 | # Failed test at t/db_dependent/Serials.t line 469. 01:00:42.317 koha_1 | # got: 'ene.' 01:00:42.317 koha_1 | # expected: 'ene' 01:00:42.317 koha_1 | # Looks like you failed 1 test of 6. Created attachment 131370 [details] [review] Bug 30035: Fix failing test Looks like there was a change in the output for Spanish. Can be 'ene.' in older versions Sponsored-by: Orex Digital Pushed to 21.11.x for 21.11.04 Patch " Bug 30035: Fix failing test" pushed to master. I see it is already in 21.11.x Pushed to 21.05.x for 21.05.14 Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. Hi, since two months this is causing a regression on t/db_dependent/Serials.t on only Ubuntu 16.04. I can reproduce locally. Since it's minor I might just revert it if we don't have a clue about this [U+1F615] https://jenkins.koha-community.org/view/21.05/job/Koha_21.05_U16/198/consoleText root@kohadevbox:koha((5b38309...))$ prove t/db_dependent/Serials.t t/db_dependent/Serials.t .. 33/50 # Failed test at t/db_dependent/Serials.t line 468. # got: 'gen.' # expected: 'de gen.' # Looks like you failed 1 test of 6. # Failed test '_numeration' # at t/db_dependent/Serials.t line 473. # Looks like you failed 1 test of 50. t/db_dependent/Serials.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/50 subtests Test Summary Report ------------------- t/db_dependent/Serials.t (Wstat: 256 Tests: 50 Failed: 1) Failed test: 50 Non-zero exit status: 1 Files=1, Tests=50, 4 wallclock secs ( 0.05 usr 0.01 sys + 3.57 cusr 0.31 csys = 3.94 CPU) Result: FAIL Reverted from 21.05.x to fix Ubuntu 16.04 *** Bug 26347 has been marked as a duplicate of this bug. *** I didn't notice that Ubuntu 16.04 is end of life since 2021-04-30 I can reintroduce this patch it if needed. |