Commit 737aeb75 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Ensure invalid message ids are not read

Some roles e.g. ignored (found copiously in Android apps) are never meant to be localized. This also enforces a valid message id for any given string and makes it obvious when coming across a missing msg id.

Bug: 934512:
Test: manual
Change-Id: I6ac9650df4f3617836feef3999bfef6d1d58e449
Reviewed-on: https://chromium-review.googlesource.com/c/1478948
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634474}
parent 1f148449
......@@ -1436,9 +1436,9 @@ Output.prototype = {
else
msg = Msgs.getMsg(info.msgId);
} else {
var errorMsg = 'Missing role info for ' + node.role;
ruleStr.writeError(errorMsg);
console.error(errorMsg);
// We can safely ignore this role. ChromeVox output tests cover
// message id validity.
return;
}
this.append_(buff, msg || '', options);
ruleStr.writeTokenWithValue(token, msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment