Closed
Bug 1503708
Opened 7 years ago
Closed 7 years ago
Parse empty <string> nodes in strings.xml as empty strings
Categories
(Localization Infrastructure and Tools :: compare-locales, defect)
Localization Infrastructure and Tools
compare-locales
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mathjazz, Assigned: Pike)
Details
Attachments
(1 file)
Empty <string> nodes in strings.xml files are parsed as Entities with the entire node markup as their value. Instead, the value should be an empty string.
Steps to reproduce:
Run this script:
> from compare_locales import parser
> p = parser.getParser("strings.xml")
>
> p.readUnicode("""<?xml version="1.0" encoding="utf-8"?>
> <resources>
> <string name="Empty Translation"></string>
> </resources>
> """)
>
> list(p.parse())[0].unwrap()
Expected result:
> u''
Actual result:
> u'<string name="Empty Translation"/>'
| Assignee | ||
Updated•7 years ago
|
Assignee: nobody → l10n
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
This landed as https://hg.mozilla.org/l10n/compare-locales/rev/3ac8b87205be.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 3•7 years ago
|
||
https://hg.mozilla.org/l10n/compare-locales/rev/55e26cac05814f64ba4fc7659c1eda1c1d7849a3 landed as follow-up, I still had a check that forbid empty strings in checks.
You need to log in
before you can comment on or make changes to this bug.
Description
•