From efad80c9e538d0be3cfd766fd2db20e958b684da Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 17 Mar 2007 11:59:53 +0000 Subject: [PATCH] Changed call to nl_langinfo with localecharset (from gnulib). Fixed problem with test in non english locale. --- Smake | 2 ++ po/de.po | 36 ++++++++++++++++----------------- po/pspp.pot | 36 ++++++++++++++++----------------- src/ui/gui/ChangeLog | 5 +++++ src/ui/gui/var-sheet.c | 12 ++++------- tests/command/missing-values.sh | 2 ++ 6 files changed, 49 insertions(+), 44 deletions(-) diff --git a/Smake b/Smake index 723e75be..4559ad4a 100644 --- a/Smake +++ b/Smake @@ -24,6 +24,7 @@ GNULIB_MODULES = \ inttostr \ linebreak \ localcharset \ + minmax \ mbchar \ memcasecmp \ memchr \ @@ -128,6 +129,7 @@ clean: rm -f mdate-sh texinfo.tex rm -f doc/stamp-vti rm -f config.h.in~ + rm -f config.h.in find . -name Makefile.in -exec rm -f {} \; rm -f compile rm -f ltmain.sh diff --git a/po/de.po b/po/de.po index 301a5093..332b3932 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.2\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-02-24 09:40-0800\n" +"POT-Creation-Date: 2007-03-07 16:39+0100\n" "PO-Revision-Date: 2006-05-26 17:49+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -1045,7 +1045,7 @@ msgid "Record" msgstr "" #: src/language/data-io/data-list.c:418 src/language/data-io/print.c:398 -#: src/ui/gui/var-sheet.c:76 +#: src/ui/gui/var-sheet.c:74 msgid "Columns" msgstr "Spalten" @@ -1584,7 +1584,7 @@ msgstr "" #: src/language/dictionary/split-file.c:87 #: src/language/dictionary/sys-file-info.c:402 -#: src/language/dictionary/sys-file-info.c:550 src/ui/gui/var-sheet.c:73 +#: src/language/dictionary/sys-file-info.c:550 src/ui/gui/var-sheet.c:71 msgid "Label" msgstr "Kennsatz" @@ -2399,7 +2399,7 @@ msgstr "" #: src/language/stats/crosstabs.q:824 src/language/stats/examine.q:908 #: src/language/stats/frequencies.q:1213 src/language/stats/frequencies.q:1520 -#: src/ui/gui/var-sheet.c:75 +#: src/ui/gui/var-sheet.c:73 msgid "Missing" msgstr "Löse" @@ -2502,7 +2502,7 @@ msgstr "" msgid "Directional measures." msgstr "" -#: src/language/stats/crosstabs.q:1186 src/ui/gui/var-sheet.c:70 +#: src/language/stats/crosstabs.q:1186 src/ui/gui/var-sheet.c:68 msgid "Type" msgstr "Typ" @@ -4711,51 +4711,51 @@ msgstr "" msgid "To End" msgstr "" -#: src/ui/gui/var-sheet.c:69 +#: src/ui/gui/var-sheet.c:67 msgid "Name" msgstr "Name" -#: src/ui/gui/var-sheet.c:71 +#: src/ui/gui/var-sheet.c:69 msgid "Width" msgstr "Große" -#: src/ui/gui/var-sheet.c:72 +#: src/ui/gui/var-sheet.c:70 msgid "Decimals" msgstr "Dezimalstellen" -#: src/ui/gui/var-sheet.c:74 +#: src/ui/gui/var-sheet.c:72 msgid "Values" msgstr "Werten" -#: src/ui/gui/var-sheet.c:77 +#: src/ui/gui/var-sheet.c:75 msgid "Align" msgstr "Einstellung" -#: src/ui/gui/var-sheet.c:78 +#: src/ui/gui/var-sheet.c:76 msgid "Measure" msgstr "Messe" -#: src/ui/gui/var-sheet.c:84 +#: src/ui/gui/var-sheet.c:82 msgid "Left" msgstr "Links" -#: src/ui/gui/var-sheet.c:85 +#: src/ui/gui/var-sheet.c:83 msgid "Right" msgstr "Rechts" -#: src/ui/gui/var-sheet.c:86 +#: src/ui/gui/var-sheet.c:84 msgid "Centre" msgstr "Mittel" -#: src/ui/gui/var-sheet.c:91 +#: src/ui/gui/var-sheet.c:89 msgid "Nominal" msgstr "Nominalwert" -#: src/ui/gui/var-sheet.c:92 +#: src/ui/gui/var-sheet.c:90 msgid "Ordinal" msgstr "Ordinalwert" -#: src/ui/gui/var-sheet.c:93 +#: src/ui/gui/var-sheet.c:91 msgid "Scale" msgstr "Skalwert" @@ -4832,7 +4832,7 @@ msgid "" "Report bugs to <%s>.\n" msgstr "" -#: src/ui/terminal/main.c:128 +#: src/ui/terminal/main.c:132 msgid "" "Stopping syntax file processing here to avoid a cascade of dependent command " "failures." diff --git a/po/pspp.pot b/po/pspp.pot index 5abb602d..4e21cae8 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-02-24 09:40-0800\n" +"POT-Creation-Date: 2007-03-07 16:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1040,7 +1040,7 @@ msgid "Record" msgstr "" #: src/language/data-io/data-list.c:418 src/language/data-io/print.c:398 -#: src/ui/gui/var-sheet.c:76 +#: src/ui/gui/var-sheet.c:74 msgid "Columns" msgstr "" @@ -1579,7 +1579,7 @@ msgstr "" #: src/language/dictionary/split-file.c:87 #: src/language/dictionary/sys-file-info.c:402 -#: src/language/dictionary/sys-file-info.c:550 src/ui/gui/var-sheet.c:73 +#: src/language/dictionary/sys-file-info.c:550 src/ui/gui/var-sheet.c:71 msgid "Label" msgstr "" @@ -2394,7 +2394,7 @@ msgstr "" #: src/language/stats/crosstabs.q:824 src/language/stats/examine.q:908 #: src/language/stats/frequencies.q:1213 src/language/stats/frequencies.q:1520 -#: src/ui/gui/var-sheet.c:75 +#: src/ui/gui/var-sheet.c:73 msgid "Missing" msgstr "" @@ -2497,7 +2497,7 @@ msgstr "" msgid "Directional measures." msgstr "" -#: src/language/stats/crosstabs.q:1186 src/ui/gui/var-sheet.c:70 +#: src/language/stats/crosstabs.q:1186 src/ui/gui/var-sheet.c:68 msgid "Type" msgstr "" @@ -4681,51 +4681,51 @@ msgstr "" msgid "To End" msgstr "" -#: src/ui/gui/var-sheet.c:69 +#: src/ui/gui/var-sheet.c:67 msgid "Name" msgstr "" -#: src/ui/gui/var-sheet.c:71 +#: src/ui/gui/var-sheet.c:69 msgid "Width" msgstr "" -#: src/ui/gui/var-sheet.c:72 +#: src/ui/gui/var-sheet.c:70 msgid "Decimals" msgstr "" -#: src/ui/gui/var-sheet.c:74 +#: src/ui/gui/var-sheet.c:72 msgid "Values" msgstr "" -#: src/ui/gui/var-sheet.c:77 +#: src/ui/gui/var-sheet.c:75 msgid "Align" msgstr "" -#: src/ui/gui/var-sheet.c:78 +#: src/ui/gui/var-sheet.c:76 msgid "Measure" msgstr "" -#: src/ui/gui/var-sheet.c:84 +#: src/ui/gui/var-sheet.c:82 msgid "Left" msgstr "" -#: src/ui/gui/var-sheet.c:85 +#: src/ui/gui/var-sheet.c:83 msgid "Right" msgstr "" -#: src/ui/gui/var-sheet.c:86 +#: src/ui/gui/var-sheet.c:84 msgid "Centre" msgstr "" -#: src/ui/gui/var-sheet.c:91 +#: src/ui/gui/var-sheet.c:89 msgid "Nominal" msgstr "" -#: src/ui/gui/var-sheet.c:92 +#: src/ui/gui/var-sheet.c:90 msgid "Ordinal" msgstr "" -#: src/ui/gui/var-sheet.c:93 +#: src/ui/gui/var-sheet.c:91 msgid "Scale" msgstr "" @@ -4802,7 +4802,7 @@ msgid "" "Report bugs to <%s>.\n" msgstr "" -#: src/ui/terminal/main.c:128 +#: src/ui/terminal/main.c:132 msgid "" "Stopping syntax file processing here to avoid a cascade of dependent command " "failures." diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index d5b0fdb0..40a3e27a 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 7 19:05:12 CET 2007 John Darrington + + * var-sheet.c: Replaced call to nl_langinfo with locale_charset + from gnulib. + Thu Feb 22 12:27:41 CET 2007 John Darrington * data-editor.c : called new gen_quoted_string function to properly diff --git a/src/ui/gui/var-sheet.c b/src/ui/gui/var-sheet.c index d8e6f6f7..79361449 100644 --- a/src/ui/gui/var-sheet.c +++ b/src/ui/gui/var-sheet.c @@ -33,9 +33,6 @@ #include #include -#if HAVE_LANGINFO_H -#include -#endif #include @@ -43,6 +40,7 @@ #include #include +#include "localcharset.h" #include "psppire-var-store.h" #include "helper.h" #include "psppire-dict.h" @@ -446,12 +444,11 @@ psppire_variable_sheet_create (gchar *widget_name, gtk_sheet_set_model (GTK_SHEET (sheet), G_SHEET_MODEL (the_var_store)); -#if HAVE_LANGINFO_H /* Since this happens inside glade_xml_new, we must prevent strings from * being re-encoded twice */ codeset = bind_textdomain_codeset (PACKAGE, 0); - bind_textdomain_codeset (PACKAGE, nl_langinfo (CODESET)); -#endif + bind_textdomain_codeset (PACKAGE, locale_charset ()); + for (i = 0 ; i < n_COLS ; ++i ) { g_sheet_hetero_column_set_button_label (G_SHEET_HETERO_COLUMN (geo), i, @@ -460,9 +457,8 @@ psppire_variable_sheet_create (gchar *widget_name, g_sheet_hetero_column_set_width (G_SHEET_HETERO_COLUMN (geo), i, column_def[i].width); } -#if HAVE_LANGINFO_H + bind_textdomain_codeset (PACKAGE, codeset); -#endif gtk_widget_show (sheet); diff --git a/tests/command/missing-values.sh b/tests/command/missing-values.sh index ecef99df..4936736d 100755 --- a/tests/command/missing-values.sh +++ b/tests/command/missing-values.sh @@ -17,6 +17,8 @@ top_srcdir=`cd $top_srcdir; pwd` STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH +LANG=C +export LANG cleanup() { -- 2.30.2