[gnome-control-center] wacom: Add i18n support to the calibrator



commit f547c902b6a903c6d5abc3d9f2630247db92ce22
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 11 16:21:44 2012 +0000

    wacom: Add i18n support to the calibrator

 panels/wacom/calibrator/gui_gtk.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/panels/wacom/calibrator/gui_gtk.c b/panels/wacom/calibrator/gui_gtk.c
index 7254e40..5e08add 100644
--- a/panels/wacom/calibrator/gui_gtk.c
+++ b/panels/wacom/calibrator/gui_gtk.c
@@ -21,9 +21,12 @@
  * THE SOFTWARE.
  */
 
+#include "config.h"
+
 #include <math.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <cairo.h>
 
@@ -41,12 +44,10 @@
 #define CLOCK_LINE_WIDTH	10
 
 /* Text printed on screen */
-const char *help_text =
-    "Touchscreen Calibration\n"
-    "Press the point, use a stylus to increase precision.\n"
-    "\n"
-    "(To abort, press any key or wait)"
-;
+#define HELP_TEXT N_("Touchscreen Calibration\n"				\
+		     "Press the point, use a stylus to increase precision.\n"	\
+		     "\n"							\
+		     "(To abort, press any key or wait)")
 
 static void
 set_display_size(struct CalibArea *calib_area,
@@ -111,7 +112,7 @@ draw(GtkWidget *widget, cairo_t *cr, gpointer data)
     /* Print the text */
     layout = pango_layout_new (gtk_widget_get_pango_context (widget));
     pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
-    pango_layout_set_text (layout, help_text, -1);
+    pango_layout_set_text (layout, _(HELP_TEXT), -1);
 
     pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]