| OLD | NEW |
| 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 "description": "Use the <code>chrome.i18n</code> infrastructure to implement
internationalization across your whole app or extension.", | 8 "description": "Use the <code>chrome.i18n</code> infrastructure to implement
internationalization across your whole app or extension.", |
| 9 "types": [], | 9 "types": [], |
| 10 "functions": [ | 10 "functions": [ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 }, | 24 }, |
| 25 { | 25 { |
| 26 "name": "getMessage", | 26 "name": "getMessage", |
| 27 "nocompile": true, | 27 "nocompile": true, |
| 28 "type": "function", | 28 "type": "function", |
| 29 "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 — for example, <em>messageN
ame</em> is not a string or the <em>substitutions</em> array has more than 9 ele
ments — this method returns <code>undefined</code>.", | 29 "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 — for example, <em>messageN
ame</em> is not a string or the <em>substitutions</em> array has more than 9 ele
ments — this method returns <code>undefined</code>.", |
| 30 "parameters": [ | 30 "parameters": [ |
| 31 { | 31 { |
| 32 "type": "string", | 32 "type": "string", |
| 33 "name": "messageName", | 33 "name": "messageName", |
| 34 "description": "The name of the message, as specified in the <a href
='i18n-messages.html'><code>messages.json</code></a> file." | 34 "description": "The name of the message, as specified in the <a href
='i18n-messages'><code>messages.json</code></a> file." |
| 35 }, | 35 }, |
| 36 { | 36 { |
| 37 "type": "any", | 37 "type": "any", |
| 38 "name": "substitutions", | 38 "name": "substitutions", |
| 39 "optional": true, | 39 "optional": true, |
| 40 "description": "Up to 9 substitution strings, if the message require
s any." | 40 "description": "Up to 9 substitution strings, if the message require
s any." |
| 41 } | 41 } |
| 42 ], | 42 ], |
| 43 "returns": { | 43 "returns": { |
| 44 "type": "string", | 44 "type": "string", |
| 45 "description": "Message localized for current locale." | 45 "description": "Message localized for current locale." |
| 46 } | 46 } |
| 47 }, | 47 }, |
| 48 { | 48 { |
| 49 "name": "getUILanguage", | 49 "name": "getUILanguage", |
| 50 "type": "function", | 50 "type": "function", |
| 51 "nocompile": true, | 51 "nocompile": true, |
| 52 "description": "Gets the browser UI language of the browser. This is dif
ferent from $(ref:i18n.getAcceptLanguages) which returns the preferred user lang
uages.", | 52 "description": "Gets the browser UI language of the browser. This is dif
ferent from $(ref:i18n.getAcceptLanguages) which returns the preferred user lang
uages.", |
| 53 "parameters": [], | 53 "parameters": [], |
| 54 "returns": { | 54 "returns": { |
| 55 "type": "string", | 55 "type": "string", |
| 56 "description": "The browser UI language code such as en-US or fr-FR." | 56 "description": "The browser UI language code such as en-US or fr-FR." |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 ], | 59 ], |
| 60 "events": [] | 60 "events": [] |
| 61 } | 61 } |
| 62 ] | 62 ] |
| OLD | NEW |