summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 00:57:07 +0000
committercira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 00:57:07 +0000
commit4efb6fc09fbe683c885a6df510cf0de67ce660dd (patch)
tree9af793192b6d15aa01b70b3a299df8da9558e89c
parent453e66d32177770351d457c8a77e2258a1dba874 (diff)
downloadchromium_src-4efb6fc09fbe683c885a6df510cf0de67ce660dd.zip
chromium_src-4efb6fc09fbe683c885a6df510cf0de67ce660dd.tar.gz
chromium_src-4efb6fc09fbe683c885a6df510cf0de67ce660dd.tar.bz2
Landing http://codereview.chromium.org/543134 for ernestd(at)google.com
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36710 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/_locales/en/messages.json36
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/_locales/es/messages.json36
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/background.html5
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/manifest.json9
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json4
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/es/messages.json63
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html4
-rw-r--r--chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json3
8 files changed, 150 insertions, 10 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/_locales/en/messages.json b/chrome/common/extensions/docs/examples/extensions/gmail/_locales/en/messages.json
new file mode 100644
index 0000000..4dfd2de
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/_locales/en/messages.json
@@ -0,0 +1,36 @@
+{
+ "name": {
+ "message": "$Google$ Mail Checker",
+ "description": "Extension name in manifest.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "description": {
+ "message": "Displays the number of unread messages in your $Google$ Mail inbox. You can also click the button to open your inbox.",
+ "description": "Extension description in manifest.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "node_error": {
+ "message": "Error: feed retrieved, but no &lt;fullcount&gt; node found",
+ "description": "Missing node error."
+ },
+ "exception": {
+ "message": "exception: $exception$",
+ "description": "Exception message.",
+ "placeholders": {
+ "exception": {
+ "content": "$1",
+ "example": "xhr object error."
+ }
+ }
+ }
+}
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/_locales/es/messages.json b/chrome/common/extensions/docs/examples/extensions/gmail/_locales/es/messages.json
new file mode 100644
index 0000000..87674fe
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/_locales/es/messages.json
@@ -0,0 +1,36 @@
+{
+ "name": {
+ "message": "$Google$ Mail Checker",
+ "description": "Nombre de la extensión en el manifiesto.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "description": {
+ "message": "Muestra el número de mensajes sin leer en tu bandeja de entrada de $Google$ Mail. También se puede acceder directamente a tu bandeja de entrada pulsando el botón.",
+ "description": "Descripción de la extensión en el manifiesto.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "node_error": {
+ "message": "Error: feed capturado, pero no se puede hallar el nodo &lt;fullcount&gt;",
+ "description": "Error de nodo no encontrado."
+ },
+ "exception": {
+ "message": "excepción: $exception$",
+ "description": "Mensaje de la excepción.",
+ "placeholders": {
+ "exception": {
+ "content": "$1",
+ "example": "Error en el objecto xhr."
+ }
+ }
+ }
+}
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/background.html b/chrome/common/extensions/docs/examples/extensions/gmail/background.html
index 0a0563f..7f2b25f 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail/background.html
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/background.html
@@ -163,8 +163,7 @@ function getInboxCount(onSuccess, onError) {
handleSuccess(fullCountNode.textContent);
return;
} else {
- console.error("Error: feed retrieved, but no <fullcount> node " +
- "found");
+ console.error(chrome.i18n.getMessage("node_error"));
}
}
@@ -178,7 +177,7 @@ function getInboxCount(onSuccess, onError) {
xhr.open("GET", getFeedUrl(), true);
xhr.send(null);
} catch(e) {
- console.error("exception: " + e);
+ console.error(chrome.i18n.getMessage("exception", e));
handleError();
}
}
diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json b/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json
index 96a7588..90101314 100644
--- a/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json
+++ b/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json
@@ -1,6 +1,6 @@
{
- "name": "Google Mail Checker",
- "description": "Displays the number of unread messages in your Google Mail inbox. You can also click the button to open your inbox.",
+ "name": "__MSG_name__",
+ "description": "__MSG_description__",
"version": "3",
"background_page": "background.html",
"options_page": "options.html",
@@ -8,9 +8,10 @@
"tabs", "http://*.google.com/", "https://*.google.com/"
],
"browser_action": {
- "default_title": ""
+ "default_title": ""
},
"icons": {
"128": "icon_128.png"
- }
+ },
+ "default_locale": "en"
}
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json b/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json
index 0288725..9f5ea5d 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/en/messages.json
@@ -54,6 +54,10 @@
"example": "Google"
}
}
+ },
+ "newsUrl": {
+ "message": "http://news.google.com",
+ "description": "Url to Google News."
}
}
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/es/messages.json b/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/es/messages.json
new file mode 100644
index 0000000..2093149
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/_locales/es/messages.json
@@ -0,0 +1,63 @@
+{
+ "name": {
+ "message": "Lector de noticias",
+ "description": "Nombre de la extensión en el manifiesto."
+ },
+ "description": {
+ "message": "Muestra los primeros 5 eventos de '$Google$ noticias - destacados' RSS feed en una ventana.",
+ "description": "Descripción de la extensión en el manifiesto.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "default_title": {
+ "message": "$Google$ noticias",
+ "description": "Texto de la accion de menú de la extension en el manifiesto.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "unknown_title": {
+ "message": "Título desconocido",
+ "description": "Noticia con título desconocido."
+ },
+ "error": {
+ "message": "Error: $error$",
+ "description": "Plantilla de error genérico. Hace falta pasar un parámetro de error.",
+ "placeholders": {
+ "error": {
+ "content": "$1",
+ "example": "Fallo al capturar el RSS feed."
+ }
+ }
+ },
+ "failed_to_fetch_rss": {
+ "message": "Fallo al capturar el RSS feed.",
+ "description": "Mensaje de error visible para el usuario."
+ },
+ "not_a_valid_feed": {
+ "message": "Feed no válido.",
+ "description": "Mensaje de error visible para el usuario."
+ },
+ "more_stories": {
+ "message": "Ir a $Google$ noticias \u00BB",
+ "description": "Nombre del enlace a Google noticias.",
+ "placeholders": {
+ "google": {
+ "content": "Google",
+ "example": "Google"
+ }
+ }
+ },
+ "newsUrl": {
+ "message": "http://news.google.es",
+ "description": "Dirección de Google News."
+ }
+}
+
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html b/chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html
index 4d7ca01..902b0de 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/feed.html
@@ -102,7 +102,7 @@ function messageHandler(event) {
</script>
<script>
// Feed URL.
-var feedUrl = 'http://news.google.com/?output=rss';
+var feedUrl = chrome.i18n.getMessage('newsUrl') + '/?output=rss';
// The XMLHttpRequest object that tries to load and parse the feed.
var req;
@@ -280,7 +280,7 @@ function iframeMessageHandler(e) {
iframes[i].style.height = msg.size + "px";
} else if (msg.type == "show") {
var url = msg.url;
- if (url.indexOf("http://news.google.com") == 0) {
+ if (url.indexOf(chrome.i18n.getMessage('newsUrl')) == 0) {
// If the URL is a redirect URL, strip of the destination and go to
// that directly. This is necessary because the Google news
// redirector blocks use of the redirects in this case.
diff --git a/chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json b/chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json
index 681d6ef..3b60601 100644
--- a/chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json
+++ b/chrome/common/extensions/docs/examples/extensions/news_i18n/manifest.json
@@ -10,7 +10,8 @@
},
"permissions": [
"tabs",
- "http://news.google.com/*"
+ "http://news.google.com/*",
+ "http://news.google.es/*"
],
"default_locale": "en"
}