From 1f1118cf3e003c773a429f3d5d593960368a50e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Thu, 7 Jul 2022 13:52:45 +0200 Subject: [PATCH] fix: fix localization for Earth and apsis (#275) * fix: add missing string for Earth * fix: use more generic terms "apoapsis" and "periapsis" * chore: update messages file --- kosmorro/i18n/strings.py | 5 +++-- kosmorro/locales/messages.pot | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/kosmorro/i18n/strings.py b/kosmorro/i18n/strings.py index 09899fd..0ea447e 100644 --- a/kosmorro/i18n/strings.py +++ b/kosmorro/i18n/strings.py @@ -15,8 +15,8 @@ def from_event(event: Event, with_description: bool = True) -> Union[None, str]: _("Elongation of %s is maximal"), lambda e: "{:.3n}°".format(e.details["deg"]), ), - EventType.PERIGEE: (_("%s is at its perigee"), None), - EventType.APOGEE: (_("%s is at its apogee"), None), + EventType.PERIGEE: (_("%s is at its periapsis"), None), + EventType.APOGEE: (_("%s is at its apoapsis"), None), }.get(event.event_type, (None, None)) if string is None: @@ -54,6 +54,7 @@ def from_object(identifier: ObjectIdentifier) -> str: ObjectIdentifier.MOON: _("Moon"), ObjectIdentifier.MERCURY: _("Mercury"), ObjectIdentifier.VENUS: _("Venus"), + ObjectIdentifier.EARTH: _("Earth"), ObjectIdentifier.MARS: _("Mars"), ObjectIdentifier.JUPITER: _("Jupiter"), ObjectIdentifier.SATURN: _("Saturn"), diff --git a/kosmorro/locales/messages.pot b/kosmorro/locales/messages.pot index 865b00a..956dd97 100644 --- a/kosmorro/locales/messages.pot +++ b/kosmorro/locales/messages.pot @@ -8,14 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2022-06-15 13:19+0200\n" +"POT-Creation-Date: 2022-07-07 13:10+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.10.2\n" +"Generated-By: Babel 2.10.3\n" #: kosmorro/__main__.py:61 msgid "" @@ -233,12 +233,12 @@ msgstr "" #: kosmorro/i18n/strings.py:18 #, python-format -msgid "%s is at its perigee" +msgid "%s is at its periapsis" msgstr "" #: kosmorro/i18n/strings.py:19 #, python-format -msgid "%s is at its apogee" +msgid "%s is at its apoapsis" msgstr "" #: kosmorro/i18n/strings.py:35 @@ -290,26 +290,30 @@ msgid "Venus" msgstr "" #: kosmorro/i18n/strings.py:57 -msgid "Mars" +msgid "Earth" msgstr "" #: kosmorro/i18n/strings.py:58 -msgid "Jupiter" +msgid "Mars" msgstr "" #: kosmorro/i18n/strings.py:59 -msgid "Saturn" +msgid "Jupiter" msgstr "" #: kosmorro/i18n/strings.py:60 -msgid "Uranus" +msgid "Saturn" msgstr "" #: kosmorro/i18n/strings.py:61 -msgid "Neptune" +msgid "Uranus" msgstr "" #: kosmorro/i18n/strings.py:62 +msgid "Neptune" +msgstr "" + +#: kosmorro/i18n/strings.py:63 msgid "Pluto" msgstr ""