def dump(self, fp, include_locations=True, prune_obsoletes=False):
        needs_blank_line = False
        if len(self.header_fields):
            print('msgid ""', file=fp)
            print('msgstr ""', file=fp)
            for field, value in self.header_fields:
                print(r'"{}: {}\n"'.format(field, value), file=fp)
            needs_blank_line = True
        nplurals = self.get_nplurals()
        for entry in sorted(self.entries.values(), key=get_entry_sort_key):
            if needs_blank_line:
                print('', file=fp)
            needs_blank_line = entry.dump(
                fp, nplurals, include_locations=include_locations, prune_obsolete=prune_obsoletes)