mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-21 21:44:19 +00:00
Hide custom keyboard during Live Orders mode (closes #39)
Also fixes a bug with the chinese translation
This commit is contained in:
parent
228dac5821
commit
b4fc5d0efa
6 changed files with 41 additions and 24 deletions
|
@ -102,13 +102,14 @@ conversation_confirm_cart = "🛒 Your cart contains the following products:\n"
|
|||
"<i>If you want to proceed, press the Done button below this message.\n" \
|
||||
"To cancel, press the Cancel button.</i>"
|
||||
|
||||
# Conversation: the user activated the live orders mode
|
||||
# Live orders mode: start
|
||||
conversation_live_orders_start = "You are in <b>Live Orders</b> mode\n" \
|
||||
"All new orders placed by customers will appear in real time in this chat, and you" \
|
||||
" will be able to mark them as ✅ Completed" \
|
||||
" or ✴️ Refund the credit to the customer.\n" \
|
||||
"\n" \
|
||||
"<i>Press the Stop button below this message to stop the" \
|
||||
" or ✴️ Refund the credit to the customer."
|
||||
|
||||
# Live orders mode: stop receiving messages
|
||||
conversation_live_orders_stop = "<i>Press the Stop button below this message to stop the" \
|
||||
" feed.</i>"
|
||||
|
||||
# Conversation: help menu has been opened
|
||||
|
|
|
@ -102,14 +102,15 @@ conversation_confirm_cart = "🛒 Il tuo carrello contiene questi prodotti:\n" \
|
|||
"<i>Se vuoi procedere, premi il tasto Fatto sotto a questo messaggio.\n" \
|
||||
"Per annullare, premi il tasto Annulla.</i>"
|
||||
|
||||
# Conversation: the user activated the live orders mode
|
||||
# Live orders mode: start
|
||||
conversation_live_orders_start = "Sei in modalità di <b>Ricezione Ordini</b>!\n" \
|
||||
"Tutti i nuovi ordini piazzati dai clienti ti appariranno in tempo reale in questa" \
|
||||
" chat, e potrai segnarli come ✅ completati" \
|
||||
" oppure ✴️ rimborsare il credito al cliente.\n" \
|
||||
"\n" \
|
||||
"<i>Premi il tasto Interrompi sotto a questo messaggio per interrompere la" \
|
||||
" ricezione.</i>"
|
||||
" oppure ✴️ rimborsare il credito al cliente."
|
||||
|
||||
# Live orders mode: stop receiving messages
|
||||
conversation_live_orders_stop = "<i>Premi il tasto Interrompi sotto a questo messaggio per interrompere la" \
|
||||
" ricezione.</i>"
|
||||
|
||||
# Conversation: help menu has been opened
|
||||
conversation_open_help_menu = "Che tipo di assistenza desideri ricevere?"
|
||||
|
|
|
@ -99,13 +99,14 @@ conversation_confirm_cart = "🛒 Продукты у Вас в корзине:\
|
|||
"<i>Нажмите Готово, чтобы продолжить.\n" \
|
||||
"Если передумали - выберите Отмена.</i>"
|
||||
|
||||
# Conversation: the user activated the live orders mode
|
||||
# Live orders mode: start
|
||||
conversation_live_orders_start = "Вы в режиме <b>Новые заказы</b>\n" \
|
||||
"Все новые заказы появятся в этом чате в режиме реального времени," \
|
||||
" и их можно отметить ✅ Выполнено" \
|
||||
" или ✴️ Возвращено в случае возврата денег.\n" \
|
||||
"\n" \
|
||||
"<i>Нажмите Стоп в этом чате, чтобы остановить этот режим.</i>"
|
||||
" или ✴️ Возвращено в случае возврата денег." \
|
||||
|
||||
# Live orders mode: stop receiving messages
|
||||
conversation_live_orders_stop = "<i>Нажмите Стоп в этом чате, чтобы остановить этот режим.</i>"
|
||||
|
||||
# Conversation: help menu has been opened
|
||||
conversation_open_help_menu = "Чем могу Вам помочь?"
|
||||
|
|
|
@ -99,13 +99,14 @@ conversation_confirm_cart = "🛒 У вас в кошику наступні п
|
|||
"<i>Щоб продовжити натисніть Готово.\n" \
|
||||
"Якщо змінили свою думку - обирайте Відміна.</i>"
|
||||
|
||||
# Conversation: the user activated the live orders mode
|
||||
# Live orders mode: start
|
||||
conversation_live_orders_start = "Ви в режимі <b>Свіжі Замовлення</b>\n" \
|
||||
"Всі нові замовення від покупців зʼявляться в цьому чаті в режимі живого часу," \
|
||||
" і ви зможете помічати їх ✅ Виконано" \
|
||||
" або ✴️ Повернути кошти покупцю.\n" \
|
||||
"\n" \
|
||||
"<i>Натисніть кнопку Стоп в цьому чаті, щоб зупинити цей режим.</i>"
|
||||
" або ✴️ Повернути кошти покупцю."
|
||||
|
||||
# Live orders mode: stop receiving messages
|
||||
conversation_live_orders_stop = "<i>Натисніть кнопку Стоп в цьому чаті, щоб зупинити цей режим.</i>"
|
||||
|
||||
# Conversation: help menu has been opened
|
||||
conversation_open_help_menu = "Як можемо Вам допомогти?"
|
||||
|
|
|
@ -101,12 +101,18 @@ conversation_confirm_cart = "🛒 您的购物车包含以下产品:\n" \
|
|||
"<i>如果要继续,请按此消息下方的“完成”按钮.\n" \
|
||||
"如果要取消,请按取消按钮.</i>"
|
||||
|
||||
# Conversation: the user activated the live orders mode
|
||||
conversation_live_orders_start = "您处于<b>实时订单</b>模式\n" \
|
||||
"客户下的所有新订单将实时显示在此聊天中," \
|
||||
"您可以将能够将它们标记为 ✅ 已完成." \
|
||||
" 或者 ✴️ 您可以退款给客户.\n" \
|
||||
" 反馈</i>"
|
||||
# Live orders mode: start
|
||||
# TODO: This string is incomplete!
|
||||
# conversation_live_orders_start = "您处于<b>实时订单</b>模式\n" \
|
||||
# "客户下的所有新订单将实时显示在此聊天中," \
|
||||
# "您可以将能够将它们标记为 ✅ 已完成." \
|
||||
# " 或者 ✴️ 您可以退款给客户.\n" \
|
||||
# " 反馈</i>"
|
||||
|
||||
# Live orders mode: stop receiving messages
|
||||
# TODO: This string is missing.
|
||||
# conversation_live_orders_stop = ""
|
||||
|
||||
# Conversation: help menu has been opened
|
||||
conversation_open_help_menu = "您需要什么样的帮助?"
|
||||
|
||||
|
|
|
@ -1021,7 +1021,14 @@ class Worker(threading.Thread):
|
|||
cancel_keyboard = telegram.InlineKeyboardMarkup([[telegram.InlineKeyboardButton(self.loc.get("menu_cancel"),
|
||||
callback_data="cmd_cancel")]])
|
||||
# Send a small intro message on the Live Orders mode
|
||||
self.bot.send_message(self.chat.id, self.loc.get("conversation_live_orders_start"), reply_markup=stop_keyboard)
|
||||
# Remove the keyboard with the first message... (#39)
|
||||
self.bot.send_message(self.chat.id,
|
||||
self.loc.get("conversation_live_orders_start"),
|
||||
reply_markup=telegram.ReplyKeyboardRemove())
|
||||
# ...and display a small inline keyboard with the following one
|
||||
self.bot.send_message(self.chat.id,
|
||||
self.loc.get("conversation_live_orders_stop"),
|
||||
reply_markup=stop_keyboard)
|
||||
# Create the order keyboard
|
||||
order_keyboard = telegram.InlineKeyboardMarkup([[telegram.InlineKeyboardButton(self.loc.get("menu_complete"),
|
||||
callback_data="order_complete")],
|
||||
|
|
Loading…
Reference in a new issue