update lang.rs to add catalan

update lang.rs to add catalan
This commit is contained in:
ivanbea 2022-11-16 11:28:37 +01:00 committed by GitHub
parent dcd2d93fcb
commit 0c854e8c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ mod vn;
mod kz;
mod ua;
mod fa;
mod ca;
lazy_static::lazy_static! {
pub static ref LANGS: Value =
@ -51,6 +52,7 @@ lazy_static::lazy_static! {
("kz", "Қазақ"),
("ua", "Українська"),
("fa", "فارسی"),
("ca", "català"),
]);
}
@ -102,6 +104,7 @@ pub fn translate_locale(name: String, locale: &str) -> String {
"kz" => kz::T.deref(),
"ua" => ua::T.deref(),
"fa" => fa::T.deref(),
"ca" => ca::T.deref(),
_ => en::T.deref(),
};
if let Some(v) = m.get(&name as &str) {