Commit 2abd6473 by Ned Batchelder

Always add Plural metadata to dummy translations.

When this was conditional, we'd have plural info in some files, not in
others. Then we'd merge them, and msgcat would add wacky markers to
indicate the difference, and the metadata wouldn't parse.
parent 4c1df704
......@@ -42,11 +42,9 @@ def main(file, locale):
for msg in pofile:
converter.convert_msg(msg)
# If any message has a plural, then the file needs plural information.
# Apply declaration for English pluralization rules so that ngettext will
# do something reasonable.
if any(m.msgid_plural for m in pofile):
pofile.metadata['Plural-Forms'] = 'nplurals=2; plural=(n != 1);'
pofile.metadata['Plural-Forms'] = 'nplurals=2; plural=(n != 1);'
new_file = new_filename(file, locale)
create_dir_if_necessary(new_file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment