[zanata-bugs] [Bug 740122] Make \n in source text visible in the translation editor

bugzilla at redhat.com bugzilla at redhat.com
Fri Oct 14 08:01:07 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=740122

Sean Flanigan <sflaniga at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Flag|needinfo?(sflaniga at redhat.c |
                   |om)                         |

--- Comment #9 from Sean Flanigan <sflaniga at redhat.com> 2011-10-14 04:01:06 EDT ---
No specific prior demand from the UI side, it's just that any PO reading
library has to handle escape characters properly, and that usually involves
converting \n to newline when loading.  To convert it back to \n for the editor
would actually be extra work for us, and we haven't had any demand for that
before now.

BTW, this is not a deviation from gettext.  The two characters "\n" in a PO
file encode a newline.  If you read it with standard gettext (eg the C function
"gettext()"), you get a newline, not a backslash and an n.

In other words, by the time we see the string in Zanata, it's already a
newline.   We can represent it in the editor however you like, but the more
complex we get, the longer it will take, so I suggest we start with something
simple.


As mentioned by a couple of translators here:
  http://blog.transifex.net/2010/04/agile-project-development/
not every translator wants to worry about Gettext escaping rules.

Not every document in Zanata is a PO document anyway.  Escaping is different in
gettext, in Properties and in XLIFF.


We could certainly look at implementing a feature to escape newlines/tabs/etc
when when opening a message for editing, and back again when saving, but this
will need more testing to make sure the escaping is always correct.  And it
would probably be best to make it optional because of the points above.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the zanata-bugs mailing list