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

Side by Side Diff: chrome/browser/resources/settings/i18n_behavior/i18n_behavior.js

Issue 1404593002: Extract i18n behavior from settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove polymer_ prefix. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * 'I18nBehavior' is a behavior to mix in loading of
8 * internationalization strings.
9 *
10 * Example:
11 * behaviors: [
12 * I18nBehavior,
13 * ],
14 *
15 * @group Chrome Settings Elements
16 */
17
18 var I18nBehavior = {
19 /**
20 * @param {string} id The ID of the string to translate.
21 * @param {...var_args} Placeholders required by the string ($1-9).
22 * @return {string} A translated, substituted string.
23 */
24 i18n: function(id, var_args) {
25 return loadTimeData.getStringF.apply(loadTimeData, arguments);
26 },
27 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698