Use autotools and intltools, translate user interface, add German translation
[led-pattern-ed] / src / led-pattern-editor.vala
index fa1d4d0..44b1fa5 100644 (file)
 public static Osso.Status execute (Osso.Context osso, void* data, bool user_activated) {
        var window = data as Gtk.Window;
 
+       // Gettext hook-up
+       Intl.setlocale (LocaleCategory.ALL, "");
+       Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
+       Intl.textdomain (Config.GETTEXT_PACKAGE);
+
        var list = mce_ini_parse ();
 
        var dialog = new LedPatternDialog (list, osso);
@@ -29,10 +34,10 @@ public static Osso.Status execute (Osso.Context osso, void* data, bool user_acti
        string command = null;
        if (response == Gtk.ResponseType.OK) {
                mce_ini_store (list);
-               Hildon.Banner.show_information (window, null, "Applying changes and restarting MCE ...");
+               Hildon.Banner.show_information (window, null, _("Applying changes and restarting MCE ..."));
                command = "sudo /usr/bin/led-pattern-helper save %s".printf ("/tmp/mce.ini");
        } else if (response == LedPatternDialog.Response.RESTORE) {
-               Hildon.Banner.show_information (window, null, "Restoring defaults and restarting MCE ...");
+               Hildon.Banner.show_information (window, null, _("Restoring defaults and restarting MCE ..."));
                command = "sudo /usr/bin/led-pattern-helper save %s".printf ("/etc/mce/mce.ini.orig");
        }
        if (command != null) {