Use autotools and intltools, translate user interface, add German translation
[led-pattern-ed] / src / led-program-dialog.vala
index 004d0ea..91840f3 100644 (file)
@@ -27,9 +27,9 @@ class LedProgramDialog : Gtk.Dialog {
 
        public LedProgramDialog (LedPatternRX51 _pattern) {
                pattern = _pattern;
-               set_title ("LED pattern editor - " +
+               set_title (_("LED pattern editor - ") +
                           (pattern.name.has_prefix ("Pattern") ?
-                           pattern.name.offset (7) : pattern.name) + " pattern");
+                           pattern.name.offset (7) : pattern.name) + _(" pattern"));
 
                var content = (Gtk.VBox) get_content_area ();
                content.set_size_request (-1, 5*70);
@@ -75,9 +75,9 @@ class LedProgramDialog : Gtk.Dialog {
 
                action_area.show_all ();
 
-               add_button ("Copy", 2);
-               add_button ("Test", 1);
-               add_button ("Done", Gtk.ResponseType.ACCEPT);
+               add_button (_("Copy"), 2);
+               add_button (_("Test"), 1);
+               add_button (_("Done"), Gtk.ResponseType.ACCEPT);
 
                key_press_event.connect (on_key_pressed);
                response.connect (on_response);
@@ -98,7 +98,7 @@ class LedProgramDialog : Gtk.Dialog {
                var pannable = new Hildon.PannableArea ();
                var vbox = new Gtk.VBox (false, 0);
 
-               var label = new Gtk.Label ("Engine %d:".printf (engine));
+               var label = new Gtk.Label (_("Engine %d:").printf (engine));
                label.set_alignment (0, 0.5f);
                vbox.pack_start (label, false, false, 0);
 
@@ -113,7 +113,7 @@ class LedProgramDialog : Gtk.Dialog {
                        vbox.pack_start (command_widget, false, false, 0);
                }
 
-               var button = new Gtk.Button.with_label ("New command");
+               var button = new Gtk.Button.with_label (_("New command"));
                Hildon.gtk_widget_set_theme_size (button, Hildon.SizeType.FINGER_HEIGHT);
                button.clicked.connect (on_new_command_clicked);
                vbox.pack_end (button, false, false, 0);
@@ -139,7 +139,7 @@ class LedProgramDialog : Gtk.Dialog {
 
                clipboard.set_text (lpv.pattern.dump (), -1);
                clipboard.store ();
-               Hildon.Banner.show_information (null, null, "Copied");
+               Hildon.Banner.show_information (null, null, _("Copied"));
        }
 
        void paste () {
@@ -154,7 +154,7 @@ class LedProgramDialog : Gtk.Dialog {
                        clip_pattern.parse (text);
                        lpv.pattern.replace_with (clip_pattern);
                } catch (LedPatternError e) {
-                       Hildon.Banner.show_information (null, null, "Not a valid pattern");
+                       Hildon.Banner.show_information (null, null, _("Not a valid pattern"));
                }
        }
 
@@ -232,15 +232,15 @@ class LedProgramDialog : Gtk.Dialog {
                }
 
                var dialog = new Hildon.PickerDialog (this);
-               dialog.set_title ("New command");
+               dialog.set_title (_("New command"));
 
                var touch_selector = new Hildon.TouchSelector.text ();
-               touch_selector.append_text ("Set PWM");
-               touch_selector.append_text ("Ramp");
-               touch_selector.append_text ("Wait");
-               touch_selector.append_text ("Trigger");
-               touch_selector.append_text ("Go To Start");
-               touch_selector.append_text ("End");
+               touch_selector.append_text (_("Set PWM"));
+               touch_selector.append_text (_("Ramp"));
+               touch_selector.append_text (_("Wait"));
+               touch_selector.append_text (_("Trigger"));
+               touch_selector.append_text (_("Go To Start"));
+               touch_selector.append_text (_("End"));
                dialog.set_selector (touch_selector);
 
                int response = dialog.run ();