mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-04 06:02:08 +08:00
chore(deps): update rust crate rust-i18n to v4 (#6784)
* chore(deps): update rust crate rust-i18n to v4 * fix: migrate rust-i18n to v4 with Cow-first zero-copy approach - Adapt to v4 breaking changes: available_locales!() returns Vec<Cow<'static, str>> - Cache locales in LazyLock<Vec<Cow<'static, str>>> to avoid repeated Vec alloc + sort - Propagate Cow<'static, str> through resolve/current/system_language APIs - Fix t! macro args branch: into_owned() + Cow::Owned for type correctness - Eliminate double resolve in sync_locale (skip redundant set_locale indirection) - Replace .to_string() with .into_owned() / Cow passthrough in updater.rs --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
This commit is contained in:
co-authored by
renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Tunglies
parent
9e32fba13e
commit
a4c537541e
@@ -294,10 +294,10 @@ impl SilentUpdater {
|
||||
async fn ask_user_to_install(app_handle: &tauri::AppHandle, version: &str) -> bool {
|
||||
use tauri_plugin_dialog::{DialogExt as _, MessageDialogButtons, MessageDialogKind};
|
||||
|
||||
let title = clash_verge_i18n::t!("notifications.updateReady.title").to_string();
|
||||
let title = clash_verge_i18n::t!("notifications.updateReady.title");
|
||||
let body = clash_verge_i18n::t!("notifications.updateReady.body").replace("{version}", version);
|
||||
let install_now = clash_verge_i18n::t!("notifications.updateReady.installNow").to_string();
|
||||
let later = clash_verge_i18n::t!("notifications.updateReady.later").to_string();
|
||||
let install_now = clash_verge_i18n::t!("notifications.updateReady.installNow").into_owned();
|
||||
let later = clash_verge_i18n::t!("notifications.updateReady.later").into_owned();
|
||||
|
||||
let (tx, rx) = tokio::sync::oneshot::channel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user