Skip to content

Commit

Permalink
feat: lowercase region in bg chooser just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
krypt0nn committed Nov 28, 2024
1 parent 79393ad commit 5c4bb43
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ fn get_expected_edition(lang: &LanguageIdentifier) -> GameEdition {

"zh" => {
match lang.region {
Some(region) if region.as_str() == "cn" => GameEdition::China,
Some(region) if region.as_str() == "tw" => GameEdition::Taiwan,

_ => GameEdition::China
Some(region) => {
if region.as_str().to_ascii_lowercase() == "tw" {
GameEdition::Taiwan
} else {
GameEdition::China
}
}

None => GameEdition::China
}
},

Expand Down

0 comments on commit 5c4bb43

Please sign in to comment.