Closed
Bug 1015535
Opened 11 years ago
Closed 11 years ago
Comment nodes shouldn't be considered for translation
Categories
(Firefox :: Translations, defect)
Firefox
Translations
Tracking
()
VERIFIED
FIXED
Firefox 32
People
(Reporter: Felipe, Assigned: Felipe)
References
Details
(Whiteboard: [translation] p=1 s=it-32c-31a-30b.2 [qa-])
Attachments
(1 file)
1.79 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Comment nodes are nsGenericDOMDataNodes with textual content, so they were returning true for HasTextForTranslation, but that should be obviously false. (More generally, any non-text node).
This was not causing any problems in the translation itself, and they are already replaced with placeholders in a later step of the process. However, it causes otherwise-empty nodes to be unnecessarily considered for translation. E.g:
<div><!-- Comment --></div>
Which would be sent to the translation service as "<div><br></div>", while it doesn't need to be sent at all.
Attachment #8428193 -
Flags: review?(bugs)
Flags: firefox-backlog+
Assignee | ||
Updated•11 years ago
|
Comment 1•11 years ago
|
||
Comment on attachment 8428193 [details] [diff] [review]
Comment nodes shouldn't be considered for translation
Hmm, this is a bit too strict.
CDATA nodes are filtered out.
So
CDATA_SECTION_NODE
if (NodeType() != nsIDOMNode::TEXT_NODE && NodeType() != nsIDOMNode::CDATA_SECTION_NOD) {
Attachment #8428193 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 2•11 years ago
|
||
Assignee | ||
Comment 3•11 years ago
|
||
Marco, please add this bug to the current iteration
Whiteboard: [translation] p=1 [qa-]
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(mmucci)
Comment 4•11 years ago
|
||
Added to Iteration 32.2
Flags: needinfo?(mmucci)
Whiteboard: [translation] p=1 [qa-] → [translation] p=1 s=it-32c-31a-30b.2 [qa-]
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•