🚧 fix language
This commit is contained in:
parent
c590a2a916
commit
ac49b56a34
|
@ -150,6 +150,9 @@ fn build_ui(application: >k::Application) {
|
||||||
read_json(save_path.as_str())
|
read_json(save_path.as_str())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let best_locale = get_best_locale(&preferences, &save);
|
||||||
|
std::env::set_var("LANGUAGE", best_locale.as_str());
|
||||||
|
|
||||||
// Import Css
|
// Import Css
|
||||||
let provider = gtk::CssProvider::new();
|
let provider = gtk::CssProvider::new();
|
||||||
provider
|
provider
|
||||||
|
@ -271,7 +274,7 @@ fn build_ui(application: >k::Application) {
|
||||||
.expect("Unable to set domain encoding.");
|
.expect("Unable to set domain encoding.");
|
||||||
gettextrs::textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain.");
|
gettextrs::textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain.");
|
||||||
let languages: gtk::ComboBoxText = builder.object("languages").unwrap();
|
let languages: gtk::ComboBoxText = builder.object("languages").unwrap();
|
||||||
languages.set_active_id(Some(get_best_locale(&preferences, &save).as_str()));
|
languages.set_active_id(Some(best_locale.as_str()));
|
||||||
|
|
||||||
// Set autostart switcher state
|
// Set autostart switcher state
|
||||||
let autostart = Path::new(&fix_path(preferences["autostart_path"].as_str().unwrap())).exists();
|
let autostart = Path::new(&fix_path(preferences["autostart_path"].as_str().unwrap())).exists();
|
||||||
|
|
Loading…
Reference in New Issue