def postprocess_messages(self, msgs):
        if not self.is_templatized:
            return msgs

        # Remove '.py' suffix
        if os.name == 'nt':
            # Preserve '.\' prefix on Windows to respect gettext behavior
            old = '#: ' + self.work_path
            new = '#: ' + self.path
        else:
            old = '#: ' + self.work_path[2:]
            new = '#: ' + self.path[2:]

        return msgs.replace(old, new)
Postprocess messages generated by xgettext GNU gettext utility.
dataset/ETHPy150Open django/django/django/core/management/commands/makemessages.py/BuildFile.postprocess_messages