Improve way to change locale
parent
2f89b54f22
commit
45dee90aec
|
@ -64,14 +64,10 @@ class ManjaroHello():
|
||||||
self.default_texts = {}
|
self.default_texts = {}
|
||||||
self.preferences["locale"] = self.get_best_locale()
|
self.preferences["locale"] = self.get_best_locale()
|
||||||
|
|
||||||
# Select current locale in languages menu
|
|
||||||
self.builder.get_object("languages").set_active_id(self.preferences["locale"])
|
|
||||||
self.builder.get_object("languages").connect("changed", self.on_languages_changed)
|
|
||||||
|
|
||||||
# Make translation
|
# Make translation
|
||||||
gettext.bindtextdomain(self.app, self.locale_path)
|
gettext.bindtextdomain(self.app, self.locale_path)
|
||||||
gettext.textdomain(self.app)
|
gettext.textdomain(self.app)
|
||||||
self.set_locale(self.preferences["locale"])
|
self.builder.get_object("languages").set_active_id(self.preferences["locale"])
|
||||||
|
|
||||||
# Set window subtitle
|
# Set window subtitle
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
|
|
|
@ -592,6 +592,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<item id="fr">Français (France)</item>
|
<item id="fr">Français (France)</item>
|
||||||
<item id="pl">Polski (Polska)</item>
|
<item id="pl">Polski (Polska)</item>
|
||||||
</items>
|
</items>
|
||||||
|
<signal name="changed" handler="on_languages_changed" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
|
|
Loading…
Reference in New Issue