[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #58643] ITS - Double escapes when merging translations back to XML
From: |
Samy Mahmoudi |
Subject: |
[bug #58643] ITS - Double escapes when merging translations back to XML |
Date: |
Mon, 22 Jun 2020 13:31:51 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; FreeBSD amd64; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?58643>
Summary: ITS - Double escapes when merging translations back
to XML
Project: GNU gettext
Submitted by: samy_mahmoudi
Submitted on: lun. 22 juin 2020 17:31:49 UTC
Category: XML
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hi all,
In the second use-case of XML internationalization (as described in 16.1.6.1:
https://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html),
special characters in the extracted strings should be escaped when they are
merged back, and they are indeed escaped as intended.
However, when extracting strings from the original XML document, escaped
special characters are not unescaped. I doubt that this is the intended
behavior.
For example, <short>foo & bar</short> (in the original XML document) with
a //short translateRule selector (ITS) successively becomes:
msgid "foo & bar" (in gnu.po, before translation)
msgstr ""
msgid "foo & bar"
msgstr "jed & zvd" (in gnu.po, after translation into the GNU
language...)
<short>foo & bar</short>
<short xml:lang="gnu">jed &amp; zvd</short> (in the merged XML)
Would xgettext rather unescape special characters when extracting strings from
original XML documents ? Or at least optionally for this use-case ?
In addition to avoiding double escapes in the merged XML document, unescaping
special characters when extracting strings from original XML documents would
also increase readability in the translation process, since msgid "foo &
bar" is less readable than msgid "foo & bar".
Best regards,
Samy Mahmoudi
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: lun. 22 juin 2020 17:31:49 UTC Name: compiz.loc Size: 179o By:
samy_mahmoudi
.its and .loc files
<http://savannah.gnu.org/bugs/download.php?file_id=49348>
-------------------------------------------------------
Date: lun. 22 juin 2020 17:31:49 UTC Name: compiz.its Size: 573o By:
samy_mahmoudi
.its and .loc files
<http://savannah.gnu.org/bugs/download.php?file_id=49349>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58643>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
- [bug #58643] ITS - Double escapes when merging translations back to XML,
Samy Mahmoudi <=
- [bug #58643] ITS - Double escapes when merging translations back to XML, Bruno Haible, 2020/06/23
- [bug #58643] ITS - Double escapes when merging translations back to XML, Bruno Haible, 2020/06/23
- [bug #58643] ITS - Double escapes when merging translations back to XML, Bruno Haible, 2020/06/24
- [bug #58643] ITS - Double escapes when merging translations back to XML, Daiki Ueno, 2020/06/24
- [bug #58643] ITS - Double escapes when merging translations back to XML, Samy Mahmoudi, 2020/06/24
- [bug #58643] ITS - Double escapes when merging translations back to XML, Samy Mahmoudi, 2020/06/24
- [bug #58643] ITS - Double escapes when merging translations back to XML, Daiki Ueno, 2020/06/28
- [bug #58643] ITS - Double escapes when merging translations back to XML, Samy Mahmoudi, 2020/06/28
- [bug #58643] ITS - Double escapes when merging translations back to XML, Samy Mahmoudi, 2020/06/28
- [bug #58643] ITS - Double escapes when merging translations back to XML, Samy Mahmoudi, 2020/06/29