/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2006, 2009 Free Software Foundation
+ Copyright (C) 2006, 2009, 2010, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
psppire_var_store_init (PsppireVarStore *var_store)
{
if ( ! gdk_color_parse (DISABLED_COLOR, &var_store->disabled))
- g_critical ("Could not parse color \"%s\"", DISABLED_COLOR);
+ g_critical ("Could not parse color `%s'", DISABLED_COLOR);
var_store->dictionary = NULL;
var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS;
switch (col)
{
case PSPPIRE_VAR_STORE_COL_LABEL:
- var_set_label (pv, NULL);
+ var_clear_label (pv);
return TRUE;
break;
}
break;
case PSPPIRE_VAR_STORE_COL_LABEL:
{
- var_set_label (pv, text);
+ var_set_label (pv, text,
+ psppire_dict_encoding (var_store->dictionary), true);
return TRUE;
}
break;
switch ( write_spec->type )
{
case FMT_F:
- return g_locale_to_utf8 (gettext (type_label[VT_NUMERIC]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_NUMERIC]));
break;
case FMT_COMMA:
- return g_locale_to_utf8 (gettext (type_label[VT_COMMA]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_COMMA]));
break;
case FMT_DOT:
- return g_locale_to_utf8 (gettext (type_label[VT_DOT]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_DOT]));
break;
case FMT_E:
- return g_locale_to_utf8 (gettext (type_label[VT_SCIENTIFIC]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_SCIENTIFIC]));
break;
case FMT_DATE:
case FMT_EDATE:
case FMT_DTIME:
case FMT_WKDAY:
case FMT_MONTH:
- return g_locale_to_utf8 (type_label[VT_DATE], -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_DATE]));
break;
case FMT_DOLLAR:
- return g_locale_to_utf8 (type_label[VT_DOLLAR], -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_DOLLAR]));
break;
case FMT_CCA:
case FMT_CCB:
case FMT_CCC:
case FMT_CCD:
case FMT_CCE:
- return g_locale_to_utf8 (gettext (type_label[VT_CUSTOM]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_CUSTOM]));
break;
case FMT_A:
- return g_locale_to_utf8 (gettext (type_label[VT_STRING]), -1, 0, 0, err);
+ return xstrdup (gettext (type_label[VT_STRING]));
break;
default:
{
char str[FMT_STRING_LEN_MAX + 1];
- g_warning ("Unknown format: \"%s\"\n",
+ g_warning ("Unknown format: `%s'\n",
fmt_to_string (write_spec, str));
}
break;
case PSPPIRE_VAR_STORE_COL_VALUES:
{
if ( ! var_has_value_labels (pv))
- return g_locale_to_utf8 (gettext (none), -1, 0, 0, err);
+ return xstrdup (gettext (none));
else
{
const struct val_labs *vls = var_get_value_labels (pv);
{
gchar *const vstr = value_to_text (vl->value, dict, *write_spec);
- return g_strdup_printf ( "{%s,\"%s\"}_", vstr, val_lab_get_label (vl));
+ return g_strdup_printf (_("{%s,`%s'}_"), vstr, val_lab_get_label (vl));
}
}
}
const gint align = var_get_alignment (pv);
g_assert (align < n_ALIGNMENTS);
- return g_locale_to_utf8 (gettext (alignments[align]), -1, 0, 0, err);
+ return xstrdup (gettext (alignments[align]));
}
break;
case PSPPIRE_VAR_STORE_COL_MEASURE:
{
- return measure_to_string (pv, err);
+ return xstrdup (measure_to_string (pv, err));
}
break;
}