2 Star 0 Fork 0

chromium_develop/chromium_tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Translation Tools

This directory contains tools for Chrome's UI translations.

upload_screenshots.py

This tool uploads translation screenshots to a content-addressed Google Cloud Storage bucket.

Translation screenshots are .png files provided by Chrome Developers to give translators more context about UI changes. Developers take screenshots of their UI changes, add them under a specific directory derived from the path of the .grd or .grdp file that contains the UI string and run this tool. The tool uploads the images, generates SHA1 hashes of them, and asks the developer if they want to add the hashes to the CL.

Example: For a file at path/to/test.grd, the screenshot directory will be path/to/test_grd. In the upstream Chrome repository, this directory will only contain .png.sha1 files previously generated by this tool. In local working repositories, it may contain .png files generated by Chrome developers, such as path/to/test_grd/IDS_MESSAGE.png.

Screenshots and the storage bucket are public, do not upload anything confidential.

For more information, see https://g.co/chrome/translation.

Run the tests

The presubmit automatically runs all files named *_unittest.py :

git cl presubmit --force

Alternatively, you can run each test individually:

# Run from this directory (//tools/translation):
python helper/grd_helper_unittest.py
python helper/translation_helper_unittest.py
python upload_screenshots_unittest.py

Run sanity checks

This will attempt to load all .grd and .grdp files in the Chrome repo. Run once before uploading the CL to ensure everything works.

python helper/sanity_check.py
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chromium_develop/chromium_tools.git
git@gitee.com:chromium_develop/chromium_tools.git
chromium_develop
chromium_tools
chromium_tools
master

搜索帮助