New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 678434 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: UI localization and internalization

Project Member Reported by hungte@chromium.org, Jan 5 2017

Issue description

Currently the factory UI has hard-coded two locales for UI elements, as label_en and label_zh.

This is not appropriate since
 - source needs to be UTF-8 (and add the encoding flags everywhere)
 - making messages in source duplicated
 - complex logic to select right label, even if we're always displaying only 1.
 - only supporting one additional locale.
 - bloated test list

We should migrate to python gettext or other alternatives to support multilingual.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5c2ca8a102d4cf32d5b0ee7359853bae056a7521

commit 5c2ca8a102d4cf32d5b0ee7359853bae056a7521
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Jan 04 23:59:56 2017

devtools: Add msgfmt.py and pygettext.py from Python source.

To prepare for I18N, we need the Python version of gettext tools.
It's released in Python source archive but no in binary packages,
and we will make some modification to help parsing Python source
in factory test lists so these files will be copied into source
tree from:
 http://svn.python.org/projects/python/trunk/Tools/i18n/

BUG= chromium:678434 
TEST=None

Change-Id: I940ca8a5fe16c764a3301d300989c509928f8aa3
Reviewed-on: https://chromium-review.googlesource.com/425172
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[add] https://crrev.com/5c2ca8a102d4cf32d5b0ee7359853bae056a7521/devtools/mk/msgfmt.py
[add] https://crrev.com/5c2ca8a102d4cf32d5b0ee7359853bae056a7521/devtools/mk/pygettext.py

Comment 2 by hungte@chromium.org, Jan 25 2017

Owner: hungte@chromium.org
Status: Started (was: Untriaged)
Cc: pihsun@chromium.org

Comment 4 by hungte@chromium.org, Feb 24 2017

Cc: hungte@chromium.org
Owner: pihsun@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/4fc15ae90692998676caf67962cd17f34c2a5f5a

commit 4fc15ae90692998676caf67962cd17f34c2a5f5a
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Mar 06 12:44:13 2017

test_lists: Migrate to new i18n library.

Change test_lists to use the new i18n library when passing dargs to
pytests.

BUG= chromium:678434 
TEST=make test

Change-Id: I01f89772aade77072f5d49ee148ed345ae4e2853
Reviewed-on: https://chromium-review.googlesource.com/448342
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_smt.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/po/zh-CN.po
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/firmware_stress_generic.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/tools/deps.conf
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_fatp.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_run_in.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_vswr.py
[modify] https://crrev.com/4fc15ae90692998676caf67962cd17f34c2a5f5a/py/test/test_lists/generic_grt.py

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492

commit ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 07 12:17:32 2017

Use goofy.alert instead of alert in some pytests.

Some pytests use alert to show message with both Chinese and English in
it. In order to do proper I18n, change them to use goofy.alert, and
alert message according to what the current used locale is.

BUG= chromium:678434 
TEST=make test
TEST=manually, test pytest touchpad on device, and put three fingers on
     touchpad.

Change-Id: I42832331e6a7040d6afbca661005d33a56845dc9
Reviewed-on: https://chromium-review.googlesource.com/448599
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>

