b320d6aa3a
* Add Italian translation - #251 * Italian translation reviewed. * Updated languages in misc/translation_test.py * Italian translation reviewed.
29 lines
696 B
Rust
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");
|
|
}
|