commit | f8119b9be8440b231a19c0b4019310cfa8065433 | [log] [tgz] |
---|---|---|
author | David 'Digit' Turner <digit@google.com> | Wed Jan 09 15:41:09 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 09 15:41:09 2019 |
tree | 06e95b34db0461fcef3e5a87af9b104de4658442 | |
parent | 47376a4906a967d2787b6893506b97d9d81e98e9 [diff] |
android: Add check_android_grit_strings.py This CL adds a new script that can be used to check, and potentially fix, the list of Android localized string resource files that are provided in GRIT input files (.grd) and BUILD.gn files. In particular, it checks that: - Android localized string resource .xml files are generated by GRIT for all supported Chrome locales. These corresponds to <output> elements that use the type="android" attribute. - That the output lists in BUILD.gn files also list resources for all supported Chrome locales. The --scan-dir <dir> option can be used to check for all files under a specific directory, and the --fix-inplace option can be used to try fixing any file that doesn't pass the check. This can be very handy to avoid tedious and repetitive work when adding new translations / locales to the Chrome code base, since this script can update said input files for you. Important note: checks and fix may fail on some input files. For example remoting/resources/remoting_strings.grd contains an in-line comment element inside its <outputs> section that breaks the script. The check will fail, and trying to fix it too, but at least the file will not be modified. This will be used in a later CL that adds the result of running: build/android/check_android_grit_strings.py --scan-dir . --fix-inplace Plus other necessary adjustments. R=agrieve@chromium.org,estevenson@chromium.org,yfriedman@chromium.org,torne@chromium.org BUG=882860 Change-Id: I04eb31072abd075f44763e16d871ada1d4c32277 Reviewed-on: https://chromium-review.googlesource.com/c/1402879 Commit-Queue: David Turner <digit@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#621154}
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 .