Closed Bug 1214955 Opened 11 years ago Closed 10 years ago

Automatically localize all string properties in manifest.json

Categories

(WebExtensions :: Untriaged, defect, P2)

defect

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Iteration:
47.3 - Mar 7
Tracking Status
firefox47 --- fixed

People

(Reporter: billm, Assigned: kmag)

References

Details

(Keywords: dev-doc-complete, Whiteboard: triaged)

Attachments

(1 file)

Blocks: webext
Flags: blocking-webextensions+
Assignee: nobody → kmaglione+bmo
Iteration: --- → 45.1 - Nov 16
Iteration: 45.1 - Nov 16 → 45.2 - Nov 30
Depends on: 1225715
Iteration: 45.2 - Nov 30 → 45.3 - Dec 14
Whiteboard: triaged
Priority: -- → P2
Iteration: 45.3 - Dec 14 → 47.3 - Mar 7
Comment on attachment 8724319 [details] MozReview Request: Bug 1214955: [webext] Automatically localize all localizable manifest properties. r?billm https://reviewboard.mozilla.org/r/36975/#review33795 ::: browser/components/extensions/schemas/browser_action.json:20 (Diff revision 1) > + "default_icon": { Don't you want this to be localized? ::: browser/components/extensions/schemas/page_action.json:20 (Diff revision 1) > + "default_icon": { Don't you want this to be localized? ::: toolkit/components/extensions/Extension.jsm:658 (Diff revision 1) > + preprocessors: {}, How about we always add "localize" to preprocessors, but it's the identity function if we don't have locale data? ::: toolkit/components/extensions/Schemas.jsm:281 (Diff revision 1) > + preprocess(value, context) { Please extend the XPCShell test to test preprocessor stuff. ::: toolkit/components/extensions/Schemas.jsm:282 (Diff revision 1) > + if (this.preprocessor in context.preprocessors) { This seems prone to error. I'd rather we throw an exception if this.preprocessor is defined and it's not in context.preprocessors. How about just |if (this.preprocessor)|?
Attachment #8724319 - Flags: review?(wmccloskey) → review+
https://reviewboard.mozilla.org/r/36975/#review33795 > Don't you want this to be localized? I'm not sure. I was originally planning to, but Chrome doesn't localize icon properties, and we don't localize extension icons in either kind of install manifest, so I decided to skip it. > This seems prone to error. I'd rather we throw an exception if this.preprocessor is defined and it's not in context.preprocessors. How about just |if (this.preprocessor)|? Yeah, that makes sense.
https://hg.mozilla.org/integration/fx-team/rev/4c924e5c274980190d1e897fd2fd8cc3c87da0f0 Bug 1214955: [webext] Automatically localize all localizable manifest properties. r=billm
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
I'm not sure what the best way to document these is. Perhaps some kind of inline tag to indicate properties that are localized, similar to the [optional] tag? The following properties currently support localization: name short_name description creator homepage_url browser_action.default_title browser_action.default_popup page_action.default_title page_action.default_popup
Keywords: dev-doc-needed
Depends on: 1295894
I've added a note in the docs page for every manifest key that has "preprocess": "localize" in its schema entry.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: