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

Unified Diff: ui/webui/resources/js/i18n_behavior.js

Issue 1842403004: MD Settings: Certificate manager, move "Import" button to the tab level. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 9 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 | « chrome/test/data/webui/settings/certificate_manager_page_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/i18n_behavior.js
diff --git a/ui/webui/resources/js/i18n_behavior.js b/ui/webui/resources/js/i18n_behavior.js
index 9bb488da93c718df87f9ccf2c0a05672bd6469f0..9acee2825d5bcbc9c6d6afd92959683df3d55b12 100644
--- a/ui/webui/resources/js/i18n_behavior.js
+++ b/ui/webui/resources/js/i18n_behavior.js
@@ -17,10 +17,12 @@
var I18nBehavior = {
/**
* @param {string} id The ID of the string to translate.
- * @param {...string} var_args Placeholders required by the string ($1-9).
+ * @param {...string=} var_args Placeholders required by the string ($0-9).
* @return {string} A translated, substituted string.
*/
i18n: function(id, var_args) {
- return loadTimeData.getStringF.apply(loadTimeData, arguments);
+ return arguments.length > 1 ?
Dan Beam 2016/04/02 02:08:16 nit: return arguments.length == 1 ? loadTimeData.
dpapad 2016/04/04 17:25:51 Done.
+ loadTimeData.getStringF.apply(loadTimeData, arguments) :
+ loadTimeData.getString.apply(loadTimeData, arguments);
Dan Beam 2016/04/02 02:08:16 this is equivalent to loadTimeData.getString(id)
dpapad 2016/04/04 17:25:51 Done.
},
};
« no previous file with comments | « chrome/test/data/webui/settings/certificate_manager_page_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698