diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 00:28:43 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 00:28:43 +0000 |
commit | a672cb9dce10306f3b149802653dbb554b326a44 (patch) | |
tree | f726e3b92f3b3ddebd48c0143d42617af89165d7 /chrome/common | |
parent | a36d06b727f8ebc8f60e515d0c6f855513c88272 (diff) | |
download | chromium_src-a672cb9dce10306f3b149802653dbb554b326a44.zip chromium_src-a672cb9dce10306f3b149802653dbb554b326a44.tar.gz chromium_src-a672cb9dce10306f3b149802653dbb554b326a44.tar.bz2 |
Adding support for i18n to content scripts.
Auto-updated extension docs.
Review URL: http://codereview.chromium.org/522017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35320 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 3 | ||||
-rw-r--r-- | chrome/common/extensions/docs/content_scripts.html | 2 | ||||
-rw-r--r-- | chrome/common/extensions/docs/i18n.html | 146 |
3 files changed, 134 insertions, 17 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index e40ce74..29622b9 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -1614,6 +1614,7 @@ }, { "namespace": "i18n", + "unprivileged": true, "types": [], "functions": [ { @@ -1633,7 +1634,7 @@ { "name": "getMessage", "type": "function", - "nodoc": true, + "unprivileged": true, "description": "Get a message from the extension language catalog, for a current locale.", "parameters": [ { "type": "string", diff --git a/chrome/common/extensions/docs/content_scripts.html b/chrome/common/extensions/docs/content_scripts.html index 04399ff..1eef989 100644 --- a/chrome/common/extensions/docs/content_scripts.html +++ b/chrome/common/extensions/docs/content_scripts.html @@ -772,5 +772,5 @@ sending a request to its parent extension. </div> <!-- /gc-container --> </body></html> -Blocked access to external URL http://www.youtube.com/v/laLudeUmXHM&hl=en_US&fs=1& Blocked access to external URL http://www.youtube.com/v/B4M_a7xejYI&hl=en_US&fs=1& +Blocked access to external URL http://www.youtube.com/v/laLudeUmXHM&hl=en_US&fs=1& diff --git a/chrome/common/extensions/docs/i18n.html b/chrome/common/extensions/docs/i18n.html index e07d919..b771f0e 100644 --- a/chrome/common/extensions/docs/i18n.html +++ b/chrome/common/extensions/docs/i18n.html @@ -217,8 +217,8 @@ <ol> <li> <a href="#method-getAcceptLanguages">getAcceptLanguages</a> - </li><li style="display: none; "> - <a href="#method-anchor">methodName</a> + </li><li> + <a href="#method-getMessage">getMessage</a> </li> </ol> </li> @@ -469,27 +469,105 @@ For other examples and for help in viewing the source code, see </div> <!-- /description --> - </div><div class="apiItem" style="display: none; "> - <a></a> <!-- method-anchor --> - <h4>method name</h4> + </div><div class="apiItem"> + <a name="method-getMessage"></a> <!-- method-anchor --> + <h4>getMessage</h4> - <div class="summary"><span>void</span> + <div class="summary"><span>string</span> <!-- Note: intentionally longer 80 columns --> - <span>chrome.module.methodName</span>(<span><span>, </span><span></span> - <var><span></span></var></span>)</div> + <span>chrome.i18n.getMessage</span>(<span class="null"><span style="display: none; ">, </span><span>string</span> + <var><span>messageName</span></var></span><span class="optional"><span>, </span><span>string or array of string</span> + <var><span>substitutions</span></var></span>)</div> <div class="description"> - <p class="todo">Undocumented.</p> - <p> - A description from the json schema def of the function goes here. - </p> + <p class="todo" style="display: none; ">Undocumented.</p> + <p>Get a message from the extension language catalog, for a current locale.</p> <!-- PARAMETERS --> <h4>Parameters</h4> <dl> <div> <div> - </div> + <dt> + <var>messageName</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional" style="display: none; ">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>string</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>Message name from the extension catalog.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> + </div><div> + <div> + <dt> + <var>substitutions</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>string or array of string</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>1 - 9 substitution parameters, if the message requires any.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> </div> </dl> @@ -498,12 +576,50 @@ For other examples and for help in viewing the source code, see <dl> <div> <div> - </div> + <dt> + <var style="display: none; ">paramName</var> + <em> + + <!-- TYPE --> + <div style="display:inline"> + ( + <span class="optional" style="display: none; ">optional</span> + <span id="typeTemplate"> + <span style="display: none; "> + <a> Type</a> + </span> + <span> + <span style="display: none; "> + array of <span><span></span></span> + </span> + <span>string</span> + </span> + </span> + ) + </div> + + </em> + </dt> + <dd class="todo" style="display: none; "> + Undocumented. + </dd> + <dd>Message localized for current locale.</dd> + + <!-- OBJECT PROPERTIES --> + <dd style="display: none; "> + <dl> + <div> + <div> + </div> + </div> + </dl> + </dd> + </div> </div> </dl> <!-- CALLBACK --> - <div> + <div style="display: none; "> <div> <h4>Callback function</h4> <p> |