Closed Bug 736167 Opened 12 years ago Closed 12 years ago

The validator should not show an error when there are <name> elements in <localized> sections

Categories

(addons.mozilla.org Graveyard :: Add-on Validation, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jorgev, Unassigned)

Details

(Whiteboard: [ReviewTeam])

These 2 validation results are good examples of this problem:
https://addons.mozilla.org/developers/addon/zorcher/validation-result/103396
https://addons.mozilla.org/en-US/developers/addon/gio-hyip-analysis/validation-result/103434

These add-ons don't have an <em:name> node in the root of the tree, but they do have the node set for each <em:localized> section, which is enough for it to work correctly.

The validation should only show the error if there's no main <em:name> element AND not <em:name> elements in <em:localized> sections.
<em:name> should be required, though (as it says in the spec: https://developer.mozilla.org/en/Install_Manifests#name). <em:localized> might not be specified for a user's locale, meaning the name would be undefined. <em:localized> also doesn't require <em:name>, so the name can become undefined for a user if the user's locale's <em:localized> element doesn't contain a name.

<em:name> should probably always be specified and contain the name of the add-on as it would be written in the locale that the add-on was created in (or for).
I tested with Zorcher by removing the en-US localized section, and there's only one situation were the lack of a name is evident. That is when the popup from the identity box tells you the add-on has finished being installed and you need to restart Firefox. In that case the popup says null instead of the name. In all other cases, Firefox appears to be using the name it extracted from the AMO data ping, so it is correct.

Given this, I think we should not show a hard error, just a warning.
(In reply to Jorge Villalobos [:jorgev] from comment #2)
> only one situation were the lack of a name is evident. That is when the
> popup from the identity box tells you the add-on has finished being
> installed and you need to restart Firefox. In that case the popup says null
> instead of the name. 

Can you file a bug on this?

> In all other cases, Firefox appears to be using the
> name it extracted from the AMO data ping, so it is correct.

Assuming that fetching data from AMO is enabled.

I'd feel much better keeping this as a hard error at least until the Add-ons Manager better supports that scenario. At the moment it "works" (doesn't break) because we just try hard never to fail, but it doesn't explicitly support it.
(In reply to Blair McBride (:Unfocused) from comment #3)
> Can you file a bug on this?

Bug 737446.

> I'd feel much better keeping this as a hard error at least until the Add-ons
> Manager better supports that scenario. At the moment it "works" (doesn't
> break) because we just try hard never to fail, but it doesn't explicitly
> support it.

Alright then, let's not do this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.