1
0
Fork 0
mirror of synced 2024-04-29 18:13:47 +12:00
czkawka/czkawka_gui/src/language_functions.rs
Igor b320d6aa3a
Add Italian translation (#508)
* Add Italian translation - #251

* Italian translation reviewed.

* Updated languages in misc/translation_test.py

* Italian translation reviewed.
2021-12-21 06:35:53 +01:00

29 lines
696 B
Rust

#[derive(Clone)]
pub struct Language {
pub combo_box_text: &'static str,
pub short_text: &'static str,
}
/// Languages should be alphabetically sorted
pub const LANGUAGES_ALL: [Language; 3] = [
Language { combo_box_text: "English", short_text: "en" },
Language {
combo_box_text: "Italiano (Italian)",
short_text: "it",
},
Language {
combo_box_text: "Polski (Polish)",
short_text: "pl",
},
];
pub fn get_language_from_combo_box_text(combo_box_text: String) -> Language {
for lang in LANGUAGES_ALL {
if lang.combo_box_text == combo_box_text {
return lang;
}
}
panic!("Not found proper text");
}