Skip to content

Commit 7e8cf98

Browse files
committed
Move internationalisation setup to Application class (eos)
1 parent 4718c66 commit 7e8cf98

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

templates/eos/src/Application.vala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ public class ${APP_NAMESPACE}.Application : Adw.Application {
33
Object (application_id: Constants.APP_ID);
44
}
55

6+
construct {
7+
Intl.setlocale (GLib.LocaleCategory.ALL, "");
8+
Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, Constants.LOCALEDIR);
9+
Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8");
10+
Intl.textdomain (Constants.GETTEXT_PACKAGE);
11+
}
12+
613
protected override void activate () {
714
var main_window = this.get_active_window ();
815

templates/eos/src/MainWindow.vala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ public class ${APP_NAMESPACE}.MainWindow : Adw.ApplicationWindow {
1616
}
1717

1818
construct {
19-
Intl.setlocale (GLib.LocaleCategory.ALL, "");
20-
Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, Constants.LOCALEDIR);
21-
Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8");
22-
Intl.textdomain (Constants.GETTEXT_PACKAGE);
23-
2419
var header = new Adw.HeaderBar ();
2520
var layout_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
2621

0 commit comments

Comments
 (0)