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

Unified Diff: remoting/webapp/host_session.js

Issue 10533101: Don't replace $1 with an empty string when localizing string for host plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/host_session.js
diff --git a/remoting/webapp/host_session.js b/remoting/webapp/host_session.js
index d1f9a1460af83e2ea88662c65d0b5dfc6eb5d01b..fb064e563da632a77ee5851dbf85435564ef9ee0 100644
--- a/remoting/webapp/host_session.js
+++ b/remoting/webapp/host_session.js
@@ -72,7 +72,16 @@ remoting.HostSession.prototype.createPluginAndConnect =
this.plugin.onNatTraversalPolicyChanged = onNatTraversalPolicyChanged;
this.plugin.onStateChanged = onStateChanged;
this.plugin.logDebugInfo = logDebugInfo;
- this.plugin.localize(chrome.i18n.getMessage);
+ this.plugin.localize(
+ /** @param {string} id */
+ function(id) {
+ // Plugin takes care of string substitution, so we just keep
+ // $ placeholders.
+ // TODO(sergeyu): Refactor plugin location so that it
+ // doesn't need to do any substitutions. crbug.com/132370 .
+ return chrome.i18n.getMessage(id, ["$1", "$2", "$3"]);
+ }
+ );
this.plugin.connect(email, 'oauth2:' + accessToken);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698