[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/py/test/pytests/touchscreen_calibration/touchscreen_calibration.js
[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/po/zh-CN.po
[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/py/test/fixture/touchscreen_calibration/fixture.py
[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/py/test/test_ui.py
[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/py/test/pytests/touchpad.py
[modify] https://crrev.com/ba53dfe7d82aa6f287bff8e3e19d3f86f1f17492/py/test/pytests/touchscreen_calibration/touchscreen_calibration.py

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/16efc171c23234268dd0edd00f5035cb5d94245d

commit 16efc171c23234268dd0edd00f5035cb5d94245d
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Mar 13 07:49:23 2017

pytests: Add i18n support for pytest static HTML.

Add support for i18n of pytest static HTML using html class
'i18n-label'.

BUG= chromium:678434 
TEST=make test
TEST=manually, run pytest audio_diagnostic and verify that toggling
     language works.

Change-Id: I05defcf286eb41986e1035043660e56497797e1a
Reviewed-on: https://chromium-review.googlesource.com/449479
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/testdata/html_translator/output.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/countdown.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/po/Makefile
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/ui_templates.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/unittest_test_case.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/light_sensor_static/light_sensor.html
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/html_translator_unittest.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/test_ui.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/audio_diagnostic_static/audio_diagnostic.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/po/README.md
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/countdown_static/countdown.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/goofy/static/ui_templates/template_one_scrollable_section.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/goofy/static/css/goofy.css
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/translation.py
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/testdata/html_translator/unmatched_tag.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/video_playback_static/video_playback.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/audio_quality_static/audio_quality.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/devtools/mk/pygettext.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/touchscreen_calibration/touchscreen_calibration.html
[rename] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/countdown_static/countdown.css
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/camera_fixture_static/camera_fixture.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/pytests/vswr/vswr.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/po/zh-CN.po
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/test_ui.py
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/html_translator.py
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/goofy/static/ui_templates/template_one_section.html
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/testdata/html_translator/unclosed_tag.html
[modify] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/goofy/static/ui_templates/template_two_sections.html
[add] https://crrev.com/16efc171c23234268dd0edd00f5035cb5d94245d/py/test/i18n/testdata/html_translator/input.html

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/80e78b48b9206992fde6cdaa6c44e68586154cd8

commit 80e78b48b9206992fde6cdaa6c44e68586154cd8
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 21 13:52:07 2017

goofy.js: Add i18n support.

Add I18n support for goofy.js, so text in frontend UI can be properly
internationalized.

BUG= chromium:678434 
TEST=make test

Change-Id: Ifab8096e4b104c8954cf3612016ff54dc57848ce
Reviewed-on: https://chromium-review.googlesource.com/452140
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/test/i18n/translation.py
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/goofy_unittest.py
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/po/Makefile
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/po/zh-CN.po
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/devtools/mk/pygettext.py
[add] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/js/i18n.js
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/goofy.py
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/static/Makefile
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/test/i18n/translation_unittest.py
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/static/index.html
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/js/goofy.js
[modify] https://crrev.com/80e78b48b9206992fde6cdaa6c44e68586154cd8/py/goofy/js/diagnosis_tool.js

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c9c6a9af25dda2aae69eebefafd1225749e8d44d

commit c9c6a9af25dda2aae69eebefafd1225749e8d44d
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 21 13:52:07 2017

goofy.js: revise to use goog.html.SafeHtml.

Use SafeHtml related functions instead of manually concat strings
everywhere, so that:
* We don't need to remember goog.string.htmlEscape everywhere.
* It's more robust for future closure-library upgrade.
  (e.g. The recent version of closure-library would escape string passed
   to dialog.setContent(), and we're passing HTML into that function in
   many places.)

BUG= chromium:678434 
TEST=make test

Change-Id: I61ab4f2e83c30c637688bb8c6a514aa481e4efbe
Reviewed-on: https://chromium-review.googlesource.com/454322
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/c9c6a9af25dda2aae69eebefafd1225749e8d44d/po/zh-CN.po
[modify] https://crrev.com/c9c6a9af25dda2aae69eebefafd1225749e8d44d/py/goofy/js/i18n.js
[modify] https://crrev.com/c9c6a9af25dda2aae69eebefafd1225749e8d44d/po/Makefile
[modify] https://crrev.com/c9c6a9af25dda2aae69eebefafd1225749e8d44d/py/goofy/js/goofy.js
[modify] https://crrev.com/c9c6a9af25dda2aae69eebefafd1225749e8d44d/py/goofy/js/diagnosis_tool.js

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/422c4e38a1a071a7baed98fd060c37c301bbe090

commit 422c4e38a1a071a7baed98fd060c37c301bbe090
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 21 15:50:08 2017

test_ui: Change addVirtualkey to use new i18n library.

Change addVirtualkey to use new i18n library in both test_ui.py and
goofy.js.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     virtual keys label do change.

Change-Id: I90ec6114127346c578f854ddfe6624278c7ce6c9
Reviewed-on: https://chromium-review.googlesource.com/456438
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/422c4e38a1a071a7baed98fd060c37c301bbe090/po/zh-CN.po
[modify] https://crrev.com/422c4e38a1a071a7baed98fd060c37c301bbe090/po/Makefile
[modify] https://crrev.com/422c4e38a1a071a7baed98fd060c37c301bbe090/py/goofy/js/goofy.js
[modify] https://crrev.com/422c4e38a1a071a7baed98fd060c37c301bbe090/py/test/test_ui.py

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c46c2c22089005481dbf18a57475424cf2355e94

commit c46c2c22089005481dbf18a57475424cf2355e94
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 21 15:50:09 2017

Change countdown_timer.py to use new i18n library.

BUG= chromium:678434 
TEST=make test

Change-Id: I85b51b4812225272d9e371773117e7357dd22db3
Reviewed-on: https://chromium-review.googlesource.com/456439
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/c46c2c22089005481dbf18a57475424cf2355e94/po/zh-CN.po
[modify] https://crrev.com/c46c2c22089005481dbf18a57475424cf2355e94/py/test/countdown_timer.py

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/1786faef67bac4408312a48c65b8f32e6a8c418c

commit 1786faef67bac4408312a48c65b8f32e6a8c418c
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 21 15:50:08 2017

pygettext: Rewrite python extractor to use ast instead of tokenize.

Makes the code much shorter and easier to modify if we need to
specialize the function to extract other things. (For example, we might
need to write methods to extract labels and ids from test lists, which
use keyword arguments, and is not easy to do without false positive
using token based method.)

BUG= chromium:678434 
TEST=make test
TEST=make -C po update, and check that po/zh-CN.po remains the same
     except for timestamp.

Change-Id: Ib0666f1cebe3af0a40e1781dbb40b4ddb2a5fac3
Reviewed-on: https://chromium-review.googlesource.com/456957
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/1786faef67bac4408312a48c65b8f32e6a8c418c/devtools/mk/pylint.blacklist
[modify] https://crrev.com/1786faef67bac4408312a48c65b8f32e6a8c418c/devtools/mk/pygettext.py

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/29d005cd1e6539c02c5899c213f7721a450251de

commit 29d005cd1e6539c02c5899c213f7721a450251de
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Mar 22 11:23:19 2017

test_list: Change FactoryTest to use new i18n library.

Change FactoryTest to use new i18n library, and change all related codes
in both backend and frontend.

The old label_en and label_zh is preserved to avoid breaking existing
test list, and should be removed when all test lists are using new
format.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     test labels is correct.

Change-Id: I6569479033e72897014e4ebcb4f9f81fb98bc76f
Reviewed-on: https://chromium-review.googlesource.com/456440
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/goofy/goofy_rpc.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/ui_templates.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/goofy/invocation.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/test_ui.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/factory.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/test_lists/test_lists.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/i18n/string_utils.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/test/i18n/__init__.py
[modify] https://crrev.com/29d005cd1e6539c02c5899c213f7721a450251de/py/goofy/js/goofy.js

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/9a5ab42773683d208f9c2c955c8e3f1932bf5e82

commit 9a5ab42773683d208f9c2c955c8e3f1932bf5e82
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Mar 22 13:28:43 2017

pytests: Remove all use of test_ui.MakeLabel

Change a few places that are still using the old test_ui.MakeLabel to
i18n.test_ui.MakeI18nLabel.

All codes are using i18n.test_ui.MakeI18nLabel after this CL.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     test labels is correct.

Change-Id: I826d3dc8882ce7190541d4c9fb30ce9a0d92e435
Reviewed-on: https://chromium-review.googlesource.com/456996
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/9a5ab42773683d208f9c2c955c8e3f1932bf5e82/po/zh-CN.po
[modify] https://crrev.com/9a5ab42773683d208f9c2c955c8e3f1932bf5e82/py/test/test_ui.py

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/a30ea911fa7f71b07eb151a479a4c10d823321eb

commit a30ea911fa7f71b07eb151a479a4c10d823321eb
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Mar 23 10:30:56 2017

test_list: Migrate all test lists to new i18n library.

Migrate all test lists to use the new label argument, instead of old
label_en and label_zh.

BUG= chromium:678434 
TEST=make test

Change-Id: I34a11feb6ec26a018f17540846b9ab4426fe0930
Reviewed-on: https://chromium-review.googlesource.com/456938
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/probe/README.md
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/tablet_rotation.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_run_in.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_diagnostic.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/goofy/goofy_unittest.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/rf_radiated/rf_radiated.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/accelerometers_lid_angle.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/arduino_digital_pins.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/goofy/js/goofy.js
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/touchscreen_uniformity.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/rf_graphyte/README.md
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/ext_display/ext_display.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/scan/scan_e2etest.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/firmware_stress_generic.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/sensor_movement.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_experiment.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/station_based_test_list.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/probe/probe.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_tsab.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/backlight_max_brightness_vpd.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_smt.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/rf_graphyte/rf_graphyte.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/test_lists.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_fatp.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/goofy/test_list_iterator_unittest.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/TEST_LIST.md
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/goofy/goofy_rpc.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/po/zh-CN.po
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/accelerometers_calibration.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/lte_verify_config.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/factory.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/audio_loop/audio_loop.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/mrc_cache.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_vswr.py
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/pytests/offline_test/shell/README.md
[modify] https://crrev.com/a30ea911fa7f71b07eb151a479a4c10d823321eb/py/test/test_lists/generic_grt.py

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/1535ad2253458df8d70955a201ba1ee2e24b3eac

commit 1535ad2253458df8d70955a201ba1ee2e24b3eac
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Mar 23 10:30:56 2017

scan_automator: Use device_data_key to match instead of label.

Use args.device_data_key and args.check_device_data_key for scan pytest
to detect which things we're scanning in automator. This is more robust
and also fix problem from i18n changes. (since args.label_en is being
replaced by args.label)

BUG= chromium:678434 
TEST=make test

Change-Id: Id64cf000816ec567e256d5ea51ddc42adbcde1ac
Reviewed-on: https://chromium-review.googlesource.com/456985
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/1535ad2253458df8d70955a201ba1ee2e24b3eac/py/test/pytests/scan/scan_automator.py

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/3b0bb9f44db38d29781b285179051709c820a20c

commit 3b0bb9f44db38d29781b285179051709c820a20c
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Mar 27 17:57:15 2017

goofy.js: Change from goofy.zhMode to goofy.locale.

Change goofy.js to use locale instead of a simple boolean zhMode to
toggle Chinese mode.

Also change the name of stored shared data and the test list option from
ui_lang to ui_locale, to better reflect what is actually stored.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     test labels are correct.

Change-Id: Id557cc6c5824e0e23d32bc992d07269c7206ca7b
Reviewed-on: https://chromium-review.googlesource.com/457303
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/test/test_lists/firmware_stress.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/test/test_ui.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/test/factory.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/test/test_lists/generic.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/goofy/static/css/goofy.css
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/goofy/goofy.py
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/goofy/static/index.html
[modify] https://crrev.com/3b0bb9f44db38d29781b285179051709c820a20c/py/goofy/js/goofy.js

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f

commit ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f
Author: Peter Shih <pihsun@chromium.org>
Date: Tue Mar 28 10:47:46 2017

goofy: Change index.html to use the new i18n library.

Extract hard-coded translations in goofy/static/index.html, and add a
transform step when registering index.html static page.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     "Engineering Mode" label can be toggled.

Change-Id: I1ce03fc5c5e81a5aedbe8d1aaf269686820461bb
Reviewed-on: https://chromium-review.googlesource.com/457378
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/goofy/goofy_unittest.py
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/po/Makefile
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/po/zh-CN.po
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/test/i18n/html_translator.py
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/goofy/goofy_server.py
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/goofy/goofy.py
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/goofy/goofy_server_unittest.py
[modify] https://crrev.com/ce03c2e27dc6e8fc2eec5278ed084487b6e4b48f/py/goofy/static/index.html

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/70434850e25573a093f2f66bb95eaf590084a614

commit 70434850e25573a093f2f66bb95eaf590084a614
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Apr 17 10:30:44 2017

i18n: Use placeholder text for unknown key in StringFormat.

When there's unknown key in translation's format string, str.format()
would raise KeyError, which is too harsh since it would cause the whole
test to fail.

We can use custom formatter to put placeholder text when unknown key is
encountered, and log a warning message instead.

BUG= chromium:678434 
TEST=make test

Change-Id: I5ccd0788a173162cbfa5c2545640e70fac68dd65
Reviewed-on: https://chromium-review.googlesource.com/458464
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/70434850e25573a093f2f66bb95eaf590084a614/py/test/i18n/string_utils.py
[modify] https://crrev.com/70434850e25573a093f2f66bb95eaf590084a614/py/test/i18n/string_utils_unittest.py

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d8af143bc9089d88115e4a781850b67c4a9eff26

commit d8af143bc9089d88115e4a781850b67c4a9eff26
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Apr 19 15:23:07 2017

i18n: Add unittest for sanity check of po files.

Add a unittest to check for basic sanity check of po files translations:

* Check that all variables used in translation's format string is also
  used in the default locale's format string.
* Check that there's no use of positional argument in format string.
* Check that str.format can actually succeed.
  (This can only catch "Unknown conversion specifier" error like
  '{1!z}', but can't catch format_spec error, since we don't know the
  argument type.)

BUG= chromium:678434 
TEST=make test

Change-Id: I433bdf9129f64694f69c537c9d1b5c8f61231c50
Reviewed-on: https://chromium-review.googlesource.com/457943
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[add] https://crrev.com/d8af143bc9089d88115e4a781850b67c4a9eff26/po/po_check_unittest.py

Project Member

Comment 22 by bugdroid1@chromium.org, Apr 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5833ebedb7b482c6d802b96cfcc88c0801db5836

commit 5833ebedb7b482c6d802b96cfcc88c0801db5836
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Apr 20 16:21:46 2017

html_translator: Fix handling of boolean attribute.

For boolean attributes in HTML
(https://html.spec.whatwg.org/#boolean-attributes),
the value parsed by HTMLParser would be None, which cause exception be
raised from cgi.escape. Fix this by output the boolean attribute as is.

BUG= chromium:678434 
TEST=make test

Change-Id: I0c7c5227515de715b803c616d4ffbeb2e763c565
Reviewed-on: https://chromium-review.googlesource.com/481500
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/5833ebedb7b482c6d802b96cfcc88c0801db5836/py/test/i18n/testdata/html_translator/output.html
[modify] https://crrev.com/5833ebedb7b482c6d802b96cfcc88c0801db5836/py/test/i18n/testdata/html_translator/input.html
[modify] https://crrev.com/5833ebedb7b482c6d802b96cfcc88c0801db5836/py/test/i18n/html_translator.py

Project Member

Comment 23 by bugdroid1@chromium.org, Apr 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/b0c3578f02d13208591c57fc29406ebb4b227b36

commit b0c3578f02d13208591c57fc29406ebb4b227b36
Author: Peter Shih <pihsun@chromium.org>
Date: Fri Apr 21 13:03:53 2017

pygettext: Add extractor for JSON-style test lists.

Add i18n message extractor for new JSON-style test lists.

Since this also refactor the part for handling Javascript source code,
the order of the messages in po/zh-CN.po is changed a lot, but the
entries are actually the same.

BUG= chromium:678434 
TEST=make test
CQ-DEPEND=CL:438984

Change-Id: I6d66a344570cb9323c4bef21fe2ae4ec988de1eb
Reviewed-on: https://chromium-review.googlesource.com/483221
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/b0c3578f02d13208591c57fc29406ebb4b227b36/po/zh-CN.po
[modify] https://crrev.com/b0c3578f02d13208591c57fc29406ebb4b227b36/devtools/mk/pygettext.py
[modify] https://crrev.com/b0c3578f02d13208591c57fc29406ebb4b227b36/po/Makefile

Project Member

Comment 24 by bugdroid1@chromium.org, May 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5c027e30be0ff859ade6a87436af1ec380c79bfa

commit 5c027e30be0ff859ade6a87436af1ec380c79bfa
Author: Peter Shih <pihsun@chromium.org>
Date: Wed May 03 13:16:44 2017

i18n: Fix unicode handling problem.

There are places where the passed in dict to Translated would contains
text that are of type str, but are actually having content UTF-8
encoded (For example, label got from metadata in ui_template).

Since all i18n handling assume that the text is of type unicode, we
convert them to unicode if the value is str by UTF-8 decoding.

BUG= chromium:678434 
TEST=make test
TEST=manually, run a test with label manually set to non-ascii character
     in test list, and see no exception.

Change-Id: Ide262758d4cbe0fc4b114ff20bf1095a45917729
Reviewed-on: https://chromium-review.googlesource.com/494367
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/5c027e30be0ff859ade6a87436af1ec380c79bfa/py/test/i18n/translation.py
[modify] https://crrev.com/5c027e30be0ff859ade6a87436af1ec380c79bfa/py/utils/string_utils_unittest.py
[modify] https://crrev.com/5c027e30be0ff859ade6a87436af1ec380c79bfa/py/utils/string_utils.py
[modify] https://crrev.com/5c027e30be0ff859ade6a87436af1ec380c79bfa/py/test/i18n/translation_unittest.py

Project Member

Comment 25 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/f322a354db005db3e466370e2520ce10c02b6ff9

commit f322a354db005db3e466370e2520ce10c02b6ff9
Author: Peter Shih <pihsun@chromium.org>
Date: Thu May 11 08:58:52 2017

test_lists: Add migration script for test lists

Add a simple migration script to convert most changes in labels and
pytests dargs in test lists automatically.

BUG= chromium:678434 
TEST=make test
TEST=manually test the script

Change-Id: I14fc2f03f596dfb52f2e1db8f4162e0c1da09184
Reviewed-on: https://chromium-review.googlesource.com/458041
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[add] https://crrev.com/f322a354db005db3e466370e2520ce10c02b6ff9/devtools/i18n/migrate_test_lists/README.md
[add] https://crrev.com/f322a354db005db3e466370e2520ce10c02b6ff9/devtools/i18n/migrate_test_lists/fix_test_list_label.py
[modify] https://crrev.com/f322a354db005db3e466370e2520ce10c02b6ff9/po/Makefile
[add] https://crrev.com/f322a354db005db3e466370e2520ce10c02b6ff9/devtools/i18n/migrate_test_lists/migrate.py
[add] https://crrev.com/f322a354db005db3e466370e2520ce10c02b6ff9/devtools/i18n/migrate_test_lists/main.py

Project Member

Comment 26 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d5f5d7b2286b7eb3797f3fddcad2230b7d102e80

commit d5f5d7b2286b7eb3797f3fddcad2230b7d102e80
Author: Peter Shih <pihsun@chromium.org>
Date: Thu May 11 08:58:52 2017

Change wait_external_test to use the new i18n library.

BUG= chromium:678434 
TEST=make test

Change-Id: I292f1a58cbddd220468437d80d95706c7bf626c7
Reviewed-on: https://chromium-review.googlesource.com/458358
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/d5f5d7b2286b7eb3797f3fddcad2230b7d102e80/po/zh-CN.po
[modify] https://crrev.com/d5f5d7b2286b7eb3797f3fddcad2230b7d102e80/py/test/pytests/wait_external_test.py

Project Member

Comment 27 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d

commit baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d
Author: Peter Shih <pihsun@chromium.org>
Date: Thu May 11 08:58:52 2017

audio_diagnostic: Internationalize select dropdown.

Internationalize select dropdown in audio_diagnostic.html, and change
the selected option to the one with correct translated text when the
locale is changed.

BUG= chromium:678434 
TEST=make test
TEST=manually, run pytest audio_diagnostic on a device, toggle locale
     and make sure the select dropdown has correct text.

Change-Id: I5d5a07bf5a55aebf8f87d4324aad874651c8e7b8
Reviewed-on: https://chromium-review.googlesource.com/459840
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d/po/zh-CN.po
[modify] https://crrev.com/baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d/py/test/pytests/audio_diagnostic_static/audio_diagnostic.html
[modify] https://crrev.com/baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d/py/test/pytests/audio_diagnostic_static/audio_diagnostic.js
[modify] https://crrev.com/baadcaf4eeede81475c7e3bdb78ca55ff8dc7b7d/py/goofy/js/goofy.js

Project Member

Comment 28 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/f6cf51aea8bc41ca82b754a9f52c5ef1c50f0c55

commit f6cf51aea8bc41ca82b754a9f52c5ef1c50f0c55
Author: Peter Shih <pihsun@chromium.org>
Date: Fri May 19 09:25:19 2017

make_e2e_unittest: Add tests for BOARD argument.

Add end to end tests for BOARD argument. Since it's hard to mock the
return value of equery-board in Makefile, we set BOARD_FILES_DIR
directly.

BUG= chromium:678434 
TEST=make test

Change-Id: I535cd2adfea8104d2347b08ee0c187a933747618
Reviewed-on: https://chromium-review.googlesource.com/461038
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/f6cf51aea8bc41ca82b754a9f52c5ef1c50f0c55/po/make_e2e_unittest.py
[modify] https://crrev.com/f6cf51aea8bc41ca82b754a9f52c5ef1c50f0c55/devtools/mk/pygettext.py

Project Member

Comment 29 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/f65db93e2eb7005ef59cd721150b78a41192a112

commit f65db93e2eb7005ef59cd721150b78a41192a112
Author: Peter Shih <pihsun@chromium.org>
Date: Fri May 19 20:57:25 2017

goofy: Add locale selector UI for more than 2 locales.

Change the locale selector UI from a toggle button to a dropdown when
number of locales are larger than 2.

BUG= chromium:678434 
TEST=make test
TEST=manually, run test on a device, toggle locale and make sure the
     test labels is correct.
TEST=manually, add a dummy third locale by "LOCALE=xx-YY make -C po
     init", and test that the dropdown works.

Change-Id: Ib2d25d486550a39476364e8616d44d0cbf0a916d
Reviewed-on: https://chromium-review.googlesource.com/458297
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/goofy_unittest.py
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/po/Makefile
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/po/zh-CN.po
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/test/test_ui.py
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/js/i18n.js
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/test/i18n/test_ui.py
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/static/css/goofy.css
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/goofy.py
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/static/index.html
[modify] https://crrev.com/f65db93e2eb7005ef59cd721150b78a41192a112/py/goofy/js/goofy.js

Project Member

Comment 30 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/9250148231298a6db3b3c045dbd2bfda73c86c39

commit 9250148231298a6db3b3c045dbd2bfda73c86c39
Author: Peter Shih <pihsun@chromium.org>
Date: Fri May 19 20:57:25 2017

pytests: Migrate static javascripts to new i18n library.

BUG= chromium:678434 
TEST=make test
TEST=manually run pytests on DUT.

Change-Id: I42e4d62706b843532704e4374ccafd6560f12c47
Reviewed-on: https://chromium-review.googlesource.com/505792
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/audio_loop/audio_loop.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/po/Makefile
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/po/zh-CN.po
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/camera_fixture_static/camera_fixture.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/display_idle_static/display_idle.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/backlight_static/backlight.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/display_point_static/display_point.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/keyboard/static/keyboard.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/touchscreen_static/touchscreen.js
[modify] https://crrev.com/9250148231298a6db3b3c045dbd2bfda73c86c39/py/test/pytests/display_static/display.js

Project Member

Comment 31 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/1022282f2992402639cd6afd1c091387cc8c5983

commit 1022282f2992402639cd6afd1c091387cc8c5983
Author: Peter Shih <pihsun@chromium.org>
Date: Tue May 23 12:57:13 2017

pytest: Remove BackwardCompatibleI18nArgs.

Remove BackwardCompatibleI18nArgs to clean up code base.

BUG= chromium:678434 
TEST=make test

Change-Id: I3f1d6991efe327bb1e8345c73f07b2ab66bd6b3b
Reviewed-on: https://chromium-review.googlesource.com/511784
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/countdown.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/i18n/arg_utils.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/line_check_item.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/wait_external_test.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/message/message.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/scan/scan.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/removable_storage/removable_storage.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/brightness/brightness.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/button.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/pytests/brightness/lcd_backlight.py
[modify] https://crrev.com/1022282f2992402639cd6afd1c091387cc8c5983/py/test/i18n/arg_utils_unittest.py

Project Member

Comment 32 by bugdroid1@chromium.org, May 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/0754b651c8dcf09250185d47460c99ba9729a35d

commit 0754b651c8dcf09250185d47460c99ba9729a35d
Author: Peter Shih <pihsun@chromium.org>
Date: Tue May 23 12:57:13 2017

i18n: Remove accept_tuple from I18nArg.

Remove accept_tuple argument from I18nArg to clean up code base.

BUG= chromium:678434 
TEST=make test

Change-Id: Ia2a075da186d6df2f70f0a8f28b81c9d69cdd8aa
Reviewed-on: https://chromium-review.googlesource.com/511785
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/i18n/translation.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/pytests/audio_basic.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/i18n/arg_utils.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/pytests/audio.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/pytests/display_images.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/pytests/start/start.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/i18n/translation_unittest.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/pytests/spatial_sensor_calibration.py
[modify] https://crrev.com/0754b651c8dcf09250185d47460c99ba9729a35d/py/test/i18n/arg_utils_unittest.py

Project Member

Comment 34 by bugdroid1@chromium.org, Jun 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/eb9c5a3ca8a02194d3d73fee08203f512164a141

commit eb9c5a3ca8a02194d3d73fee08203f512164a141
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Jun 29 14:17:11 2017

po_check_unittest: Add more test for po file.

* Add test that checks there's no '#, fuzzy' in the po file.
* Add test that ensure 'make -C po update' is run when there is any
  change that needs to update po file.

BUG= chromium:678434 
TEST=make test

Change-Id: I19e07d46a5dc9fc1ac9967f0899bb8717f8f6f70
Reviewed-on: https://chromium-review.googlesource.com/554421
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/eb9c5a3ca8a02194d3d73fee08203f512164a141/po/po_check_unittest.py

Project Member

Comment 35 by bugdroid1@chromium.org, Jul 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/64d4a8629b37186582a6103d26d8bfe1edde0e13

commit 64d4a8629b37186582a6103d26d8bfe1edde0e13
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Jul 05 21:24:47 2017

goofy_rpc: i18n cleanup.

The i18n.Translated should be not needed, since the FactoryTest would
guarantee that .label is already a dict. Also change 'en-US' to
translation.DEFAULT_LOCALE.

BUG= chromium:678434 
TEST=make test

Change-Id: I5655ad2afb787a31ca8032fba5473936a2bd7256
Reviewed-on: https://chromium-review.googlesource.com/558841
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/64d4a8629b37186582a6103d26d8bfe1edde0e13/py/goofy/goofy_rpc.py

Project Member

Comment 36 by bugdroid1@chromium.org, Jul 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d11f0c2fecace8bd1aede72ff391caa4eee316dd

commit d11f0c2fecace8bd1aede72ff391caa4eee316dd
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Jul 05 21:24:45 2017

i18n: Remove label_en, label_zh in FactoryTest.

label_en and label_zh are backward compatible path, and should be
removed to make the code cleaner.

BUG= chromium:678434 
TEST=make test

Change-Id: I689f6ee3ab162cafbccb4eeec173ace718a51b82
Reviewed-on: https://chromium-review.googlesource.com/559206
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/d11f0c2fecace8bd1aede72ff391caa4eee316dd/po/zh-CN.po
[modify] https://crrev.com/d11f0c2fecace8bd1aede72ff391caa4eee316dd/py/test/factory.py
[modify] https://crrev.com/d11f0c2fecace8bd1aede72ff391caa4eee316dd/py/test/test_lists/test_lists.py

Project Member

Comment 37 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/84eece8068bcc30e146525f8c0e8958a4715bd3b

commit 84eece8068bcc30e146525f8c0e8958a4715bd3b
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Jul 06 12:00:29 2017

pygettext: Add some syntax sugar for JSON test list.

* Assume that value for key "label" is I18n message by default.
* Add label generated by pytest_name to message.

BUG= chromium:678434 ,b:36206161
TEST=make test
TEST=manually

Change-Id: Ie01f9939fb36b34a3580f3a8c9cc71b720512adf
Reviewed-on: https://chromium-review.googlesource.com/560931
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/84eece8068bcc30e146525f8c0e8958a4715bd3b/devtools/mk/pygettext.py

Project Member

Comment 38 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/783e01cf3fef139b207683fbba54e777f164cea8

commit 783e01cf3fef139b207683fbba54e777f164cea8
Author: Peter Shih <pihsun@chromium.org>
Date: Fri Jul 07 11:09:59 2017

po: Add all pytest names to i18n messages.

Add labels generated from all pytest names to i18n messages, so we don't
need to specify label in most case, and use the label derived from
pytest_name directly in test list.

Also remove the syntax sugar of JSON test list specific one in last
commit, since it's covered by this commit, and would cause confusion in
file name in .po file.

BUG= chromium:678434 
TEST=make test

Change-Id: I9ee9be9a83cc6af383233ee9de11209c44b9e64d
Reviewed-on: https://chromium-review.googlesource.com/561237
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/po/README.md
[add] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/py/tools/list_pytests.py
[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/po/Makefile
[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/po/zh-CN.po
[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/devtools/mk/pygettext.py
[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/py/test/factory.py
[modify] https://crrev.com/783e01cf3fef139b207683fbba54e777f164cea8/py/test/factory_unittest.py

Project Member

Comment 39 by bugdroid1@chromium.org, Jul 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6b8e13ba69e7b8097353ca4beefc894e03ab1000

commit 6b8e13ba69e7b8097353ca4beefc894e03ab1000
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Jul 10 20:12:08 2017

pygettext: Remove POT-Creation-Date.

The POT-Creation-Date header field cause unnecessary merge conflicts
since the field is updated each time "make -C po update" is called.
Remove the field.

BUG= chromium:678434 
TEST=make test
TEST=Initalize a new locale file, and check the content is correct.

Change-Id: I20297ebd9362abad609daed78561b0eb3b03e94d
Reviewed-on: https://chromium-review.googlesource.com/564748
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/6b8e13ba69e7b8097353ca4beefc894e03ab1000/po/zh-CN.po
[modify] https://crrev.com/6b8e13ba69e7b8097353ca4beefc894e03ab1000/po/po-header
[modify] https://crrev.com/6b8e13ba69e7b8097353ca4beefc894e03ab1000/po/po_check_unittest.py
[modify] https://crrev.com/6b8e13ba69e7b8097353ca4beefc894e03ab1000/devtools/mk/pygettext.py

Project Member

Comment 40 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/8cb63f3a7d20c26a48a69240eef6b6ff85111eaa

commit 8cb63f3a7d20c26a48a69240eef6b6ff85111eaa
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Jul 13 09:44:01 2017

po: Correct list for JSON test list in Makefile

The JSON test list lives in test/test_lists/*.test_list.json, and the
board specific override lives in config/*.test_list.json.

BUG=b:31678190, chromium:678434 
TEST=make test
TEST=manually

Change-Id: I9a54d95371de408bbcb5ca69b317f56fe038c736
Reviewed-on: https://chromium-review.googlesource.com/566206
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>

[modify] https://crrev.com/8cb63f3a7d20c26a48a69240eef6b6ff85111eaa/po/Makefile

Status: Verified (was: Started)
Project Member

Comment 42 by bugdroid1@chromium.org, Sep 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/08692423c06de7b9d18272baf4e4cc1d74df7dfc

commit 08692423c06de7b9d18272baf4e4cc1d74df7dfc
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Sep 21 10:34:27 2017

test_ui: Remove MakeLabel.

Since all ToT board overlays are using new i18n library now, we can
remove this function.

BUG= chromium:678434 
TEST=make test

Change-Id: Iff5dca9b2f181a88ce1e18bc2a173ff50eee089f
Reviewed-on: https://chromium-review.googlesource.com/676765
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/08692423c06de7b9d18272baf4e4cc1d74df7dfc/py/test/test_ui.py

Project Member

Comment 43 by bugdroid1@chromium.org, Sep 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a

commit ade2a9727c4306103b36bc1ce3eb2413ad3fad4a
Author: Peter Shih <pihsun@chromium.org>
Date: Sat Sep 30 06:25:33 2017

i18n: Remove i18n_arg_utils.ParseArg.

Remove the need of manually calling i18n_arg_utils.ParseArg, by adding a
transform argument for arg_utils.Arg, which would be run after the
argument value is resolved.

BUG= chromium:678434 
TEST=make test

Change-Id: Ic083a641d4626edf7bbea324b7fedbc1e23689b8
Reviewed-on: https://chromium-review.googlesource.com/691580
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/audio.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/audio_basic.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/message/message.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/spatial_sensor_calibration.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/i18n/arg_utils.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/line_check_item.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/summary/summary.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/display_images.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/wait_external_test.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/utils/arg_utils.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/start/start.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/scan/scan.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/removable_storage/removable_storage.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/brightness/brightness.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/button.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/battery_current.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/pytests/brightness/lcd_backlight.py
[modify] https://crrev.com/ade2a9727c4306103b36bc1ce3eb2413ad3fad4a/py/test/i18n/arg_utils_unittest.py

Project Member

Comment 44 by bugdroid1@chromium.org, Oct 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1

commit 80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Oct 02 18:23:18 2017

test_ui: Cleanup unused functions.

* Remove GetUILanguage, and use the full locale string for all i18n
  related operations.
* Remove unused variables and functions.

BUG= chromium:770436 , chromium:678434 
TEST=make test
TEST=manually on DUT.

Change-Id: I93fe2d1a238123e8823e42da00a604eefbb0a311
Reviewed-on: https://chromium-review.googlesource.com/693721
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/ok.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/right-channel.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/audio_basic.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/2.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/audio.py
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/memory_size.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/8.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/2.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/lid_switch/lid_switch.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/6.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/left-channel.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/6.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/js/goofy.js
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/3.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/0.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/3.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/9.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/invocation.py
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/summary/summary.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/7.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/7.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/pytests/display.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/1.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/event.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/5.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/0.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/4.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/left-channel.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/8.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/1.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/po/zh-CN.po
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/en-US/ok.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/test_ui.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/4.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/e2e_test/e2e_test.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/right-channel.ogg
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/5.ogg
[modify] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/test/gooftools.py
[rename] https://crrev.com/80e85b0a9bfa6adbbe8128e0536cfa4fb44f72d1/py/goofy/static/sounds/zh-CN/9.ogg

Project Member

Comment 45 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/817dd61038028de476575aec2edcf90cd46d492d

commit 817dd61038028de476575aec2edcf90cd46d492d
Author: Peter Shih <pihsun@chromium.org>
Date: Wed Oct 18 10:30:05 2017

i18n: Move i18n for static HTML to frontend.

Remove html_translator, and move i18n processing for static HTML to
JavaScript instead, so we can serve the HTML file directly without
preprocessing.

This remove the need to remember to add html_translator.TranslateHTML
everywhere we need to serve static HTML file, so we can use some modern
HTML technique (like HTML import) later easily.

This only change how i18n in static HTML is handled.

BUG= chromium:678434 
TEST=make test
TEST=manually on DUT.

Change-Id: I63a565e7ad30d87cc383af4ecffaebad1785f9c7
Reviewed-on: https://chromium-review.googlesource.com/721401
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/po/README.md
[add] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/js/custom_components.js
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/po/Makefile
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/ui_templates/default_test_ui.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/ui_templates.py
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/po/zh-CN.po
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/test_ui.py
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/devtools/mk/pygettext.py
[delete] https://crrev.com/5d553096875b95b83beaa3902a54aaeb44d7af58/py/test/i18n/html_translator.py
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/js/i18n.js
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/ui_templates/template_one_scrollable_section.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/pytests/vswr/vswr.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/ui_templates/template_one_section.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/pytests/audio_diagnostic_static/audio_diagnostic.html
[delete] https://crrev.com/5d553096875b95b83beaa3902a54aaeb44d7af58/py/test/i18n/html_translator_unittest.py
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/pytests/touchscreen_calibration/touchscreen_calibration.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/ui_templates/template_two_sections.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/goofy.py
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/test/pytests/countdown_static/countdown.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/static/index.html
[modify] https://crrev.com/817dd61038028de476575aec2edcf90cd46d492d/py/goofy/js/goofy.js

Project Member

Comment 46 by bugdroid1@chromium.org, Oct 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5ae1e41f24b624aa007f56e43eb75960880c19d9

commit 5ae1e41f24b624aa007f56e43eb75960880c19d9
Author: Peter Shih <pihsun@chromium.org>
Date: Fri Oct 27 11:48:43 2017

i18n: Fix i18n-label containing HTML tags.

We allow HTML tags in i18n-label in static HTML, so handle it in the
code.

BUG= chromium:678434 
TEST=make test
TEST=manually on DUT.

Change-Id: Iab1edfab10907de858084aed1299f30e42ba7368
Reviewed-on: https://chromium-review.googlesource.com/732802
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/5ae1e41f24b624aa007f56e43eb75960880c19d9/py/goofy/static/js/custom_components.js

Project Member

Comment 47 by bugdroid1@chromium.org, Jan 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/a485bee926de49874a3a4014668fc3793c7eea88

commit a485bee926de49874a3a4014668fc3793c7eea88
Author: Peter Shih <pihsun@chromium.org>
Date: Fri Jan 19 14:57:49 2018

i18n: Remove Translation from po/Makefile.

Remove Translation from the list of functions to extract for Python
files in pygettext, since _() covers all usage of Translation() (_(x) is
exactly the same as Translation(x)).

BUG= chromium:678434 ,b:68681772
TEST=make test

Change-Id: I376559a2348c7629151a1bf4402275d8e11e17e2
Reviewed-on: https://chromium-review.googlesource.com/867801
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/a485bee926de49874a3a4014668fc3793c7eea88/po/Makefile

Project Member

Comment 48 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/7f4c9058c845daca9787fb3ef9a9aa5422475c0f

commit 7f4c9058c845daca9787fb3ef9a9aa5422475c0f
Author: Peter Shih <pihsun@chromium.org>
Date: Mon Jul 16 15:03:23 2018

i18n: Add document.

BUG= chromium:678434 ,b:68681772
TEST=make test
TEST=make doc

Change-Id: Ie404cc387591298a96518044803049145da06c49
Reviewed-on: https://chromium-review.googlesource.com/867803
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@chromium.org>

[modify] https://crrev.com/7f4c9058c845daca9787fb3ef9a9aa5422475c0f/doc/test_ui_api.rst
[modify] https://crrev.com/7f4c9058c845daca9787fb3ef9a9aa5422475c0f/doc/test_i18n_api.rst
[modify] https://crrev.com/7f4c9058c845daca9787fb3ef9a9aa5422475c0f/py/test/i18n/arg_utils.py

Sign in to add a comment