Presubmit: Change translation screenshot warnings to errors
Presubmit currently warns when a UI string is missing translation
screenshots. We'll now require all strings to have associated
screenshots. This CL changes the warnings to errors.
Bug: 1087641
Change-Id: I0968dee994e304bd9c7c59bab56d5f1b0325d5d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283261
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: Mustafa Emre Acer <[email protected]>
Cr-Commit-Position: refs/heads/master@{#785613}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 20b5cb7..9ddc700 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -5153,20 +5153,20 @@
results = []
if run_screenshot_check:
if unnecessary_screenshots:
- results.append(output_api.PresubmitNotifyResult(
+ results.append(output_api.PresubmitError(
'Do not include actual screenshots in the changelist. Run '
'tools/translate/upload_screenshots.py to upload them instead:',
sorted(unnecessary_screenshots)))
if missing_sha1:
- results.append(output_api.PresubmitNotifyResult(
+ results.append(output_api.PresubmitError(
'You are adding or modifying UI strings.\n'
'To ensure the best translations, take screenshots of the relevant UI '
'(https://g.co/chrome/translation) and add these files to your '
'changelist:', sorted(missing_sha1)))
if unnecessary_sha1_files:
- results.append(output_api.PresubmitNotifyResult(
+ results.append(output_api.PresubmitError(
'You removed strings associated with these files. Remove:',
sorted(unnecessary_sha1_files)))
else: