'Postprocess messages generated by xgettext GNU gettext utility.
Transform paths as if these messages were generated from original
translatable files rather than from preprocessed versions.'

def postprocess_messages(self, msgs):

    if (not self.is_templatized):
        return msgs
    if (os.name == 'nt'):
        old_path = self.work_path
        new_path = self.path
    else:
        old_path = self.work_path[2:]
        new_path = self.path[2:]
    return re.sub((('^(#:    .*)(' + re.escape(old_path)) + ')'), (lambda match: match.group().replace(old_path, new_path)), msgs, flags=re.MULTILINE)
