Chromium Code Reviews| Index: chrome/browser/resources/settings/internet_page/network_summary_item.js |
| diff --git a/chrome/browser/resources/settings/internet_page/network_summary_item.js b/chrome/browser/resources/settings/internet_page/network_summary_item.js |
| index 796ab656a1ebf777a417f3fa749a59f470b65cd1..c276792f394f600fbc5a0c1f02eeef16e95c272b 100644 |
| --- a/chrome/browser/resources/settings/internet_page/network_summary_item.js |
| +++ b/chrome/browser/resources/settings/internet_page/network_summary_item.js |
| @@ -13,7 +13,7 @@ var DeviceStateProperties; |
| Polymer({ |
| is: 'network-summary-item', |
| - behaviors: [Polymer.IronA11yKeysBehavior], |
| + behaviors: [Polymer.IronA11yKeysBehavior, I18nBehavior], |
|
hcarmona
2017/02/23 00:52:21
Another possibility is to use $i18nPolymer{...} in
stevenjb
2017/02/23 20:51:33
There are currently 3 and eventually 4 strings (wh
hcarmona
2017/02/23 21:51:06
Sounds good, no objections
|
| properties: { |
| /** |
| @@ -31,9 +31,6 @@ Polymer({ |
| */ |
| activeNetworkState: Object, |
| - /** String for a11y purposes. */ |
| - itemName: String, |
|
hcarmona
2017/02/23 00:52:21
itemName can also be removed from cr-network-list-
stevenjb
2017/02/23 20:51:33
I saw that but decided that leaving itemName as a
|
| - |
| /** |
| * List of all network state data for the network type. |
| * @type {!Array<!CrOnc.NetworkStateProperties>} |
| @@ -238,6 +235,22 @@ Polymer({ |
| }, |
| /** |
| + * @return {string} |
| + * @private |
| + */ |
| + getToggleA11yString_: function() { |
| + switch (this.deviceState.Type) { |
| + case CrOnc.Type.CELLULAR: |
| + return this.i18n('internetToggleMobileA11yLabel'); |
| + case CrOnc.Type.WI_FI: |
| + return this.i18n('internetToggleWiFiA11yLabel'); |
| + case CrOnc.Type.WI_MAX: |
| + return this.i18n('internetToggleWiMAXA11yLabel'); |
| + } |
| + return ''; |
|
hcarmona
2017/02/23 00:52:21
Does it make sense to return "Unknown device enabl
stevenjb
2017/02/23 20:51:33
I'd rather not added a string we don't plan to use
hcarmona
2017/02/23 21:51:06
Awesome, thanks :-)
|
| + }, |
| + |
| + /** |
| * @return {boolean} Whether or not to show the UI to expand the list. |
| * @private |
| */ |