[Bug 11262] New: Don't require hardcoded translations for saisonal numbering pattern to work
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bug ID: 11262 Summary: Don't require hardcoded translations for saisonal numbering pattern to work Change sponsored?: --- Product: Koha Version: 3.14 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=C4/Serials.pm;hb=7... Currently the translations for seasons are hardcoded into the .pm file. We need an interface to allow people to define their translations. Maybe we could use authorized values or another completely new table. For 3.14 I will be working on a patch to add German translations, but we need to do this a nicer way long term for people not able to go into the code and change things or provide patches. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11261 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|11261 |7688 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11264 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #1 from Liz Rea <liz@catalyst.net.nz> --- I think this should be a blocker for 3.16 - these terms should be translatable through the regular translation methods. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- *** Bug 11264 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Depends on| |11263 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 23035 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23035&action=edit Bug 11262: saeson, month name and day name are not translatable with the right way This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |bgkriegel@gmail.com --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Sorry, but this patch was generated on top of Bug 11264, which will never be in master :( On line 2693 of your C4/Serials.pm is "de"=> [qw(Frühling Sommer Herbst Winter)], -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- I tested it anyway, on top of Bug 11265 and (fixed) Bug 11263, after resolve conflict with 11264 Good and bad news: good) No need to translate, English seasons are already on PO files bad) Your strings are not translated. They need to be between HTML tags. For example on line 61 of koha-tmpl/intranet-tmpl/prog/en/modules/serials/showpredictionpattern.tt 61 Spring[% matches.join("") %] is ignored by translate script. If you change that to 61 <span>Spring</span>[% matches.join("") %] then is translated. Sorry again -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Bernardo Gonzalez Kriegel from comment #5)
bad) Your strings are not translated. They need to be between HTML tags.
I will submit a new patch.
then is translated.
Sorry again
No worries. Thanks for testing! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23035|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 23129 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23129&action=edit Bug 11262: saeson, month name and day name are not translatable with the right way This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Jonathan, I made a huge mistake in my test. Your first patch is correct. If you don't mind I'll obsolete the second and get back the first. Tested it well and works. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23035|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23129|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23035|0 |1 is obsolete| | --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 23135 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23135&action=edit [SIGNED-OFF] Bug 11262: saeson, month name and day name are not translatable with the right way This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors Tested on top of Bug 11265 and Bug 11263, and solved merge conflict Updating PO file gives seasons to translate. Tested using seasons, day and month Only note is different behavior 1) To use seasons you need to use staff in desired language 2) To use day and month only need to select locale -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Summary|Don't require hardcoded |Don't require hardcoded |translations for saisonal |translations for seasonal |numbering pattern to work |numbering pattern to work -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23135|0 |1 is obsolete| | --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 23338 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23338&action=edit Bug 11262 - Don't require hardcoded translations for seasonal numbering pattern to work This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors Tested on top of Bug 11265 and Bug 11263, and solved merge conflict Updating PO file gives seasons to translate. Tested using seasons, day and month Only note is different behavior 1) To use seasons you need to use staff in desired language 2) To use day and month only need to select locale Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> No regressions found. Passes koha-qa.pl, t and xt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23338|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 23473 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23473&action=edit [PASSED QA] Bug 11262 - Don't require hardcoded translations for seasonal numbering pattern to work This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors Tested on top of Bug 11265 and Bug 11263, and solved merge conflict Updating PO file gives seasons to translate. Tested using seasons, day and month Only note is different behavior 1) To use seasons you need to use staff in desired language 2) To use day and month only need to select locale Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> No regressions found. Passes koha-qa.pl, t and xt Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested this again on top of 11263 and it works as described. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'd like this a bit better if selecting 'seasonal' would deactivate the 'locale' option so there is no confusion. Or a bit more simple: add a hint to the locale that it won't work with seasonal currently. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Bug 11262 depends on bug 7688, which changed state. Bug 7688 Summary: Change subscriptions numbering pattern and frequencies http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7688 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11262 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #13 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org