[Bug 11225] New: \n in translation strings should be removed
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11225 Bug ID: 11225 Summary: \n in translation strings should be removed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr Some strings in the serials module contain linebreaks \n that cause problems in translation. Example: "Cannot test prediction pattern for the following reason(s):\\n \\n -- 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=11225 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Katrin, What is the problem? When I update the po file, I get: msgid "Cannot test prediction pattern for the following reason(s):\\n\\n" I update the translation: msgstr "TEST TRANSLATION\n\n" I install the templates and I get: alert(_("TEST TRANSLATION:\n\n") + error_msg); I don't know how we could add a new line without \n. -- 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=11225 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Jonathan, did you translate the string using pootle or did you do it manually in the text file? It used to be a bug in Pootle causing problems with escaping (bug 4883) An easy way to solve it, and also not have the confusing \n in translation is concatenating: _("Cannot test prediction pattern for the following reason(s):") + "\\n\\n" -- 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=11225 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 22880 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22880&action=edit Bug 11225: \n in translation strings should be removed Some strings in the serials module contain linebreaks \n that cause problems in translation. Test plan: - Update your po file - Verify that strings in serials/subscription-add.tt and serials/subscription-numberpatterns.tt are present and don't contain "\n" character. -- 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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #2)
Hi Jonathan,
did you translate the string using pootle or did you do it manually in the text file? It used to be a bug in Pootle causing problems with escaping (bug 4883)
Yes, manually!
An easy way to solve it, and also not have the confusing \n in translation is concatenating:
_("Cannot test prediction pattern for the following reason(s):") + "\\n\\n"
Yep, of course. I provided a patch fixing strings introduced by bug 7688 with this way. -- 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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=11225 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- This patch includes several extra parentheses: error_msg += _("- Frequency is not defined") + "\n"); <-- like that last one -- 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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- 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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22880|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 22934 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22934&action=edit Bug 11225: \n in translation strings should be removed Some strings in the serials module contain linebreaks \n that cause problems in translation. Test plan: - Update your po file - Verify that strings in serials/subscription-add.tt and serials/subscription-numberpatterns.tt are present and don't contain "\n" character. -- 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=11225 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |String patch -- 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=11225 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22934|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 23120 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23120&action=edit [SIGNED OFF] Bug 11225: \n in translation strings should be removed Some strings in the serials module contain linebreaks \n that cause problems in translation. Test plan: - Update your po file - Verify that strings in serials/subscription-add.tt and serials/subscription-numberpatterns.tt are present and don't contain "\n" character. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Template only change, passes all tests and QA script. Updated po files now contain only the strings and no line breaks. -- 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=11225 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=11225 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=11225 --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 23339 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23339&action=edit Bug 11225: \n in translation strings should be removed Some strings in the serials module contain linebreaks \n that cause problems in translation. Test plan: - Update your po file - Verify that strings in serials/subscription-add.tt and serials/subscription-numberpatterns.tt are present and don't contain "\n" character. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Template only change, passes all tests and QA script. Updated po files now contain only the strings and no line breaks. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> No regressions found. Passes koha-qa.pl and xt. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11225 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23120|0 |1 is obsolete| | CC| |gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11225 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11225 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #10 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patch pushed to 3.14.x, will be in 3.14.2 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org