Closed Bug 205198 Opened 23 years ago Closed 19 years ago

Entity missed on Glossary update

Categories

(Mozilla Localizations Graveyard :: MozillaTranslator, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ciopz, Assigned: rpmdisguise-nave)

Details

Attachments

(2 files)

Mozilla Translator 5.02 fails to fetch one entity from the p3p/p3p.dtd file of Mozilla 1.4beta. The incriminated entity is "nbsp". Once the Glossary is tried to be updated from this file (conventionally living in en-US.jar), all the strings (entities) in the same file are added to the MT internal database, except for "nbsp", which results totally missing from the Chrome view. I can't explain in any way this behavior, since the (dtd) file looks ok, syntactically and at binary level (no strange values). We have a quite uncommon commenting block after the usual legal disclaimer (another XML comment). Nothing very fancy to my untrained eye.
The file attached can be found at http://lxr.mozilla.org/seamonkey/source/extensions/p3p/resources/locale/en-US/p3p.dtd here is the problematic snapshot.
Synptoms have changed, but current situation is not yet perfect.
Assignee: henrik → rpmdisguise-otros
The offending line in p3p.dtd is this: <!ENTITY nbsp "&#160;"> but MozillaTranslator exports it with what I think is the UTF-8 two byte sequence for that character. In hexadecimal, it looks like C2A0. I'm not sure if there is actually a solution, and I neither know if current behaviour is acceptable. Anyone can tell me about this latter one?
Status: NEW → ASSIGNED
(In reply to comment #3) > The offending line in p3p.dtd is this: > > <!ENTITY nbsp "&#160;"> > > but MozillaTranslator exports it with what I think is the UTF-8 two byte > sequence for that character. In hexadecimal, it looks like C2A0. > > I'm not sure if there is actually a solution, and I neither know if current > behavior is acceptable. Anyone can tell me about this latter one? > I've debugged step-by-step the import of this file (p3p.dtd), and it's the SAX parser the one making the conversion, so I guess it's correct. Anyone against closing this bug?
the only way to close this bug is as WONTFIX, and that means MT produces broken language packs. i think DTD files are simple enough to write a custom parser for them, especially if you want to support l10n comments. if we do that, we can overcome this bug.
(In reply to comment #5) > the only way to close this bug is as WONTFIX, and that means MT produces broken > language packs. Are you sure that assimilating "&#160;" as the UTF-8 representation of that entity in a UTF-8 encoded file breaks something? I'm not completely sure (that's why I'm asking for opinions), but I'd say that it doesn't break anything. Just to make it clear, right now the entity nbsp IS imported and appears in MT's Chrome View. It is just that, instead the numeric representation, the real UTF-8 character is shown. > i think DTD files are simple enough to write a custom parser for them, > especially if you want to support l10n comments. if we do that, we can > overcome this bug. Actually, I'm pretty sure I'm not going to face any problem with the SAX parser to deal with localization notes (the same event I'm using to parse license blocks allows me to deal with localization notes). I'd rather not write something that has been already written many times by better programmers than me, unless we're absolutely sure that existing implementations are all broken (which I highly doubt).
(In reply to comment #6) > (In reply to comment #5) > > the only way to close this bug is as WONTFIX, and that means MT produces broken > > language packs. > > > Are you sure that assimilating "&#160;" as the UTF-8 representation of that > entity in a UTF-8 encoded file breaks something? I'm not completely sure > (that's why I'm asking for opinions), but I'd say that it doesn't break > anything. > > Just to make it clear, right now the entity nbsp IS imported and appears in > MT's Chrome View. It is just that, instead the numeric representation, the real > UTF-8 character is shown. > oh, i didn't know that. last time i checked the entity was not present in the translation. >
This is how MozillaTranslator exports right now the translated version of p3p.dtd.
OS: Windows 98 → All
i think this bug can safely be closed. the file produced works, even if it's not exactly how the original file is.
(In reply to comment #9) > i think this bug can safely be closed. the file produced works, even if it's > not exactly how the original file is. > Ok, marking as FIXED. I hope other bugs will follow soon. :-)
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Mozilla Localizations → Mozilla Localizations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: