Skip to content

Commit

Permalink
trimmed messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Timotej Leginus committed Apr 2, 2022
1 parent 5904df4 commit cb96aa8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[package]
edition = "2021"
name = "albanian-virus"
version = "0.1.0"
edition = "2021"

[dependencies.windows]
version = "0.34.0"
features = [
"alloc",
"Win32_Globalization",
"Win32_Foundation",
"Win32_System",
"Win32_UI_WindowsAndMessaging",
"alloc",
"Win32_Globalization",
"Win32_Foundation",
"Win32_System",
"Win32_UI_WindowsAndMessaging"
]

11 changes: 7 additions & 4 deletions src/trans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum Messages {
}

impl Messages {
pub fn translate(&self, locale: &Locale) -> &'static str {
pub fn translate(&self, locale: &Locale) -> String {
match *self {
Self::InfoText => {
match *locale {
Expand All @@ -58,27 +58,30 @@ impl Messages {
Veliké poděkováni tobě, S posdravem albánsky výrus
"#
}
.split(" ") // TODO find a better approach
.collect::<Vec<&str>>()
.join(" ")
}
Self::InfoTitle => {
match *locale {
Locale::English => "Virus Is Has Detected In Yor Windows XP OS",
Locale::Slovak => "V tvojom Systéme Windows XP SP3 a viššie sa deteknul výrus",
Locale::Czech => "Tvůj Operační sistém Windows XP sp2 a višší sa vyskytol vírus"
}
}.to_string()
}
Self::ApologyText => {
match *locale {
Locale::English => "I am very sorry for bother, please continue with yours daily activities",
Locale::Slovak => "Ospravedlňujem sa za rušenie vašej činnosti, pokračujte ďalej, prosím",
Locale::Czech => "Vospravedlňuju-se-li za rušení vaší aktivity, prosím-li pokračujte déle"
}
}.to_string()
}
Self::ApologyTitle => {
match *locale {
Locale::English => "Dearest apologies",
Locale::Slovak => "Najsrdečnejšie ospravldnenie",
Locale::Czech => "To nejsrdečnejší ospravedlnění"
}
}.to_string()
}
}
}
Expand Down

0 comments on commit cb96aa8

Please sign in to comment.