Skip to content

Commit 38571c3

Browse files
Jérôme DeuchnordDeuchnord
authored andcommitted
fix: fix locale support that led to an exception
1 parent 2d55b0e commit 38571c3

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

_kosmorro/locales/messages.pot

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: kosmorro 0.10.7\n"
1010
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
11-
"POT-Creation-Date: 2021-12-04 11:58+0100\n"
11+
"POT-Creation-Date: 2021-12-30 12:15+0100\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -116,98 +116,98 @@ msgstr ""
116116
msgid "The date must be between {minimum_date} and {maximum_date}"
117117
msgstr ""
118118

119-
#: _kosmorro/main.py:62
119+
#: _kosmorro/main.py:60
120120
msgid ""
121121
"Save the planet and paper!\n"
122122
"Consider printing your PDF document only if really necessary, and use the"
123123
" other side of the sheet."
124124
msgstr ""
125125

126-
#: _kosmorro/main.py:71
126+
#: _kosmorro/main.py:69
127127
msgid ""
128128
"PDF output will not contain the ephemerides, because you didn't provide "
129129
"the observation coordinates."
130130
msgstr ""
131131

132-
#: _kosmorro/main.py:116
132+
#: _kosmorro/main.py:114
133133
msgid "The file could not be saved in \"{path}\": {error}"
134134
msgstr ""
135135

136-
#: _kosmorro/main.py:130
136+
#: _kosmorro/main.py:128
137137
msgid "Please provide a file path to export in this format (--output)."
138138
msgstr ""
139139

140-
#: _kosmorro/main.py:163
140+
#: _kosmorro/main.py:161
141141
msgid "Moon phase can only be displayed between {min_date} and {max_date}"
142142
msgstr ""
143143

144-
#: _kosmorro/main.py:202
144+
#: _kosmorro/main.py:200
145145
msgid "Running on Python {python_version} with Kosmorrolib v{kosmorrolib_version}"
146146
msgstr ""
147147

148-
#: _kosmorro/main.py:215
148+
#: _kosmorro/main.py:213
149149
msgid ""
150150
"Compute the ephemerides and the events for a given date and a given "
151151
"position on Earth."
152152
msgstr ""
153153

154-
#: _kosmorro/main.py:218
154+
#: _kosmorro/main.py:216
155155
msgid ""
156156
"By default, only the events will be computed for today ({date}).\n"
157157
"To compute also the ephemerides, latitude and longitude arguments are "
158158
"needed."
159159
msgstr ""
160160

161-
#: _kosmorro/main.py:232
161+
#: _kosmorro/main.py:230
162162
msgid "Show the program version"
163163
msgstr ""
164164

165-
#: _kosmorro/main.py:240
165+
#: _kosmorro/main.py:238
166166
msgid "The format to output the information to"
167167
msgstr ""
168168

169-
#: _kosmorro/main.py:247
169+
#: _kosmorro/main.py:245
170170
msgid ""
171171
"The observer's latitude on Earth. Can also be set in the "
172172
"KOSMORRO_LATITUDE environment variable."
173173
msgstr ""
174174

175-
#: _kosmorro/main.py:257
175+
#: _kosmorro/main.py:255
176176
msgid ""
177177
"The observer's longitude on Earth. Can also be set in the "
178178
"KOSMORRO_LONGITUDE environment variable."
179179
msgstr ""
180180

181-
#: _kosmorro/main.py:267
181+
#: _kosmorro/main.py:265
182182
msgid ""
183183
"The date for which the ephemerides must be calculated. Can be in the "
184184
"YYYY-MM-DD format or an interval in the \"[+-]YyMmDd\" format (with Y, M,"
185185
" and D numbers). Defaults to today ({default_date})."
186186
msgstr ""
187187

188-
#: _kosmorro/main.py:278
188+
#: _kosmorro/main.py:276
189189
msgid ""
190190
"The timezone to display the hours in (e.g. 2 for UTC+2 or -3 for UTC-3). "
191191
"Can also be set in the KOSMORRO_TIMEZONE environment variable."
192192
msgstr ""
193193

194-
#: _kosmorro/main.py:287
194+
#: _kosmorro/main.py:285
195195
msgid "Disable the colors in the console."
196196
msgstr ""
197197

198-
#: _kosmorro/main.py:294
198+
#: _kosmorro/main.py:292
199199
msgid ""
200200
"A file to export the output to. If not given, the standard output is "
201201
"used. This argument is needed for PDF format."
202202
msgstr ""
203203

204-
#: _kosmorro/main.py:303
204+
#: _kosmorro/main.py:301
205205
msgid ""
206206
"Do not generate a graph to represent the rise and set times in the PDF "
207207
"format."
208208
msgstr ""
209209

210-
#: _kosmorro/main.py:311
210+
#: _kosmorro/main.py:309
211211
msgid "Show debugging messages"
212212
msgstr ""
213213

_kosmorro/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

1919
import argparse
20-
import locale
21-
import re
2220
import sys
2321

2422
from kosmorrolib import Position, get_ephemerides, get_events, get_moon_phase

kosmorro

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,8 @@
1717
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

1919
import sys
20-
import locale
2120
from _kosmorro.main import main
2221

23-
locale.setlocale(locale.LC_ALL, "")
24-
2522
if __name__ == "__main__":
2623
try:
2724
sys.exit(main())

0 commit comments

Comments
 (0)