Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2265)

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 225009: Implementing chrome.i18n.getMessage call, that loads message from the extensi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/extension_api.json
===================================================================
--- chrome/common/extensions/api/extension_api.json (revision 27238)
+++ chrome/common/extensions/api/extension_api.json (working copy)
@@ -1114,10 +1114,37 @@
]
}
]
+ },
+ {
+ "name": "getMessage",
+ "type": "function",
+ "description": "Get a message from the extension language catalog, for a current locale.",
+ "parameters": [
+ { "type": "string",
+ "name": "message_name",
+ "description": "Message name from the extension catalog."
+ },
+ {
+ "choices": [
+ { "type": "string" },
+ {
+ "type": "array",
+ "items": { "type": "string" },
+ "minItems": 1,
+ "maxItems": 9
+ }
+ ],
+ "optional": true,
+ "description": "1 - 9 substitution parameters, if the message requires any."
+ }
+ ],
+ "returns": {
+ "type": "string",
+ "description": "Message localized for current locale."
+ }
}
],
- "events": [
- ]
+ "events": []
},
{
"namespace": "devtools",

Powered by Google App Engine
This is Rietveld 408576698