Bug 30035: Fix month name in prediction pattern
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 7 Feb 2022 08:26:12 +0000 (09:26 +0100)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 4 Mar 2022 13:29:43 +0000 (08:29 -0500)
commit93c33c527fdbfad0f46bc26a6b3496cba7d02fbb
tree36c1461f897c34924593b45a4678abe2385b2a81
parent74382c321c16348919f83f63e505dea93239c2ca
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>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Serials.pm
t/db_dependent/Serials.t