Slight locale changes

This commit is contained in:
Profitroll 2023-08-28 16:06:15 +02:00
parent 30b48c12f3
commit 029a965860
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
5 changed files with 12 additions and 8 deletions

View File

@ -33,7 +33,7 @@
"remove_commands": "Unregister all commands"
},
"messages": {
"help": "Help message here, lol.",
"help": "This bot sends you the notifications about garbage collection according to your local schedule.\n\n**Available commands**\n/help - Show this message\n/setup - Select the location\n/toggle - Disable/enable the reminders\n/set_time - Set the reminders' time\n/set_offset - Set offset between reminders and collection\n/upcoming - Show the upcoming collection\n/language - Select the bot's language\n/checkout - Export or remove your data\n\nYou can also suggest adding your town/district to the bot by contacting the admins using [this link]({url_contact}) and providing your schedule.\n\nWant to host this bot yourself or make some changes? It's open-source, so you can basically fork it. Take a look at [bot's repository]({url_repo}) for details.\n\nHappy using!",
"start": "👋 Welcome!\n\nThis small open-source bot is made to simplify your life a bit easier by sending you notifications about upcoming garbage collection in your location.\n\nBy using this bot you accept [Privacy Policy]({privacy_policy}), otherwise please block and remove this bot before further interaction.\n\nNow the official part is over so you can dive into the bot.",
"locale_choice": "Alright. Please choose the language using keyboard below."
},
@ -42,5 +42,6 @@
},
"callbacks": {
"locale_set": "Your language now is: {locale}"
}
},
"force_replies": {}
}

View File

@ -34,7 +34,7 @@
},
"messages": {
"help": "Привіт! Я твій бот!",
"start": "Hi! By using this bot you accept **terms of service** and **privacy policy**, otherwise please block and remove this bot before further interaction.",
"start": "👋 Вітання!\n\nЦей невеличкий бот з відкритим вихідним кодом створений для того, щоб трохи спростити Вам життя, надсилаючи сповіщення про вивіз сміття у вашому регіоні.\n\nКористуючись цим ботом, Ви приймаєте [Політику конфіденційності]({privacy_policy}), в іншому випадку, будь ласка, заблокуйте та видаліть цього бота перед подальшою взаємодією.\n\nТепер офіційна частина закінчена, тож Ви можете зануритися в бота.",
"locale_choice": "Гаразд. Будь ласка, оберіть мову за допомогою клавіатури нижче."
},
"buttons": {
@ -42,5 +42,6 @@
},
"callbacks": {
"locale_set": "Встановлено мову: {locale}"
}
},
"force_replies": {}
}

View File

@ -37,7 +37,7 @@ async def search_name(app: PyroClient, message: Message) -> Union[Location, None
if len(locations) == 0:
await message.reply_text(
"Could not find any locations by this name. Try rephrasing it or make sure you use the same location language and name itself as it in written by your local authorities in garbage collection schedule. You can also abort this operation with /cancel command.",
"Could not find any locations by this name. Try rephrasing it or make sure you use the same location language and name itself as it in written by your local authorities in garbage collection schedule.\n\nYou can also abort this operation with /cancel command.",
reply_markup=ForceReply(placeholder="Location name"),
)
continue

View File

@ -10,4 +10,6 @@ from classes.pyroclient import PyroClient
async def command_help(app: PyroClient, message: Message):
user = await app.find_user(message.from_user)
await message.reply_text(app._("help", "messages", locale=user.locale))
await message.reply_text(
app._("help", "messages", locale=user.locale), disable_web_page_preview=True
)

View File

@ -27,7 +27,7 @@ async def command_setup(app: PyroClient, message: Message):
)
await message.reply_text(
"Let's begin configuration with the search for your location. Please, select whether you want to search among the locations near you or go straight to the search by location name.\n\nNote that the location you send to the bot will **NOT** be saved anywhere and is only used for location lookup in the database.",
"Let's begin configuration with the search for your location.\n\nPlease, select whether you want to search among the locations near you or go straight to the search by location name.\n\nNote that the location you send will **NOT** be saved anywhere and is only used for location lookup in the database.",
reply_markup=keyboard_type,
)
@ -66,6 +66,6 @@ async def command_setup(app: PyroClient, message: Message):
user_time = datetime(1970, 1, 1, user.time_hour, user.time_minute)
await message.reply_text(
f"You will now receive the notifications for **{location.name}** at {user_time.strftime(app._('time', 'formats', locale=user.locale))}, {user.offset} d. before collection.",
f"✅ Finished! Your location is now **{location.name}**. You will receive the notifications about garbage collection {user.offset} d. in advance at {user_time.strftime(app._('time', 'formats', locale=user.locale))}.",
reply_markup=ReplyKeyboardRemove(),
)