i18n template

This commit is contained in:
Aleksandr 2025-10-08 02:38:54 +03:00
parent c826b8a819
commit 3b9b4dbd7e
5 changed files with 24 additions and 0 deletions

6
bot/src/config/i18n.rs Normal file
View file

@ -0,0 +1,6 @@
use eva::data;
#[data]
pub struct I18n {
}

View file

@ -1,7 +1,11 @@
use eva::{data, utils::SecretString};
pub mod i18n;
#[data]
pub struct Config {
pub token: SecretString,
pub endpoint: Option<String>,
pub i18n: i18n::I18n,
}

1
bot/src/handlers.rs Normal file
View file

@ -0,0 +1 @@

View file

@ -7,6 +7,7 @@ use viendesu::service::Service;
pub use self::config::Config;
mod handlers;
pub mod config;
trait_set! {

12
i18n/ru.yaml Normal file
View file

@ -0,0 +1,12 @@
bot:
i18n:
start: |
Привет! Через меня ты сможешь взаимодействовать с viende.su. Доступные команды:
/login - аутентифицироваться и связать этот Telegram-аккаунт с VienDesu! аккаунтом.
/logout - отвязать этот Telegram-аккаунт от VienDesu! аккаунта.
/search <запрос> - искать визуальные новеллы по запросу.
/me - посмотреть свой аккаунт на сайте
Также бот может работать в inline-режиме:
- @{bot_username} <запрос> — то же самое, что команда /search, но inline