Added support for multiple languages

This commit is contained in:
2024-04-16 16:02:48 +03:00
parent aded63f9d5
commit c5855fced7
52 changed files with 973 additions and 409 deletions

View File

@@ -13,41 +13,27 @@ crate::export_handlers!(
import,
menu,
set_master_pass,
start
start,
change_language
);
use teloxide::macros::BotCommands;
#[derive(BotCommands, Clone, Copy)]
#[command(
rename_rule = "snake_case",
description = "These commands are supported:"
)]
#[command(rename_rule = "snake_case")]
pub enum Command {
#[command(description = "displays the welcome message")]
Start,
#[command(description = "displays this text")]
Help,
#[command(description = "sets the master password")]
SetMasterPass,
#[command(description = "gives you a menu to manage your accounts")]
Menu,
#[command(description = "adds the account")]
AddAccount,
#[command(description = "gets the account")]
GetAccount,
#[command(description = "gets a list of accounts")]
GetAccounts,
#[command(description = "deletes the account")]
Delete,
#[command(description = "deletes all the accounts and the master password")]
DeleteAll,
#[command(description = "exports all the accounts in a json file")]
Export,
#[command(description = "loads the accounts from a json file")]
Import,
#[command(description = "generates 10 secure passwords")]
GenPassword,
#[command(description = "cancels the current action")]
Cancel,
ChangeLanguage,
}