Bug 1097091
Summary: | "\n" isn't escaped properly for translation in screen elements | ||||||
---|---|---|---|---|---|---|---|
Product: | [Community] Publican | Reporter: | Lee Newson <lnewson> | ||||
Component: | publican | Assignee: | Jeff Fearn 🐞 <jfearn> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Lopes <mlopes> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 4.1 | CC: | aigao, ddomingo, lnewson, rlandman, slong | ||||
Target Milestone: | 4.2 | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | 4.2.0 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-09-01 03:40:30 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
This is now in the .pot file: msgid "" "\n" "#!/usr/bin/python\n" "FINDME\n" "import os\n" "import sys\n" "if os.environ.has_key('key1'):\n" "sys.stderr.write('key1 value was : %s\\n' % os.environ['key1'])\n" "else:\n" "sys.exit(0)" msgstr "" So %s\\n looks good, but because I'm not familiar with .pot files, Lee can you confirm that the changed msgid "" "\n" from msgid "\n" is ok? Without the xml source I can't say for sure, but it looks fine (the reason is the white space is gone and there is the "FINDME" text now). Setting to VERIFIED. And oops to fully answer Summer's question, the difference in the first line of the msgid is fine. Hi, the show/hide tags where removed by the designer for UX reasons. (In reply to Jeff Fearn from comment #7) > Hi, the show/hide tags where removed by the designer for UX reasons. Error 13: Idiot at keyboard. wrong bug! A fix for this shipped in Publican 4.2.0. |
Created attachment 895017 [details] Simple example to reproduce the issue If the XML contains an element such as: <screen> #!/usr/bin/python import os import sys if os.environ.has_key('key1'): sys.stderr.write('key1 value was : %s\n' % os.environ['key1']) else: sys.exit(0) </screen> then the "\n" text isn't escaped to "\\n" and the msgid in the pot file is: msgid "\n" "#!/usr/bin/python\n" "\n" "import os\n" "import sys\n" "\n" "if os.environ.has_key('key1'):\n" " sys.stderr.write('key1 value was : %s\n" "' % os.environ['key1'])\n" "else:\n" " sys.exit(0)\n" "" This means that the string will likely be translated incorrectly such that the "\n" text will actually be a new line.