i18n template
This commit is contained in:
parent
c826b8a819
commit
3b9b4dbd7e
5 changed files with 24 additions and 0 deletions
6
bot/src/config/i18n.rs
Normal file
6
bot/src/config/i18n.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
use eva::data;
|
||||||
|
|
||||||
|
#[data]
|
||||||
|
pub struct I18n {
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
use eva::{data, utils::SecretString};
|
use eva::{data, utils::SecretString};
|
||||||
|
|
||||||
|
pub mod i18n;
|
||||||
|
|
||||||
#[data]
|
#[data]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
pub token: SecretString,
|
pub token: SecretString,
|
||||||
pub endpoint: Option<String>,
|
pub endpoint: Option<String>,
|
||||||
|
|
||||||
|
pub i18n: i18n::I18n,
|
||||||
}
|
}
|
1
bot/src/handlers.rs
Normal file
1
bot/src/handlers.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -7,6 +7,7 @@ use viendesu::service::Service;
|
||||||
|
|
||||||
pub use self::config::Config;
|
pub use self::config::Config;
|
||||||
|
|
||||||
|
mod handlers;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|
||||||
trait_set! {
|
trait_set! {
|
||||||
|
|
12
i18n/ru.yaml
Normal file
12
i18n/ru.yaml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
bot:
|
||||||
|
i18n:
|
||||||
|
start: |
|
||||||
|
Привет! Через меня ты сможешь взаимодействовать с viende.su. Доступные команды:
|
||||||
|
|
||||||
|
/login - аутентифицироваться и связать этот Telegram-аккаунт с VienDesu! аккаунтом.
|
||||||
|
/logout - отвязать этот Telegram-аккаунт от VienDesu! аккаунта.
|
||||||
|
/search <запрос> - искать визуальные новеллы по запросу.
|
||||||
|
/me - посмотреть свой аккаунт на сайте
|
||||||
|
|
||||||
|
Также бот может работать в inline-режиме:
|
||||||
|
- @{bot_username} <запрос> — то же самое, что команда /search, но inline
|
Loading…
Add table
Add a link
Reference in a new issue