Skip to welcome_message if lang is known
There are two approaches to this:
- Creating custom callbacks
- Splitting
welcome_command
andstart_command
into functions that don't require the whole callback
While I initially started with the first option, I decided to go with the second one for the following reason:
Crafting custom callbacks can be done in two ways (afaik): CallbackQuery & strings + extra parameters.
- Using CallbackQuery depends on Telegram & Pyrogram and any api change would probably require additional maintenance
- Using strings + extra parameters requires additional runtime checks that can be avoided by using the second option
The general design I followed is the following:
Before merging
- #16 (closed) mentions
We already detect the locale that the user speaks and use it to ask them in their own language what language they would like to use.
However I set it as English as I'm a bit confused. If a user wants to change their language, could that be because they actually don't know or are not proficient enough in it? If so, I'm not sure if showing them yet another message in that unknown language would be ideal.
- 'Change Language' should stay in English / not be translated, right?
MR is a draft until these get resolved!
Example
Detected German, skipped to welcome command > Change Language > English > welcome command
fixes: #16 (closed)
(f-pushed for commit message change)