[Bug 4883] New: Problem translating \n (newline) with pootle.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 Summary: Problem translating \n (newline) with pootle. Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P5 Component: I18N/L10N AssignedTo: chris@bigballofwax.co.nz ReportedBy: katrin.fischer@bsz-bw.de QAContact: koha-bugs@lists.koha-community.org CC: frederic@tamil.fr Estimated Hours: 0.0 Created attachment 2235 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2235 pootle screenshot There is a problem with \n (newline) and pootle. At the moment there is no possibility to translate \n (newline) with pootle. I think newlines and tabs might be also confusing for new translators. An example: Pootle shows: (see screenshot) - Budget amount cannot be blank\n - Etatsumme darf nicht leer sein\n -------------------- po file: \\n #. SCRIPT #: /home/katrin/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl:84 msgid "- Budget amount cannot be blank\\n" msgstr "- Etatsumme darf nicht leer sein\\n" -------------------- Poedit: - Budget amount cannot be blank\\n - Etatsumme darf nicht leer sein\\n I think the best solution is to removes tabs, newlines etc. from strings that need translation. \\n does not work and is shown behind the translated text as \\n. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I talked to Chris and changed my mind about the best solution: tmpl_process3.pl needs to remove them, when it creates the po file. (23:10:59) chris: ie, you dont translate them (23:11:13) chris: so they dont need to be in the string (23:11:37) kf: but if you remove them, how will they get back in? (23:11:51) chris: the po file works like this (23:12:00) chris: it takes the english line, finds that in the template (23:12:16) chris: and switches out the english words for the translated words (23:12:24) kf: ah, so you work around the rest of the template (23:12:27) chris: if you dont have the \n in the english (23:12:45) chris: then it will find the words without them and change them .. and the \n will stay just fine in the template (23:12:53) chris: make sense? (23:13:17) chris: its actually better that way, cos then if you have the string twice, once with \n once without (23:13:25) chris: you now only need to translate it once (23:13:35) kf: sounds really better (23:13:53) kf: im done with opac ( removing..) but they are really a lot of them in inranet (23:17:10) chris: problem is, they will all come back -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #2 from Frédéric Demians <frederic@tamil.fr> ---
tmpl_process3.pl needs to remove them, when it creates the po file.
There are several difficulties : - tmpl_process3.pl is a black box very complex to improve. The way it parse is tricky and un-extensible (for me). Whatever, if templates are switched from HTML::Template to Template::Toolkit, .po generation will have to be entirely recoded. - Carriage return inside text is error prone for translator. It should be forbidden. It mixes text with formating which should be avoided at all. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Frederic, thx for looking into this.
- Carriage return inside text is error prone for translator. It should be forbidden. It mixes text with formating which should be avoided at all.
I have a tested patch ready for OPAC that I can send later. Intranet will take a bit more work, but if you think it makes sense to remove them I can work on that. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 2249 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2249 patch: remove \n from opac files -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 2250 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=2250 patch. remove \n from staff files -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #6 from Galen Charlton <gmcharlt@gmail.com> --- Patches pushed. Please test and close. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Tested successfully, closing bug. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org