示例#1
0
  def pull(self, lang, fname):
    new = self.translation(lang).encode('utf-8')
    new = map(lambda a: a + '\n', new.split('\n'))
    new = update.read_po(new)

    catalog = update.read_po(fname)
    update.merge(catalog, new)

    update.dump(catalog, fname)
  def pull(self, lang, fname):
    new = self.translation(lang).encode('utf-8')
    new = map(lambda a: a + '\n', new.split('\n'))
    new = update.read_po(new)

    # remove the key '' to preserve the first comment block.
    first = new.pop('', ('', '', ''))  

    catalog = update.read_po(fname)
    update.merge(catalog, new)
    (comment, rkey, rvalue) = catalog.get('', ('', 'msgid ""\n', ''))
    catalog[''] = (comment, rkey, first[2])

    update.dump(catalog, fname)
示例#3
0
    def pull(self, lang, fname):
        new = self.translation(lang).encode("utf-8")
        new = map(lambda a: a + "\n", new.split("\n"))
        new = update.read_po(new)

        update.dump(new, fname)
    def pull(self, lang, fname):
        new = self.translation(lang).encode('utf-8')
        new = map(lambda a: a + '\n', new.split('\n'))
        new = update.read_po(new)

        update.dump(new, fname)