Closed
Bug 386322
Opened 17 years ago
Closed 17 years ago
Localized metadata fails for multiple properties (contributor, translator, developer)
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha7
People
(Reporter: mossop, Assigned: mossop)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
There's a problem which stops the localizable property values for the multiple choice properties from being retrieved.
Assignee | ||
Comment 1•17 years ago
|
||
Have to return an array of resources rather than an enumerator of resources from rdfGets.
We could alternatively make GetTargets handle an enumerator return rather than converting the enumerator to an array then wrapping with an ArrayEnumerator. But that muddies the API a little.
Attachment #270323 -
Flags: review?(robert.bugzilla)
Comment 2•17 years ago
|
||
Comment on attachment 270323 [details] [diff] [review]
patch rev 1
>Index: toolkit/mozapps/extensions/src/nsExtensionManager.js.in
>===================================================================
>RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v
>retrieving revision 1.223
>diff -u8 -p -r1.223 nsExtensionManager.js.in
>--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in 25 Jun 2007 21:38:19 -0000 1.223
>+++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in 29 Jun 2007 13:39:05 -0000
>@@ -8157,23 +8157,27 @@ ExtensionsDataSource.prototype = {
> * extensions.{GUID}.[contributor].1
> * extensions.{GUID}.[contributor].2
> * extensions.{GUID}.[contributor].3
> * ...
> *
> * to specify localized text for each of these properties.
> */
> _getLocalizablePropertyValues: function(item, property) {
>+ var values = [];
> var localized = this._getLocalizedResource(item);
>- if (localized)
>- return this._inner.GetTargets(localized, property, true);
>+ if (localized) {
>+ var targets = this._inner.GetTargets(localized, property, true);
>+ while (targets.hasMoreElements())
>+ values.push(targets.getNext());
stray tab
>+ return values;
>+ }
I think this should first try to get the pref values and if those aren't present try to get the values from rdf to maintain the previous behavior where a pref can override an extension's metadata.
Attachment #270323 -
Flags: review?(robert.bugzilla) → review-
Comment 3•17 years ago
|
||
Same is true for _getLocalizablePropertyValue... is there a reason why the previous behavior should be changed? If not please fix _getLocalizablePropertyValue as well. Thanks!
Assignee | ||
Comment 4•17 years ago
|
||
Well my reasoning was that the new information would supercede the old way but there we go.
Attachment #270323 -
Attachment is obsolete: true
Attachment #270430 -
Flags: review?(robert.bugzilla)
Assignee | ||
Comment 5•17 years ago
|
||
Will need to update the documentation for this change.
Keywords: dev-doc-needed
Comment 6•17 years ago
|
||
(In reply to comment #4)
> Created an attachment (id=270430) [details]
> patch rev 2
>
> Well my reasoning was that the new information would supercede the old way but
> there we go.
I'd say it is preferable to use the extension metadata but what about the case where a locale pack for an add-on is provided for an add-on that has localized metadat and is already released? The locale pack wouldn't be able to override the add-on provided metadata then.
Updated•17 years ago
|
Attachment #270430 -
Attachment is patch: true
Attachment #270430 -
Attachment mime type: application/octet-stream → text/plain
Comment 7•17 years ago
|
||
Comment on attachment 270430 [details] [diff] [review]
patch rev 2
Thanks Dave!
Attachment #270430 -
Flags: review?(robert.bugzilla) → review+
Assignee | ||
Comment 8•17 years ago
|
||
Checking in toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v <-- nsExtensionManager.js.in
new revision: 1.225; previous revision: 1.224
done
Assignee | ||
Comment 9•17 years ago
|
||
Updated http://developer.mozilla.org/en/docs/Localizing_extension_descriptions to match the new behaviour.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: dev-doc-needed → dev-doc-complete
Resolution: --- → FIXED
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → Firefox 3 M7
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•