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

Side by Side Diff: chrome/browser/resources/settings/controls/extension_controlled_indicator.js

Issue 2927213002: [MD settings] I18nBehavior return textContent from i18n() (Closed)
Patch Set: merge with master Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'extension-controlled-indicator', 6 is: 'extension-controlled-indicator',
7 7
8 behaviors: [I18nBehavior], 8 behaviors: [I18nBehavior],
9 9
10 properties: { 10 properties: {
11 extensionCanBeDisabled: Boolean, 11 extensionCanBeDisabled: Boolean,
12 extensionId: String, 12 extensionId: String,
13 extensionName: String, 13 extensionName: String,
14 }, 14 },
15 15
16 /** 16 /**
17 * @param {string} extensionId 17 * @param {string} extensionId
18 * @param {string} extensionName 18 * @param {string} extensionName
19 * @return {string} 19 * @return {string}
20 * @private 20 * @private
21 */ 21 */
22 getLabel_: function(extensionId, extensionName) { 22 getLabel_: function(extensionId, extensionName) {
23 var manageUrl = 'chrome://extensions/?id=' + assert(this.extensionId); 23 var manageUrl = 'chrome://extensions/?id=' + assert(this.extensionId);
24 return this.i18n('controlledByExtension', 24 return this.i18nAdvanced('controlledByExtension', {
25 '<a href="' + manageUrl + '" target="_blank">' + 25 substitutions:
26 assert(this.extensionName) + '</a>'); 26 ['<a href="' + manageUrl + '" target="_blank">' +
27 assert(this.extensionName) + '</a>'],
28 });
27 }, 29 },
28 30
29 /** @private */ 31 /** @private */
30 onDisableTap_: function() { 32 onDisableTap_: function() {
31 assert(this.extensionCanBeDisabled); 33 assert(this.extensionCanBeDisabled);
32 settings.ExtensionControlBrowserProxyImpl.getInstance().disableExtension( 34 settings.ExtensionControlBrowserProxyImpl.getInstance().disableExtension(
33 assert(this.extensionId)); 35 assert(this.extensionId));
34 this.fire('extension-disable'); 36 this.fire('extension-disable');
35 }, 37 },
36 }); 38 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698