makemessages: Remove custom _plural handling.

Plurals are handled natively by the ICU MessageFormat syntax, so I
think we don’t have to do anything here.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-04-10 01:49:32 -07:00
committed by Tim Abbott
parent 0892e98012
commit 2c3787196d

View File

@@ -266,13 +266,6 @@ class Command(makemessages.Command):
else:
new_strings[k] = old_strings.get(k, "")
plurals = {k: v for k, v in old_strings.items() if k.endswith("_plural")}
for plural_key, value in plurals.items():
components = plural_key.split("_")
singular_key = "_".join(components[:-1])
if singular_key in new_strings:
new_strings[plural_key] = value
return new_strings
def write_translation_strings(self, translation_strings: List[str]) -> None: