commit | 9d3b552fbd8284e468333c7ba75f12b8e3d431c8 | [log] [tgz] |
---|---|---|
author | Jordy Greenblatt <jordynass@chromium.org> | Wed May 22 01:37:02 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed May 22 01:37:02 2019 |
tree | c58f8e62077076fc84018567c975e7b7c3ec1aa6 | |
parent | 1f19f802d9bae753ea52171577a69eefcce92d0b [diff] |
[CrOS MultiDevice] Make strings in OOBE setup translate. The crbug.com/945632 pointed out that the MultiDevice setup OOBE UI showed an unfortunate behavior in other languages: only one string on the page translated [1]. It turned out there were a few different problems masking one another. First, the start-setup-page element did not bind its translations to I18nBehavior.locale, which is the standard mechanism for passing location data in OOBE. Once that was fixed, it became clear that the OOBE screen 'MultiDeviceSetupScreen' was not notifying any Multidevice Polymer elements of locale updates so the I18nBehavior.locale bindings were not receiving updates. Also, because the buttons and headings were translated in ui_page_container_behavior.js, those translations had to be bound to I18nBehavior.locale separately. I also moved those translations to more visible locations and used the literal string IDs instead of factoring out the string IDs and computing the translations in the UiPageContainerBehavior in an effort to make the data flow more transparent. The next big issue was that the strings with placeholders were not registered appropriately in OOBE localization. This difference didn't become clear until the binding issue was resolved because there was no visible difference in the behavior of the placeholder strings and the other strings until that point. Also, because the registration infrastructure in OOBE uses a totally different API, the placeholder strings were translating correctly post OOBE, which added to the confusion. See multidevice_setup_localized_strings_provider.cc for the relevant change. After this change, the start-setup-page translates strings correctly in OOBE [2] (this is the only MultiDevice screen in the OOBE flow) and post-OOBE [3] along with the password-page [4] and setup-succeeded-page [5]. Once this change is merged into the current branch (i.e. the immediate fire is out), we can simplify multidevice_setup_localized_string_provider.cc by splitting up the strings with placeholders into regular strings and concatenatng them manually in HTML (see crbug.com/961841). [1] https://screenshot.googleplex.com/w2tWTTZJkvj [2] https://screenshot.googleplex.com/dGvFOTQozLH [3] https://screenshot.googleplex.com/9GuB8bwkqS4 [4] https://screenshot.googleplex.com/QGZc9aaEdtE [5] https://screenshot.googleplex.com/FCAWDNTTVn4 Bug: 945632 Change-Id: I141e925e70550b1e33b06aef25ed4f72a06d5988 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1591965 Commit-Queue: Jordy Greenblatt <jordynass@chromium.org> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Reviewed-by: Alexander Alekseev <alemate@chromium.org> Cr-Commit-Position: refs/heads/master@{#662029}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .