Internationalisation.
[pspp-builds.git] / src / ui / gui / psppire-data-store.c
index 5b40635b66606553f6545f342f56b5c67b6b63d8..df36d0832e41ff600b966ae76186d86b192fdf4e 100644 (file)
 #include <config.h>
 #include <string.h>
 #include <stdlib.h>
-#include <minmax.h>
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+
 
 #include <gtksheet/gtksheet.h>
 #include <gtksheet/gsheetmodel.h>
@@ -40,8 +44,6 @@
 #include <data/file-handle-def.h>
 #include <data/sys-file-writer.h>
 
-#define _(A) A
-#define N_(A) A
 
 
 static void psppire_data_store_init            (PsppireDataStore      *data_store);
@@ -399,7 +401,6 @@ psppire_data_store_get_string(GSheetModel *model, gint row, gint column)
      FP.  No null terminator is appended to the buffer.  */
   data_out (s->str, fp, v);
 
-  
   text = pspp_locale_to_utf8(s->str, fp->w, 0);
   g_string_free(s, TRUE);
 
@@ -577,7 +578,7 @@ geometry_get_column_count(const GSheetColumn *geom)
 /* Return the width that an  'M' character would occupy when typeset at
    row, col */
 static guint 
-M_width(GtkSheet *sheet, gint row, gint col)
+M_width(const GtkSheet *sheet, gint row, gint col)
 {
   GtkSheetCellAttr attributes;
   PangoRectangle rect;
@@ -661,7 +662,7 @@ geometry_get_justification(const GSheetColumn *geom, gint unit)
 }
 
 
-static const gchar null_var_name[]=_("var");
+static const gchar null_var_name[]=N_("var");
  
 static const gchar *
 geometry_get_button_label(const GSheetColumn *geom, gint unit)
@@ -671,7 +672,7 @@ geometry_get_button_label(const GSheetColumn *geom, gint unit)
   PsppireDataStore *ds = PSPPIRE_DATA_STORE(geom);
 
   if ( unit >= psppire_dict_get_var_cnt(ds->dict) )
-    return pspp_locale_to_utf8(null_var_name, -1, 0);
+    return g_locale_to_utf8(null_var_name, -1, 0, 0, 0);
 
   pv = psppire_dict_get_variable(ds->dict, unit);