[Koha-bugs] [Bug 35590] Add the translation of seasonal predictions for a chosen locale

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 19 14:54:39 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35590

Emily-Rose Francoeur <emily-rose.francoeur at inLibro.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #160003|0                           |1
        is obsolete|                            |

--- Comment #4 from Emily-Rose Francoeur <emily-rose.francoeur at inLibro.com> ---
Created attachment 160004
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160004&action=edit
Bug 35590: Translate the seasons when testing the numbering pattern with a
selected locale

This patch allows you to test a numbering pattern that uses seasons or their
abbreviations with the locale of your choice. Since DateTime() cannot handle
translations for seasons, the patch relies on the translations in the .po
files. Therefore, you need to have the .po file installed if you want to test
this patch.

TEST PLAN

Prequisites:
Install the .po files for at least one language other than the one used in your
staff interface (these files should be added to the misc/translator/po/
folder). Ensure that translations for seasons (Spring, Summer, Fall, and
Winter) and their abbreviations (Spr, Sum, Fal, and Win) exist (these should be
in the *-staff-prog.po). In my case, I use the .po files for French Canadian
translations (fr-CA) because the translations for seasons and their
abbreviations already exist.

1) Apply the patch.
2) Navigate to "Serials > Manage numbering patterns" and click on the "Edit"
button for the "Seasonal" pattern.
3) Under "Test prediction pattern":
    - Set "First issue publication date" to today's date.
    - Set "Subscription length" to "issues" and input "4".
    - Choose the language you previously installed for "Locale" (in my case,
it's "Français (French)").
    - Set "Begins with" to 0 (for X) and 2023 (for Y).
4) Click on the "Test pattern" button.
    - Observe that the season names are displayed in the other language
("Printemps Été Automne Hiver" for me).
5) In the first section of the page, within the table, change "Formatting" to
"Name of season (abbreviated)".
6) Click on the "Test pattern" button.
    - Observe that the season abbreviated names are displayed in the other
language ("Pri Été Aut Hiv" for me).
7) Navigate to a record detail page and click on "+ New" and then "New
subscription".
8) Click on the "Next ->" button and then "OK".
9) Fill in the following fields:
    - Set "First issue publication date" to today's date.
    - Set "Frequency" to your preference.
    - Set "Subscription length" to "issues" and input "4".
    - Set "Subscription start date" to today's date.
    - Select "Seasonal" for "Numbering pattern".
    - Choose a language different from the one used in the staff interface for
"Locale" (any language except English).
    - Set "Begins with" to 0 (for Season) and 2023 (for Year).
10) Click on the "Test pattern" button.
    - Observe that the season names are displayed in the other language
("Printemps Été Automne Hiver" for me).
11) Run the unit tests for Serials and GetNextSeq
    - prove ./t/db_dependent/Serials.t
    - prove ./t/db_dependent/Serials/GetNextSeq.t

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list