Browse Source

fix: remove unused strings

tags/v1.0.0rc3
Jérôme Deuchnord 1 month ago
parent
commit
638b55f099
3 changed files with 2 additions and 33 deletions
  1. +1
    -1
      kosmorro/exceptions.py
  2. +0
    -11
      kosmorro/i18n/utils.py
  3. +1
    -21
      kosmorro/locales/messages.pot

+ 1
- 1
kosmorro/exceptions.py View File

@@ -18,7 +18,7 @@

from datetime import date
from babel.dates import format_date
from kosmorro.i18n.utils import _, SHORT_DATE_FORMAT
from kosmorro.i18n.utils import _


class UnavailableFeatureError(RuntimeError):


+ 0
- 11
kosmorro/i18n/utils.py View File

@@ -24,17 +24,6 @@ _TRANSLATION = gettext.translation("messages", localedir=_LOCALE_DIR, fallback=T

_ = _TRANSLATION.gettext

FULL_DATE_FORMAT = _("{day_of_week} {month} {day_number}, {year}").format(
day_of_week="%A", month="%B", day_number="%d", year="%Y"
)
SHORT_DATETIME_FORMAT = _("{month} {day_number}, {hours}:{minutes}").format(
month="%b", day_number="%d", hours="%H", minutes="%M"
)
SHORT_DATE_FORMAT = _("{month} {day_number}, {year}").format(
month="%b", day_number="%d", year="%Y"
)
TIME_FORMAT = _("{hours}:{minutes}").format(hours="%H", minutes="%M")


def ngettext(msgid1, msgid2, number):
# Not using ngettext = _TRANSLATION.ngettext because the linter will give an invalid-name error otherwise


+ 1
- 21
kosmorro/locales/messages.pot View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-10-19 16:46+0200\n"
"POT-Creation-Date: 2025-11-03 18:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -391,23 +391,3 @@ msgstr ""
msgid "Pluto"
msgstr ""

#: kosmorro/i18n/utils.py:27
#, python-brace-format
msgid "{day_of_week} {month} {day_number}, {year}"
msgstr ""

#: kosmorro/i18n/utils.py:30
#, python-brace-format
msgid "{month} {day_number}, {hours}:{minutes}"
msgstr ""

#: kosmorro/i18n/utils.py:33
#, python-brace-format
msgid "{month} {day_number}, {year}"
msgstr ""

#: kosmorro/i18n/utils.py:36
#, python-brace-format
msgid "{hours}:{minutes}"
msgstr ""


Loading…
Cancel
Save