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)

defect
Not set
normal

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: nobody → l10n
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: