In “Manage Numbering Pattern” (in Serials), we have the possibility to test a pattern with a specified locale. This works well for days and months (as their translations are handled by DateTime()), but it doesn't work for seasons and their abbreviations. To reproduce the bug: **I recommend using the "English" version of the staff interface, as the translation for the prediction pattern with the staff interface locale doesn't work well (see issues 20511 and 24172).** 1) Navigate to “Serials > Manage numbering patterns” and click on the “Edit” button for the “Seasonal” pattern. 2) Under “Test prediction pattern”: - Set “First issue publication date” to today's date. - Set “Subscription length” to “issues” and input “4”. - Choose a language different from the one used in the staff interface for “Locale” (so any language except English). - Set “Begins with” to 0 (for X) and 2023 (for Y). 3) Click on the “Test pattern” button. - Observe that the season names are still displayed in English. 4) In the first section of the page, within the table, change “Formatting” to “Name of season (abbreviated)”. 5) Click on the “Test pattern” button. - Observe that the season names are still displayed in English. 6) Navigate to a record detail page and click on "+ New" and then "New subscription". 7) Click on the “Next ->” button and then “OK”. 8) 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” (so any language except English). - Set “Begins with” to 0 (for Season) and 2023 (for Year). 9) Click on the “Test pattern” button. - Observe that the season names are still displayed in English.
Created attachment 159981 [details] [review] 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
Created attachment 159982 [details] [review] 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
Created attachment 160003 [details] [review] 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
Created attachment 160004 [details] [review] 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
Created attachment 161272 [details] [review] 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 Signed-off-by: Sheila <s.abouhabib@ifporient.org>
Created attachment 169441 [details] [review] 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
Created attachment 170119 [details] [review] 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
Created attachment 171032 [details] [review] 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
During the 2025 Hackathon KohaLA, we tested this patch. It works well in every part of the test plan (1-10). We're from three different french libraries.
Created attachment 176562 [details] Screenshot of the patch's result Hello, from Hackathon KohaLA France 2025, I join here a screenshot, which shows the result of the patch on the serials planning. We can see that locale language chosen matches the season language in Prediction Pattern.
Created attachment 176563 [details] Warning about limits of the patch test However, we see that the patch seems to work. During the Hackathon we want to go further and we try to receive issues. And the results weren't what we expected. As we can see on the screenshot in the column ‘Number’ we only have the year, the season doesn't appear. We want to warn about the eventuality of the patch could not work well with serials reception.