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

Side by Side Diff: chrome/common/extensions/api/i18n.json

Issue 10701026: Use JSON schema compiler for i18n api (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "i18n", 7 "namespace": "i18n",
8 "types": [], 8 "types": [],
9 "functions": [ 9 "functions": [
10 { 10 {
11 "name": "getAcceptLanguages", 11 "name": "getAcceptLanguages",
12 "type": "function", 12 "type": "function",
13 "description": "Gets the accept-languages of the browser. This is differ ent from the locale used by the browser; to get the locale, use <code>window.nav igator.language</code>.", 13 "description": "Gets the accept-languages of the browser. This is differ ent from the locale used by the browser; to get the locale, use <code>window.nav igator.language</code>.",
14 "parameters": [ 14 "parameters": [
15 { 15 {
16 "type": "function", 16 "type": "function",
17 "name": "callback", 17 "name": "callback",
18 "parameters": [ 18 "parameters": [
19 {"name": "languages", "type": "array", "items": {"type": "string"} , "description": "Array of the accept languages of the browser, such as en-US,en ,zh-CN"} 19 {"name": "languages", "type": "array", "items": {"type": "string"} , "description": "Array of the accept languages of the browser, such as en-US,en ,zh-CN"}
20 ] 20 ]
21 } 21 }
22 ] 22 ]
23 }, 23 },
24 { 24 {
25 "name": "getMessage", 25 "name": "getMessage",
26 "type": "function", 26 "type": "function",
27 "unprivileged": true, 27 "unprivileged": true,
28 "description": "Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the <code>getMessage()</code> call is wrong &mdash; for example, <em>messageN ame</em> is not a string or the <em>substitutions</em> array has more than 9 ele ments &mdash; this method returns <code>undefined</code>.", 28 "description": "Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the <code>getMessage()</code> call is wrong &mdash; for example, <em>messageN ame</em> is not a string or the <em>substitutions</em> array has more than 9 ele ments &mdash; this method returns <code>undefined</code>.",
29 "parameters": [ 29 "parameters": [
30 { "type": "string", 30 {
31 "type": "string",
31 "name": "messageName", 32 "name": "messageName",
32 "description": "The name of the message, as specified in the <a href ='i18n-messages.html'><code>messages.json</code></a> file." 33 "description": "The name of the message, as specified in the <a href ='i18n-messages.html'><code>messages.json</code></a> file."
33 }, 34 },
34 { 35 {
35 "type": "any", 36 "type": "any",
36 "name": "substitutions", 37 "name": "substitutions",
37 "optional": true, 38 "optional": true,
38 "description": "Up to 9 substitution strings, if the message require s any." 39 "description": "Up to 9 substitution strings, if the message require s any."
39 } 40 }
40 ], 41 ],
41 "returns": { 42 "returns": {
42 "type": "string", 43 "type": "string",
43 "description": "Message localized for current locale." 44 "description": "Message localized for current locale."
44 } 45 }
45 } 46 }
46 ], 47 ],
47 "events": [] 48 "events": []
48 } 49 }
49 ] 50 ]
OLDNEW
« chrome/browser/extensions/extension_i18n_api.cc ('K') | « chrome/common/extensions/api/api.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698