feat: 1:1 Yandex ID account menu, official WordsCard AI replies, VibeResetButton pill, and git.tatar updater

This commit is contained in:
marwy 2026-11-27 13:43:33 +03:00
parent 682e3579ab
commit 6c30a33a9b
28 changed files with 2574 additions and 461 deletions

View file

@ -4,7 +4,7 @@
use crate::config::{Language, ThemeMode};
pub const APP_VERSION: &str = "5.129.0";
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
/// Lightweight zero-allocation localization helper bound to a `Language`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@ -589,6 +589,36 @@ impl I18n {
self.pick("Неизвестный исполнитель", "Unknown artist")
}
// -------------------------------------------------------------------------
// Official 5.129.0 AI WordsCard Strings
// -------------------------------------------------------------------------
pub const fn words_feedback_like(self) -> &'static str {
self.pick("Спасибо за оценку", "Thank you for your rating!")
}
pub const fn words_feedback_dislike(self) -> &'static str {
self.pick(
"Спасибо, что помогаете мне стать лучше",
"Thank you for making me become better!",
)
}
pub const fn words_more_similar(self) -> &'static str {
self.pick("Больше такого", "More similar replies")
}
pub const fn words_not_cool(self) -> &'static str {
self.pick("Мимо", "Not cool")
}
pub const fn words_ai_disclaimer(self) -> &'static str {
self.pick(
"AI может ошибаться, проверяйте важное",
"AI may make mistakes, be sure to double-check important information",
)
}
// -------------------------------------------------------------------------
// Formatted Labels & Official Toasts (§2.7)
// -------------------------------------------------------------------------
@ -838,11 +868,21 @@ impl I18n {
}
}
pub fn toast_latest_version(self) -> String {
self.toast_up_to_date()
}
pub fn toast_update_available(self, newer: &str) -> String {
if self.is_ru() {
format!("Доступно обновление: {} (текущая {})", newer, APP_VERSION)
format!(
"Доступно обновление: {} (текущая {}) — нажмите снова, чтобы открыть",
newer, APP_VERSION
)
} else {
format!("Update available: {} (current {})", newer, APP_VERSION)
format!(
"Update available: {} (current {}) — click again to open",
newer, APP_VERSION
)
}
}