From f547c902b6a903c6d5abc3d9f2630247db92ce22 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 11 Jan 2012 16:21:44 +0000 Subject: [PATCH] wacom: Add i18n support to the calibrator --- panels/wacom/calibrator/gui_gtk.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/panels/wacom/calibrator/gui_gtk.c b/panels/wacom/calibrator/gui_gtk.c index 7254e4019..5e08addda 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 #include #include +#include #include #include @@ -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);