]> git.koha-community.org Git - koha.git/commit
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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 2 Mar 2022 08:47:47 +0000 (22:47 -1000)
commitb6de822ad666a55ea5ea7ac984dd26941ec89162
tree819d14ce20c6e5133078b3d1c9ddedc342ad70f8
parentb95602fcfdc9249930b612084b45813e01ed7a0d
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>
C4/Serials.pm
t/db_dependent/Serials.t