WIP: Locale strings

This commit is contained in:
2023-08-29 16:32:37 +02:00
parent 029a965860
commit 9cda8859da
14 changed files with 214 additions and 78 deletions

View File

@@ -17,7 +17,7 @@ async def command_upcoming(app: PyroClient, message: Message):
if user.location is None:
await message.reply_text(
"You have no location set. Use /setup to select your location."
app._("upcoming_empty_location", "messages", locale=user.locale)
)
return
@@ -52,8 +52,12 @@ async def command_upcoming(app: PyroClient, message: Message):
if not entries:
await message.reply_text(
f"No garbage collection entries found for the next 30 days at **{user.location.name}**"
app._("upcoming_empty", "messages", locale=user.locale).format(
name=user.location.name
)
)
return
await message.reply_text(f"Upcoming garbage collection:\n\n{entries_text}")
await message.reply_text(
app._("upcoming", "messages", locale=user.locale).format(entries=entries_text)
)