tools/translation/helper/grd_helper.py
def GetGrdMessages(grd_path_or_string, dir_path):
  """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,
      stop_after=None,
      first_ids_file=None,
      debug=False,
      defines={'_chromium': 1},
      tags_to_ignore=set(TAGS_TO_IGNORE))
  return {
      msg.attrs['name']: msg
      for msg in doc.GetChildrenOfType(grit.node.message.MessageNode)
      if msg.IsTranslateable() and not msg.IsAccessibilityWithNoUI()
  }
Load the grd file and return a dict of message ids to messages.

  Ignores non-translateable messages.
Load the grd file and return a dict of message ids to messages.
Ignores non-translateable messages.
Load the grd file and return a dict of message ids to messages . Ignores non - translateable messages .
def GetGrdMessages(grd_path_or_string, dir_path):
  doc = grit.grd_reader.Parse(
      grd_path_or_string,
      dir_path,
      stop_after=None,
      first_ids_file=None,
      debug=False,
      defines={'_chromium': 1},
      tags_to_ignore=set(TAGS_TO_IGNORE))
  return {
      msg.attrs['name']: msg
      for msg in doc.GetChildrenOfType(grit.node.message.MessageNode)
      if msg.IsTranslateable() and not msg.IsAccessibilityWithNoUI()
  }
def GetGrdMessages ( grd_path_or_string , dir_path ) : doc = grit . grd_reader . Parse ( grd_path_or_string , dir_path , stop_after = None , first_ids_file = None , debug = False , defines = { '_chromium' : 1 } , tags_to_ignore = set ( TAGS_TO_IGNORE ) ) return { msg . attrs [ 'name' ] : msg for msg in doc . GetChildrenOfType ( grit . node . message . MessageNode ) if msg . IsTranslateable ( ) and not msg . IsAccessibilityWithNoUI ( ) }
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 .
"""Load the grd file and return a dict of message ids to messages.

  Ignores non-translateable messages."""
grd_path_or_string
dir_path