Bug 30035 - Wrong month name in numbering pattern
Summary: Wrong month name in numbering pattern
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-07 08:49 UTC by Jonathan Druart
Modified: 2022-04-17 20:09 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Text to go in the release notes:
Sponsored-by: Orex Digital
Version(s) released in:
22.05.00,21.11.04,21.05.14


Attachments
Bug 30035: Fix month name in prediction pattern (3.38 KB, patch)
2022-02-07 08:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30035: Fix month name in prediction pattern (3.44 KB, patch)
2022-02-19 20:40 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30035: Fix month name in prediction pattern (3.49 KB, patch)
2022-02-25 13:19 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30035: Fix failing test (927 bytes, patch)
2022-03-04 07:48 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-02-07 08:49:48 UTC
In some languages (at least Catalan) the display for "month name" in the numbering pattern is wrong.
For January for instance we use "de gener" when it should be "gener".
Comment 1 Jonathan Druart 2022-02-07 08:50:52 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).
Comment 2 Katrin Fischer 2022-02-19 20:40:32 UTC
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>
Comment 3 Nick Clemens 2022-02-25 13:19:36 UTC
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>
Comment 4 Fridolin Somers 2022-03-02 08:49:10 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 5 Fridolin Somers 2022-03-03 20:57:11 UTC
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.
Comment 6 Jonathan Druart 2022-03-04 07:48:55 UTC
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
Comment 7 Kyle M Hall 2022-03-04 13:33:12 UTC
Pushed to 21.11.x for 21.11.04
Comment 8 Fridolin Somers 2022-03-04 18:49:44 UTC
Patch " Bug 30035: Fix failing test" pushed to master.

I see it is already in 21.11.x
Comment 9 Andrew Fuerste-Henry 2022-04-15 17:50:28 UTC
Pushed to 21.05.x for 21.05.14
Comment 10 Victor Grousset/tuxayo 2022-04-17 20:09:03 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.