diff options
Diffstat (limited to 'babel/messages/pofile.py')
-rw-r--r-- | babel/messages/pofile.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py index a9180a7..88cc043 100644 --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -134,7 +134,6 @@ class _NormalizedString: return self.__cmp__(other) != 0 - class PoFileParser: """Support class to read messages from a ``gettext`` PO (portable object) file and add them to a `Catalog` @@ -615,11 +614,13 @@ def write_po( locs.append(location) _write_comment(' '.join(locs), prefix=':') if message.flags: - _write('#%s\n' % ', '.join([''] + sorted(message.flags))) + _write(f"#{', '.join(['', *sorted(message.flags)])}\n") if message.previous_id and include_previous: - _write_comment('msgid %s' % _normalize(message.previous_id[0]), - prefix='|') + _write_comment( + f'msgid {_normalize(message.previous_id[0])}', + prefix='|', + ) if len(message.previous_id) > 1: _write_comment('msgid_plural %s' % _normalize( message.previous_id[1] |