def add_tmpl_to_pot(prefix, dst):
 src = open((EMAIL_DIR + ('/%s-en.tmpl' % prefix)), 'r')
 dst.write(('#: email/%s.tmpl:1\n' % prefix))
 dst.write('msgid ""\n')
 for line in src:
  dst.write(('"%s"\n' % line.replace('\n', '\\n').replace('"', '\\"')))
 dst.write('msgstr ""\n\n')
 src.close()

def add_tmpl_to_pot ( prefix , dst ) : src = open ( ( EMAIL_DIR + ( '/%s-en.tmpl' % prefix ) ) , 'r' ) dst . write ( ( '#: email/%s.tmpl:1\n' % prefix ) ) dst . write ( 'msgid ""\n' ) for line in src : dst . write ( ( '"%s"\n' % line . replace ( '\n' , '\\n' ) . replace ( '"' , '\\"' ) ) ) dst . write ( 'msgstr ""\n\n' ) src . close ( )
append english template to open pot file dst .