WIP: Locale strings
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
Reference in New Issue
Block a user