diff --git a/survey/locale/de/LC_MESSAGES/django.mo b/survey/locale/de/LC_MESSAGES/django.mo index e0d2d82f..501cd33b 100644 Binary files a/survey/locale/de/LC_MESSAGES/django.mo and b/survey/locale/de/LC_MESSAGES/django.mo differ diff --git a/survey/locale/es/LC_MESSAGES/django.mo b/survey/locale/es/LC_MESSAGES/django.mo index 09297330..c1a04b67 100644 Binary files a/survey/locale/es/LC_MESSAGES/django.mo and b/survey/locale/es/LC_MESSAGES/django.mo differ diff --git a/survey/locale/fr/LC_MESSAGES/django.mo b/survey/locale/fr/LC_MESSAGES/django.mo index a81d2798..257bbf45 100644 Binary files a/survey/locale/fr/LC_MESSAGES/django.mo and b/survey/locale/fr/LC_MESSAGES/django.mo differ diff --git a/survey/locale/gr/LC_MESSAGES/django.mo b/survey/locale/gr/LC_MESSAGES/django.mo new file mode 100644 index 00000000..9f012dae Binary files /dev/null and b/survey/locale/gr/LC_MESSAGES/django.mo differ diff --git a/survey/locale/id/LC_MESSAGES/django.mo b/survey/locale/id/LC_MESSAGES/django.mo index de37a1ee..a9278e26 100644 Binary files a/survey/locale/id/LC_MESSAGES/django.mo and b/survey/locale/id/LC_MESSAGES/django.mo differ diff --git a/survey/locale/ja/LC_MESSAGES/django.mo b/survey/locale/ja/LC_MESSAGES/django.mo index 0982cf72..de7c8dc1 100644 Binary files a/survey/locale/ja/LC_MESSAGES/django.mo and b/survey/locale/ja/LC_MESSAGES/django.mo differ diff --git a/survey/locale/nl/LC_MESSAGES/django.mo b/survey/locale/nl/LC_MESSAGES/django.mo index 7e85344d..78ae4c16 100644 Binary files a/survey/locale/nl/LC_MESSAGES/django.mo and b/survey/locale/nl/LC_MESSAGES/django.mo differ diff --git a/survey/locale/pl/LC_MESSAGES/django.mo b/survey/locale/pl/LC_MESSAGES/django.mo index 3a96ff8f..555dc152 100644 Binary files a/survey/locale/pl/LC_MESSAGES/django.mo and b/survey/locale/pl/LC_MESSAGES/django.mo differ diff --git a/survey/locale/pt/LC_MESSAGES/django.mo b/survey/locale/pt/LC_MESSAGES/django.mo index 195f6802..2c90dd0c 100644 Binary files a/survey/locale/pt/LC_MESSAGES/django.mo and b/survey/locale/pt/LC_MESSAGES/django.mo differ diff --git a/survey/locale/pt/LC_MESSAGES/django.po b/survey/locale/pt/LC_MESSAGES/django.po index 761c5754..9b45c132 100644 --- a/survey/locale/pt/LC_MESSAGES/django.po +++ b/survey/locale/pt/LC_MESSAGES/django.po @@ -16,7 +16,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #: dev/templates/base.html:3 msgid "en" diff --git a/survey/locale/ru/LC_MESSAGES/django.mo b/survey/locale/ru/LC_MESSAGES/django.mo index 7d6847e3..6645718c 100644 Binary files a/survey/locale/ru/LC_MESSAGES/django.mo and b/survey/locale/ru/LC_MESSAGES/django.mo differ diff --git a/survey/locale/tr/LC_MESSAGES/django.mo b/survey/locale/tr/LC_MESSAGES/django.mo index 1ea9cfd2..26cc261b 100644 Binary files a/survey/locale/tr/LC_MESSAGES/django.mo and b/survey/locale/tr/LC_MESSAGES/django.mo differ diff --git a/survey/locale/zh/LC_MESSAGES/django.mo b/survey/locale/zh/LC_MESSAGES/django.mo index b32d077a..1c80a093 100644 Binary files a/survey/locale/zh/LC_MESSAGES/django.mo and b/survey/locale/zh/LC_MESSAGES/django.mo differ diff --git a/survey/tests/locale/test_locale_normalization.py b/survey/tests/locale/test_locale_normalization.py index d72d6105..67e2f098 100644 --- a/survey/tests/locale/test_locale_normalization.py +++ b/survey/tests/locale/test_locale_normalization.py @@ -13,12 +13,13 @@ class TestLocaleNormalization(unittest.TestCase): LOCALE_PATH = Path("survey", "locale").absolute() def test_normalization(self): - """We test if the messages were properly created with makemessages --no-obsolete --no-wrap.""" + """Messages need to be created with the proper 'makemessages' then 'compilemessages'.""" if platform.system() == "Windows": python_3 = ["py", "-3"] else: python_3 = ["python3"] base_command = ["manage.py", "makemessages", "--no-obsolete", "--no-wrap", "--ignore", "venv"] + compile_message_base_command = ["manage.py", "compilemessages"] makemessages_command = python_3 + base_command if django_version > "3.0": for x in settings.LANGUAGES: @@ -27,6 +28,8 @@ def test_normalization(self): logging.warning("Command to launch for makemessages is : %s", " ".join(makemessages_command)) subprocess.check_call(makemessages_command) + compile_message_command = python_3 + compile_message_base_command + subprocess.check_call(compile_message_command) git_diff_command = ["git", "diff", self.LOCALE_PATH] git_diff = subprocess.check_output(git_diff_command).decode("utf8") command_as_str = " ".join(makemessages_command) @@ -34,7 +37,7 @@ def test_normalization(self): "You did not update the translation following your changes. Maybe you did not use the " "normalized 'python3 manage.py makemessages --no-obsolete --no-wrap' ? If you're " f"working locally, just use 'git add {self.LOCALE_PATH}', we launched " - f"'{command_as_str}' during tests.\ngit diff\n{git_diff}", + f"'{command_as_str}' during tests.\ngit diff\n{git_diff}" ) number_of_change = git_diff.count("@@") / 2 if django_version >= "4.1": @@ -47,3 +50,12 @@ def test_normalization(self): number_of_language = len(os.listdir(self.LOCALE_PATH)) expected_number_of_change = number_of_language self.assertEqual(number_of_change, expected_number_of_change, msg) + number_of_bin_differring = git_diff.count("differ\n") + command_as_str = " ".join(compile_message_command) + msg = ( + "You did not compile the messages following your changes. Maybe you did not use " + "'python3 manage.py compilemessages' ? If you're " + f"working locally, just use 'git add {self.LOCALE_PATH}', we launched " + f"'{command_as_str}' during tests.\ngit diff\n{git_diff}" + ) + self.assertEqual(number_of_bin_differring, 0, msg)