summaryrefslogtreecommitdiff
path: root/chromium/tools/translation/helper/grd_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/tools/translation/helper/grd_helper.py')
-rw-r--r--chromium/tools/translation/helper/grd_helper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/chromium/tools/translation/helper/grd_helper.py b/chromium/tools/translation/helper/grd_helper.py
index 5740e354eae..96b78f8acb7 100644
--- a/chromium/tools/translation/helper/grd_helper.py
+++ b/chromium/tools/translation/helper/grd_helper.py
@@ -34,7 +34,9 @@ TAGS_TO_IGNORE = (
def GetGrdMessages(grd_path_or_string, dir_path):
- """Load the grd file and return a dict of message ids to messages."""
+ """Load the grd file and return a dict of message ids to messages.
+
+ Ignores non-translateable messages."""
doc = grit.grd_reader.Parse(
grd_path_or_string,
dir_path,
@@ -46,6 +48,7 @@ def GetGrdMessages(grd_path_or_string, dir_path):
return {
msg.attrs['name']: msg
for msg in doc.GetChildrenOfType(grit.node.message.MessageNode)
+ if msg.IsTranslateable()
}