示例#1
0
 def po2resx(self, resxsource, po_source):
     """ Helper that merges po translations to .resx source without requiring files """
     po_store = po.pofile(po_source)
     template_file = wStringIO.StringIO(resxsource)
     convertor = po2resx.po2resx(template_file, po_store)
     output_resx = convertor.convertstore()
     return output_resx
示例#2
0
 def po2resx(self, resxsource, po_source):
     """ Helper that merges po translations to .resx source without requiring files """
     po_store = po.pofile(po_source.encode('utf-8'))
     template_file = wStringIO.StringIO(resxsource)
     convertor = po2resx.po2resx(template_file, po_store)
     output_resx = convertor.convertstore()
     return output_resx.decode('utf-8')
示例#3
0
 def po2resx(self, resxsource, po_source):
     """ Helper that merges po translations to .resx source without requiring files """
     po_store = po.pofile(po_source.encode('utf-8'))
     template_file = BytesIO(resxsource.encode())
     convertor = po2resx.po2resx(template_file, po_store)
     output_resx = convertor.convertstore()
     return output_resx.decode('utf-8')