parameters: (src_xtb_path, dst_xtb_path, dst_locale)
docstring: Create a fake .xtb file.
  
    Args:
      src_xtb_path: Path to source .xtb file to copy from.
      dst_xtb_path: Path to destination .xtb file to write to.
      dst_locale: Destination locale, the lang attribute in the source file
        will be substituted with this value before its lines are written
        to the destination file.
docstring_summary: Create a fake .xtb file.
docstring_tokens: Create a fake . xtb file .
function: def _CreateFakeXtbFileFrom(src_xtb_path, dst_xtb_path, dst_locale):
    """Create a fake .xtb file.
  
    Args:
      src_xtb_path: Path to source .xtb file to copy from.
      dst_xtb_path: Path to destination .xtb file to write to.
      dst_locale: Destination locale, the lang attribute in the source file
        will be substituted with this value before its lines are written
        to the destination file.
    """
    with open(src_xtb_path) as f:
      src_xtb_lines = f.readlines()
  
    def replace_xtb_lang_attribute(line):
      m = _RE_TRANSLATIONBUNDLE.search(line)
      if not m:
        return line
      return line[:m.start(1)] + dst_locale + line[m.end(1):]
  
    dst_xtb_lines = [replace_xtb_lang_attribute(line) for line in src_xtb_lines]
    with build_utils.AtomicOutput(dst_xtb_path) as tmp:
      tmp.writelines(dst_xtb_lines)
function_tokens: def _CreateFakeXtbFileFrom ( src_xtb_path , dst_xtb_path , dst_locale ) : with open ( src_xtb_path ) as f : src_xtb_lines = f . readlines ( ) def replace_xtb_lang_attribute ( line ) : m = _RE_TRANSLATIONBUNDLE . search ( line ) if not m : return line return line [ : m . start ( 1 ) ] + dst_locale + line [ m . end ( 1 ) : ] dst_xtb_lines = [ replace_xtb_lang_attribute ( line ) for line in src_xtb_lines ] with build_utils . AtomicOutput ( dst_xtb_path ) as tmp : tmp . writelines ( dst_xtb_lines )