diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index fcae7592a6d9ed45e386664e2941e6b54e3e14bb..d929b0fbdb0e3b144af0549089f385f40f4b12fc 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -2715,13 +2715,13 @@ each locale. --> </message> <message name="IDS_ERRORPAGES_SUGGESTION_RELOAD" desc="When a page fails to load, we provide a suggestion that the user try reloading the page later"> - <a i18n-values="href:reloadUrl">Reload</a> this web page later. + <a jsvalues="href:reloadUrl">Reload</a> this web page later. </message> <message name="IDS_ERRORPAGES_SUGGESTION_HOMEPAGE" desc="When a page fails to load, sometimes we provide a suggesting of trying just the hostname of the site."> Go to the homepage of the site: </message> <message name="IDS_ERRORPAGES_SUGGESTION_LEARNMORE" desc="When a web page fails to load, we provide a link to the help center to learn more about the failure."> - <ph name="BEGIN_LINK"><a i18n-values="href:learnMoreUrl"></ph>Learn more<ph name="END_LINK"></a></ph> about this problem. + <ph name="BEGIN_LINK"><a jsvalues="href:learnMoreUrl"></ph>Learn more<ph name="END_LINK"></a></ph> about this problem. </message> <message name="IDS_ERRORPAGES_TITLE_NOT_AVAILABLE" desc="Title of the error page when we can't connect to a site."> @@ -2743,13 +2743,13 @@ each locale. --> This webpage has a redirect loop. </message> <message name="IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE" desc="Summary in the error page when we can't connect to a site."> - The webpage at <strong i18n-content="failedUrl"></strong> might be temporarily down or it may have moved permanently to a new web address. + The webpage at <strong jscontent="failedUrl"></strong> might be temporarily down or it may have moved permanently to a new web address. </message> <message name="IDS_ERRORPAGES_SUMMARY_NOT_FOUND" desc="Summary in the error page when the server returns a 404."> - No webpage was found for the web address: <strong i18n-content="failedUrl"></strong> + No webpage was found for the web address: <strong jscontent="failedUrl"></strong> </message> <message name="IDS_ERRORPAGES_SUMMARY_TOO_MANY_REDIRECTS" desc="Summary in the error page when there are too many URL redirects."> - The webpage at <strong i18n-content="failedUrl"></strong> has resulted in + The webpage at <strong jscontent="failedUrl"></strong> has resulted in too many redirects. Clearing your cookies for this site may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer. diff --git a/chrome/browser/resources/i18n_template.js b/chrome/browser/resources/i18n_template.js index 7a367f7a3ac8a8fd37ad6a0225c0ec10f033eb00..002890280821b520174b99f88c85caad7443e001 100644 --- a/chrome/browser/resources/i18n_template.js +++ b/chrome/browser/resources/i18n_template.js @@ -56,6 +56,11 @@ var i18nTemplate = (function() { } if (object) { object[path] = value; + // In case we set innerHTML (ignoring others) we need to + // recursively check the content + if (path == 'innerHTML') { + process(element, obj); + } } } else { element.setAttribute(propName, value); @@ -71,21 +76,23 @@ var i18nTemplate = (function() { } var selector = '[' + attributeNames.join('],[') + ']'; - return { - /** - * Processes a DOM tree with the {@code obj} map. - */ - process: function(node, obj) { - var elements = node.querySelectorAll(selector); - for (var element, i = 0; element = elements[i]; i++) { - for (var j = 0; j < attributeNames.length; j++) { - var name = attributeNames[j]; - var att = element.getAttribute(name); - if (att != null) { - handlers[name](element, att, obj); - } + /** + * Processes a DOM tree with the {@code obj} map. + */ + function process(node, obj) { + var elements = node.querySelectorAll(selector); + for (var element, i = 0; element = elements[i]; i++) { + for (var j = 0; j < attributeNames.length; j++) { + var name = attributeNames[j]; + var att = element.getAttribute(name); + if (att != null) { + handlers[name](element, att, obj); } } } + } + + return { + process: process }; })();