Improve way to change locale

merge-requests/64/head
Hugo Posnic 2016-12-21 21:43:28 +01:00
parent 2f89b54f22
commit 45dee90aec
2 changed files with 2 additions and 5 deletions

View File

@ -64,14 +64,10 @@ class ManjaroHello():
self.default_texts = {}
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
gettext.bindtextdomain(self.app, self.locale_path)
gettext.textdomain(self.app)
self.set_locale(self.preferences["locale"])
self.builder.get_object("languages").set_active_id(self.preferences["locale"])
# Set window subtitle
subtitle = ""

View File

@ -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="pl">Polski (Polska)</item>
</items>
<signal name="changed" handler="on_languages_changed" swapped="no"/>
</object>
<packing>
<property name="position">2</property>