# -*- coding: utf8 -*-


def escape(s):
    return s.replace("\\","\\\\") # test!

lng = open(r"C:\Documents and Settings\Mariano\Escritorio\pg\oneclickinstaller\en.lng.wri")

f = open(r"C:\Documents and Settings\Mariano\Escritorio\pg\oneclickinstaller\es.po","wb")

for line in lng:
    #import pdb; pdb.set_trace()
    msg = line.split("=")
    if len(msg)==2:
        original = escape(msg[1]).encode("utf8").strip()
        print original
        translation = ""
        f.write('msgid "%s"\n' % original )
        f.write('msgstr "%s"\n\n' % translation)

f.close()



