Summary: | \n in translation strings should be removed | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | I18N/L10N | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, fridolin.somers, gmcharlt, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7688 | ||
Change sponsored?: | --- | Patch complexity: | String patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Attachments: |
Bug 11225: \n in translation strings should be removed
Bug 11225: \n in translation strings should be removed [SIGNED OFF] Bug 11225: \n in translation strings should be removed Bug 11225: \n in translation strings should be removed |
Description
Katrin Fischer
2013-11-09 19:30:59 UTC
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. 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" Created attachment 22880 [details] [review] 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. (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. This patch includes several extra parentheses: error_msg += _("- Frequency is not defined") + "\n"); <-- like that last one Created attachment 22934 [details] [review] 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. Created attachment 23120 [details] [review] [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. Created attachment 23339 [details] [review] 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. Pushed to master. Thanks, Jonathan! Patch pushed to 3.14.x, will be in 3.14.2 |