fix lang
This commit is contained in:
parent
81b74cf46c
commit
f421a14659
16
src/lang.rs
16
src/lang.rs
@ -15,6 +15,7 @@ mod es;
|
||||
mod et;
|
||||
mod fa;
|
||||
mod fr;
|
||||
mod he;
|
||||
mod hu;
|
||||
mod id;
|
||||
mod it;
|
||||
@ -39,7 +40,6 @@ mod tr;
|
||||
mod tw;
|
||||
mod ua;
|
||||
mod vn;
|
||||
mod he;
|
||||
|
||||
pub const LANGS: &[(&str, &str)] = &[
|
||||
("en", "English"),
|
||||
@ -161,22 +161,26 @@ pub fn translate_locale(name: String, locale: &str) -> String {
|
||||
s = s.replace("{}", &value);
|
||||
}
|
||||
if !crate::is_rustdesk() {
|
||||
if s.contains("RustDesk") && !name.starts_with("upgrade_rustdesk_server_pro") && name != "powered_by_me" {
|
||||
if s.contains("RustDesk")
|
||||
&& !name.starts_with("upgrade_rustdesk_server_pro")
|
||||
&& name != "powered_by_me"
|
||||
{
|
||||
s = s.replace("RustDesk", &crate::get_app_name());
|
||||
}
|
||||
}
|
||||
s
|
||||
};
|
||||
if let Some(v) = m.get(&name as &str) {
|
||||
if v.is_empty() {
|
||||
if !v.is_empty() {
|
||||
return replace(v);
|
||||
}
|
||||
}
|
||||
if lang != "en" {
|
||||
if let Some(v) = en::T.get(&name as &str) {
|
||||
if !v.is_empty() {
|
||||
return replace(v);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return replace(v);
|
||||
}
|
||||
}
|
||||
replace(&name.as_str())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user