We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abc5b9c commit 6479786Copy full SHA for 6479786
tmc-langs-cli/src/main.rs
@@ -873,9 +873,13 @@ fn into_usize(arg: &str) -> usize {
873
}
874
875
fn into_locale(arg: &str) -> Language {
876
- Language::from_639_3(arg).unwrap_or_else(|| {
877
- Error::with_description(&format!("Invalid locale: {}", arg), ErrorKind::InvalidValue).exit()
878
- })
+ Language::from_locale(arg)
+ .or(Language::from_639_1(arg))
+ .or(Language::from_639_3(arg))
879
+ .unwrap_or_else(|| {
880
+ Error::with_description(&format!("Invalid locale: {}", arg), ErrorKind::InvalidValue)
881
+ .exit()
882
+ })
883
884
885
fn into_url(arg: &str) -> Url {
0 commit comments