Closed Bug 440550 Opened 16 years ago Closed 16 years ago

XML prologue in calendar-occurrence-prompt.dtd confuses compare-locales

Categories

(Calendar :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rimas, Assigned: sipaq)

References

()

Details

Attachments

(1 file)

The first line of calendar/locales/en-US/chrome/calendar/calendar-occurrence-prompt.dtd is an XML prologue, and it confuses compare-locales. 

This is the only file with such prologue, what makes me think it's there by mistake. I suggest to remove it.
Assignee: nobody → bugzilla
Severity: normal → minor
Status: NEW → ASSIGNED
Out of interest: How does it confuses compare-locales? 
From looking at e.g. <http://tinderbox.mozilla.org/Mozilla1.8-l10n-fr/> or <http://tinderbox.mozilla.org/Mozilla1.8-l10n-nb-NO/> it seems that compare-locales runs normally and tinderbox are green.
Stefan: it confuses the Python version of compare-locales, and tinderboxes run the Perl version. Here's the example Python version output:

rq@sugar:/usr/src/mozilla/trunk$ compare-locales -a calendar lt
lt/calendar/chrome/calendar
  .calendar.properties.swp
      // add and localize this file
  calendar-occurrence-prompt.dtd
      ERROR: Unparsed content "<?xml version="1.0" encoding="UTF-8"?>" at 0-38
      +_junk_1_0-38
lt:
keys: 643
unchanged: 187
changed: 4881
errors: 1
missing: 1
96% of entries changed
While removing that line is easy and works, I think compare-locales.py should be fixed instead, since the dtd file is valid xml.
Got a spec quote on that? I've never found a proper production for what a DTD file should be.
(In reply to comment #4)
> Got a spec quote on that? I've never found a proper production for what a DTD
> file should be.
> 

Sorry I've always assumed so since the "tags" used in the dtd are defined in the XML spec, but it seems its not necessarily  an XML file itself. Maybe I misread though, if you'd like to take a look, its defined here:
http://www.w3.org/TR/REC-xml/#dt-doctype

or maybe here:
http://www.w3.org/TR/REC-xml/#inliteral

In that case, I'd agree removing the xml declaration is the right way to go.
Attached patch Patch v1Splinter Review
Attachment #327677 - Flags: review?(philipp)
Attachment #327677 - Flags: review?(philipp) → review+
Patch checked into HEAD and MOZILLA_1_8_BRANCH.

Guys (localizers), if you do Q&A with the python version of compare-locales for your locale, you should mirror the change made in this bug in your locale!
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.9
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.