Przeglądaj źródła

Merge pull request #435 from Kosmorro/fix/exception-management

pull/437/head
Deuchnord 3 tygodni temu
committed by GitHub
rodzic
commit
b1dad381b5
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 29 dodań i 26 usunięć
  1. +7
    -4
      kosmorro/__main__.py
  2. +22
    -22
      kosmorro/locales/messages.pot

+ 7
- 4
kosmorro/__main__.py Wyświetl plik

@@ -68,10 +68,13 @@ def run():
return -1

position = None
if args.position not in [None, ""]:
position = get_position(args.position)
elif env_vars.position not in [None, ""]:
position = get_position(env_vars.position)
try:
if args.position not in [None, ""]:
position = get_position(args.position)
elif env_vars.position not in [None, ""]:
position = get_position(env_vars.position)
except ValueError as e:
print_stderr(colored(e.args[0], color="red", attrs=["bold"]))

# if output format is not specified, try to use output file extension as output format
if args.output is not None and output_format is None:


+ 22
- 22
kosmorro/locales/messages.pot Wyświetl plik

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-11-09 11:42+0100\n"
"POT-Creation-Date: 2025-11-11 11:06+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"
@@ -17,86 +17,86 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: kosmorro/__main__.py:89
#: kosmorro/__main__.py:92
msgid ""
"Save the planet and paper!\n"
"Consider printing your PDF document only if really necessary, and use the"
" other side of the sheet."
msgstr ""

#: kosmorro/__main__.py:97
#: kosmorro/__main__.py:100
msgid ""
"PDF output will not contain the ephemerides, because you didn't provide "
"the observation coordinates."
msgstr ""

#: kosmorro/__main__.py:115
#: kosmorro/__main__.py:118
msgid ""
"Environment variable KOSMORRO_TIMEZONE is deprecated. Use TZ instead, "
"which is more standard."
msgstr ""

#: kosmorro/__main__.py:124
#: kosmorro/__main__.py:127
#, python-brace-format
msgid "Unknown timezone: {timezone}"
msgstr ""

#: kosmorro/__main__.py:167
#: kosmorro/__main__.py:170
#, python-brace-format
msgid "The file could not be saved in \"{path}\": {error}"
msgstr ""

#: kosmorro/__main__.py:181
#: kosmorro/__main__.py:184
msgid "Please provide a file path to export in this format (--output)."
msgstr ""

#: kosmorro/__main__.py:213
#: kosmorro/__main__.py:216
#, python-brace-format
msgid "Moon phase can only be computed between {min_date} and {max_date}"
msgstr ""

#: kosmorro/__main__.py:264
#: kosmorro/__main__.py:267
#, python-brace-format
msgid "Running on Python {python_version} with Kosmorrolib v{kosmorrolib_version}"
msgstr ""

#: kosmorro/__main__.py:277
#: kosmorro/__main__.py:280
msgid ""
"Compute the ephemerides and the events for a given date and a given "
"position on Earth."
msgstr ""

#: kosmorro/__main__.py:280
#: kosmorro/__main__.py:283
msgid ""
"By default, only the events will be computed for today.\n"
"To compute also the ephemerides, latitude and longitude arguments are "
"needed."
msgstr ""

#: kosmorro/__main__.py:292
#: kosmorro/__main__.py:295
msgid "Show the program version"
msgstr ""

#: kosmorro/__main__.py:301
#: kosmorro/__main__.py:304
msgid ""
"The output format. If not provided, it will be inferred from the file "
"extension of the output file."
msgstr ""

#: kosmorro/__main__.py:310
#: kosmorro/__main__.py:313
msgid ""
"The observer's position on Earth, in the \"latitude,longitude\" format. "
"Can also be set in the KOSMORRO_POSITION environment variable."
msgstr ""

#: kosmorro/__main__.py:320
#: kosmorro/__main__.py:323
msgid ""
"The date for which the ephemerides must be calculated. Can be in the "
"YYYY-MM-DD format or an interval in the \"[+-]YyMmDd\" format (with Y, M,"
" and D numbers). Defaults to current date."
msgstr ""

#: kosmorro/__main__.py:331
#: kosmorro/__main__.py:334
msgid ""
"The timezone to use to display the hours. It can be either a number (e.g."
" 1 for UTC+1) or a timezone name (e.g. Europe/Paris). See "
@@ -104,29 +104,29 @@ msgid ""
" timezone. Can also be set in the TZ environment variable."
msgstr ""

#: kosmorro/__main__.py:340
#: kosmorro/__main__.py:343
msgid "Disable the colors in the console."
msgstr ""

#: kosmorro/__main__.py:347
#: kosmorro/__main__.py:350
msgid "Use this option to save the result in a file."
msgstr ""

#: kosmorro/__main__.py:354
#: kosmorro/__main__.py:357
msgid ""
"Do not generate a graph to represent the rise and set times in the LaTeX "
"or PDF file."
msgstr ""

#: kosmorro/__main__.py:361
#: kosmorro/__main__.py:364
msgid "Show debugging messages"
msgstr ""

#: kosmorro/__main__.py:369
#: kosmorro/__main__.py:372
msgid "Print a script allowing completion for your shell"
msgstr ""

#: kosmorro/__main__.py:379
#: kosmorro/__main__.py:382
msgid "No completion script available for this shell."
msgstr ""



Ładowanie…
Anuluj
Zapisz