From 2c3787196da607ee5819bd51bd2a7e6ebd1fee04 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 10 Apr 2021 01:49:32 -0700 Subject: [PATCH] makemessages: Remove custom _plural handling. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- zerver/management/commands/makemessages.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/zerver/management/commands/makemessages.py b/zerver/management/commands/makemessages.py index cfe45cc6c6..6e5fe59ac0 100644 --- a/zerver/management/commands/makemessages.py +++ b/zerver/management/commands/makemessages.py @@ -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: