Commit d1396264 authored by Denis Kuznetsov's avatar Denis Kuznetsov Committed by Commit Bot

Replace i18n-content with I18nDynamic on OOBE HID detection screen

Bug: 955194
Change-Id: I5df7c3d600bd39afb6b7d478d4b75a42193f3c78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1912203Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714894}
parent 928ed9c9
...@@ -54,8 +54,12 @@ ...@@ -54,8 +54,12 @@
<oobe-dialog has-buttons> <oobe-dialog has-buttons>
<iron-icon icon="oobe-hid-detection:bluetooth" slot="oobe-icon"> <iron-icon icon="oobe-hid-detection:bluetooth" slot="oobe-icon">
</iron-icon> </iron-icon>
<h1 slot="title" i18n-content="hidDetectionInvitation"></h1> <h1 slot="title">
<div slot="subtitle" i18n-content="hidDetectionPrerequisites"></div> [[i18nDynamic(locale, 'hidDetectionInvitation')]]
</h1>
<div slot="subtitle">
[[i18nDynamic(locale, 'hidDetectionPrerequisites')]]
</div>
<div slot="footer" class="flex layout vertical"> <div slot="footer" class="flex layout vertical">
<div class="layout vertical justified hid-selection-entry"> <div class="layout vertical justified hid-selection-entry">
<div class="flex layout horizontal center"> <div class="flex layout horizontal center">
...@@ -67,20 +71,20 @@ ...@@ -67,20 +71,20 @@
hidden="[[!tickIsVisible_(mouseState_)]]" hidden="[[!tickIsVisible_(mouseState_)]]"
src="chrome://theme/IDR_BLUETOOTH_PAIRING_TICK"> src="chrome://theme/IDR_BLUETOOTH_PAIRING_TICK">
<div id="mouse-label-searching" aria-live="polite" <div id="mouse-label-searching" aria-live="polite"
i18n-content="hidDetectionMouseSearching"
hidden="[[notEq_(mouseState_, screen.CONNECTION.SEARCHING)]]"> hidden="[[notEq_(mouseState_, screen.CONNECTION.SEARCHING)]]">
[[i18nDynamic(locale, 'hidDetectionMouseSearching')]]
</div> </div>
<div id="mouse-label-usb" aria-live="polite" <div id="mouse-label-usb" aria-live="polite"
i18n-content="hidDetectionUSBMouseConnected"
hidden="[[notEq_(mouseState_, screen.CONNECTION.USB)]]"> hidden="[[notEq_(mouseState_, screen.CONNECTION.USB)]]">
[[i18nDynamic(locale, 'hidDetectionUSBMouseConnected')]]
</div> </div>
<div id="mouse-label-connected" aria-live="polite" <div id="mouse-label-connected" aria-live="polite"
i18n-content="hidDetectionPointingDeviceConnected"
hidden="[[notEq_(mouseState_, screen.CONNECTION.CONNECTED)]]"> hidden="[[notEq_(mouseState_, screen.CONNECTION.CONNECTED)]]">
[[i18nDynamic(locale, 'hidDetectionPointingDeviceConnected')]]
</div> </div>
<div id="mouse-label-paired" aria-live="polite" <div id="mouse-label-paired" aria-live="polite"
i18n-content="hidDetectionBTMousePaired"
hidden="[[notEq_(mouseState_, screen.CONNECTION.PAIRED)]]"> hidden="[[notEq_(mouseState_, screen.CONNECTION.PAIRED)]]">
[[i18nDynamic(locale, 'hidDetectionBTMousePaired')]]
</div> </div>
</div> </div>
</div> </div>
...@@ -94,13 +98,13 @@ ...@@ -94,13 +98,13 @@
hidden="[[!tickIsVisible_(keyboardState_)]]" hidden="[[!tickIsVisible_(keyboardState_)]]"
src="chrome://theme/IDR_BLUETOOTH_PAIRING_TICK"> src="chrome://theme/IDR_BLUETOOTH_PAIRING_TICK">
<div aria-live="polite" <div aria-live="polite"
i18n-content="hidDetectionKeyboardSearching"
hidden="[[notEq_(keyboardState_, screen.CONNECTION.SEARCHING)]]" hidden="[[notEq_(keyboardState_, screen.CONNECTION.SEARCHING)]]"
> >
[[i18nDynamic(locale, 'hidDetectionKeyboardSearching')]]
</div> </div>
<div aria-live="polite" <div aria-live="polite"
i18n-content="hidDetectionUSBKeyboardConnected"
hidden="[[notEq_(keyboardState_, screen.CONNECTION.USB)]]"> hidden="[[notEq_(keyboardState_, screen.CONNECTION.USB)]]">
[[i18nDynamic(locale, 'hidDetectionUSBKeyboardConnected')]]
</div> </div>
<div aria-live="polite" <div aria-live="polite"
hidden="[[notEq_(keyboardState_, screen.CONNECTION.PAIRED)]]"> hidden="[[notEq_(keyboardState_, screen.CONNECTION.PAIRED)]]">
...@@ -132,8 +136,8 @@ ...@@ -132,8 +136,8 @@
class="bluetooth-keyboard-button"> class="bluetooth-keyboard-button">
</div> </div>
<div id="hid-keyboard-pincode-sym-7" <div id="hid-keyboard-pincode-sym-7"
i18n-content="hidDetectionBTEnterKey"
class="bluetooth-keyboard-button"> class="bluetooth-keyboard-button">
[[i18nDynamic(locale, 'hidDetectionBTEnterKey')]]
</div> </div>
</div> </div>
</div> </div>
...@@ -141,8 +145,7 @@ ...@@ -141,8 +145,7 @@
<div slot="bottom-buttons" class="flex layout horizontal end-justified"> <div slot="bottom-buttons" class="flex layout horizontal end-justified">
<oobe-text-button inverse on-tap="onHIDContinueTap_" <oobe-text-button inverse on-tap="onHIDContinueTap_"
disabled="[[continueButtonDisabled]]"> disabled="[[continueButtonDisabled]]">
<div i18n-content="hidDetectionContinue"> <div>[[i18nDynamic(locale, 'hidDetectionContinue')]]</div>
</div>
</oobe-text-button> </oobe-text-button>
</div> </div>
</oobe-dialog> </oobe-dialog>
......
...@@ -147,5 +147,13 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() { ...@@ -147,5 +147,13 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() {
$('oobe-hid-detection-md').setMouseState(this.CONNECTION.SEARCHING); $('oobe-hid-detection-md').setMouseState(this.CONNECTION.SEARCHING);
$('oobe-hid-detection-md').setKeyboardState(this.CONNECTION.SEARCHING); $('oobe-hid-detection-md').setKeyboardState(this.CONNECTION.SEARCHING);
}, },
/**
* Updates localized content of the screen that is not updated via template.
*/
updateLocalizedContent: function() {
$('oobe-hid-detection-md').i18nUpdateLocale();
},
}; };
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment