From: John Darrington Date: Wed, 25 Apr 2007 00:09:35 +0000 (+0000) Subject: Fixed bug in internationalization. X-Git-Tag: v0.6.0~479 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37802756c76db95313a42db5938bb9a560f35055;p=pspp-builds.git Fixed bug in internationalization. Enhanced the dictionary view in dialog box GtkTreeView widgets. --- diff --git a/README b/README index 50264bd1..3034f989 100644 --- a/README +++ b/README @@ -34,10 +34,10 @@ PSPP, you will need to install certain prerequisites: graphing features will not work. If you do not have it installed, you must run `configure' with --without-libplot. - * Optional: GTK+ version 2.6.0 or later, plus libglade 2.0 or - later. Without them, the GUI will not be built. If you do not - have these installed, you must run `configure' with - --without-gui. + * Optional: GTK+ version 2.6.0 or later (2.10.2 or later is + recommended), plus libglade 2.0 or later. Without them, the + GUI will not be built. If you do not have these installed, you + must run `configure' with --without-gui. * Optional: Texinfo 4.7 or later, if you want to build the documentation in PostScript or PDF format. diff --git a/po/de.po b/po/de.po index 3d9c79ed..b25311f1 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-04-16 18:39+0800\n" +"POT-Creation-Date: 2007-04-25 07:29+0800\n" "PO-Revision-Date: 2006-05-26 17:49+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -309,32 +309,32 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1127 +#: src/data/sys-file-reader.c:629 src/ui/gui/data-editor.glade:1127 #: src/ui/gui/psppire-var-store.c:481 msgid "String" msgstr "Zeichenkette" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1023 +#: src/data/sys-file-reader.c:629 src/ui/gui/data-editor.glade:1023 #: src/ui/gui/psppire-var-store.c:474 msgid "Numeric" msgstr "Nummer" -#: src/data/format.c:311 src/data/sys-file-reader.c:1029 -#: src/data/sys-file-reader.c:1031 +#: src/data/format.c:311 src/data/sys-file-reader.c:1057 +#: src/data/sys-file-reader.c:1059 #: src/language/dictionary/apply-dictionary.c:77 #: src/language/dictionary/apply-dictionary.c:78 -#: src/language/xforms/recode.c:468 src/language/xforms/recode.c:469 -#: src/language/xforms/recode.c:481 src/language/xforms/recode.c:482 +#: src/language/xforms/recode.c:474 src/language/xforms/recode.c:475 +#: src/language/xforms/recode.c:487 src/language/xforms/recode.c:488 msgid "numeric" msgstr "numerisch" -#: src/data/format.c:311 src/data/sys-file-reader.c:1029 -#: src/data/sys-file-reader.c:1031 +#: src/data/format.c:311 src/data/sys-file-reader.c:1057 +#: src/data/sys-file-reader.c:1059 #: src/language/dictionary/apply-dictionary.c:77 #: src/language/dictionary/apply-dictionary.c:78 -#: src/language/xforms/recode.c:468 src/language/xforms/recode.c:469 -#: src/language/xforms/recode.c:481 src/language/xforms/recode.c:482 +#: src/language/xforms/recode.c:474 src/language/xforms/recode.c:475 +#: src/language/xforms/recode.c:487 src/language/xforms/recode.c:488 msgid "string" msgstr "kette" @@ -512,275 +512,275 @@ msgstr "" msgid "Could not access definition for terminal `%s'." msgstr "" -#: src/data/sys-file-reader.c:207 +#: src/data/sys-file-reader.c:209 #, c-format msgid "Error opening \"%s\" for reading as a system file: %s." msgstr "" -#: src/data/sys-file-reader.c:237 +#: src/data/sys-file-reader.c:239 msgid "Misplaced type 4 record." msgstr "" -#: src/data/sys-file-reader.c:248 +#: src/data/sys-file-reader.c:250 #, c-format msgid "Unrecognized record type %d." msgstr "" -#: src/data/sys-file-reader.c:257 +#: src/data/sys-file-reader.c:284 #, c-format msgid "File header claims %d variable positions but %d were read from file." msgstr "" -#: src/data/sys-file-reader.c:289 +#: src/data/sys-file-reader.c:316 #, c-format msgid "Error closing system file \"%s\": %s." msgstr "" -#: src/data/sys-file-reader.c:349 src/data/sys-file-reader.c:359 +#: src/data/sys-file-reader.c:376 src/data/sys-file-reader.c:386 #, fuzzy msgid "This is not an SPSS system file." msgstr "\"%s\" ist kein Systemdatei und kein Tragbardatei." -#: src/data/sys-file-reader.c:377 +#: src/data/sys-file-reader.c:404 #, c-format msgid "" "Compression bias (%g) is not the usual value of 100, or system file uses " "unrecognized floating-point format." msgstr "" -#: src/data/sys-file-reader.c:451 +#: src/data/sys-file-reader.c:478 #, c-format msgid "Invalid variable name `%s'." msgstr "" -#: src/data/sys-file-reader.c:455 +#: src/data/sys-file-reader.c:482 #, c-format msgid "Bad variable width %d." msgstr "" -#: src/data/sys-file-reader.c:459 +#: src/data/sys-file-reader.c:486 #, c-format msgid "Duplicate variable name `%s' within system file." msgstr "" -#: src/data/sys-file-reader.c:467 +#: src/data/sys-file-reader.c:494 msgid "Variable label indicator field is not 0 or 1." msgstr "" -#: src/data/sys-file-reader.c:475 +#: src/data/sys-file-reader.c:502 #, c-format msgid "Variable %s has label of invalid length %u." msgstr "" -#: src/data/sys-file-reader.c:486 +#: src/data/sys-file-reader.c:513 msgid "Missing value indicator field is not -3, -2, 0, 1, 2, or 3." msgstr "" -#: src/data/sys-file-reader.c:522 +#: src/data/sys-file-reader.c:549 #, c-format msgid "String variable %s may not have missing values specified as a range." msgstr "" -#: src/data/sys-file-reader.c:527 +#: src/data/sys-file-reader.c:554 #, c-format msgid "Long string variable %s may not have missing values." msgstr "" -#: src/data/sys-file-reader.c:549 +#: src/data/sys-file-reader.c:576 msgid "Missing string continuation record." msgstr "" -#: src/data/sys-file-reader.c:583 +#: src/data/sys-file-reader.c:610 #, c-format msgid "Unknown variable format %d." msgstr "" -#: src/data/sys-file-reader.c:601 +#: src/data/sys-file-reader.c:628 #, c-format msgid "%s variable %s has invalid %s format %s." msgstr "" -#: src/data/sys-file-reader.c:604 +#: src/data/sys-file-reader.c:631 #, fuzzy msgid "print" msgstr "Drucken" -#: src/data/sys-file-reader.c:604 +#: src/data/sys-file-reader.c:631 #, fuzzy msgid "write" msgstr "Drucken" -#: src/data/sys-file-reader.c:608 +#: src/data/sys-file-reader.c:635 msgid "Suppressing further invalid format warnings." msgstr "" -#: src/data/sys-file-reader.c:626 +#: src/data/sys-file-reader.c:653 msgid "Weighting variable must be numeric." msgstr "" -#: src/data/sys-file-reader.c:640 +#: src/data/sys-file-reader.c:667 msgid "Multiple type 6 (document) records." msgstr "" -#: src/data/sys-file-reader.c:644 +#: src/data/sys-file-reader.c:671 #, c-format msgid "Number of document lines (%d) must be greater than 0." msgstr "" -#: src/data/sys-file-reader.c:715 +#: src/data/sys-file-reader.c:742 #, c-format msgid "Unrecognized record type 7, subtype %d." msgstr "" -#: src/data/sys-file-reader.c:739 +#: src/data/sys-file-reader.c:766 #, c-format msgid "Bad size (%u) or count (%u) field on record type 7, subtype 3." msgstr "" -#: src/data/sys-file-reader.c:754 +#: src/data/sys-file-reader.c:781 #, c-format msgid "" "Floating-point representation indicated by system file (%d) differs from " "expected (%d)." msgstr "" -#: src/data/sys-file-reader.c:767 +#: src/data/sys-file-reader.c:794 msgid "little-endian" msgstr "" -#: src/data/sys-file-reader.c:767 +#: src/data/sys-file-reader.c:794 msgid "big-endian" msgstr "" -#: src/data/sys-file-reader.c:768 +#: src/data/sys-file-reader.c:795 #, c-format msgid "" "Integer format indicated by system file (%s) differs from expected (%s)." msgstr "" -#: src/data/sys-file-reader.c:784 +#: src/data/sys-file-reader.c:811 #, c-format msgid "Bad size (%u) or count (%u) on extension 4." msgstr "" -#: src/data/sys-file-reader.c:788 +#: src/data/sys-file-reader.c:815 #, c-format msgid "File specifies unexpected value %g as SYSMIS." msgstr "" -#: src/data/sys-file-reader.c:790 +#: src/data/sys-file-reader.c:817 #, c-format msgid "File specifies unexpected value %g as HIGHEST." msgstr "" -#: src/data/sys-file-reader.c:792 +#: src/data/sys-file-reader.c:819 #, c-format msgid "File specifies unexpected value %g as LOWEST." msgstr "" -#: src/data/sys-file-reader.c:806 +#: src/data/sys-file-reader.c:833 #, c-format msgid "Bad size (%u) or count (%u) on extension 11." msgstr "" -#: src/data/sys-file-reader.c:823 +#: src/data/sys-file-reader.c:850 msgid "Invalid variable display parameters. Default parameters substituted." msgstr "" -#: src/data/sys-file-reader.c:861 +#: src/data/sys-file-reader.c:888 #, c-format msgid "Long variable mapping from %s to invalid variable name `%s'." msgstr "" -#: src/data/sys-file-reader.c:871 +#: src/data/sys-file-reader.c:898 #, c-format msgid "Duplicate long variable name `%s' within system file." msgstr "" -#: src/data/sys-file-reader.c:909 +#: src/data/sys-file-reader.c:937 #, c-format msgid "%s listed as string of length %s in length table." msgstr "" -#: src/data/sys-file-reader.c:923 +#: src/data/sys-file-reader.c:951 #, c-format msgid "Very long string %s overflows dictionary." msgstr "" -#: src/data/sys-file-reader.c:970 +#: src/data/sys-file-reader.c:998 #, c-format msgid "Invalid number of labels: %d. Ignoring labels." msgstr "" -#: src/data/sys-file-reader.c:1001 +#: src/data/sys-file-reader.c:1029 msgid "" "Variable index record (type 4) does not immediately follow value label " "record (type 3) as it should." msgstr "" -#: src/data/sys-file-reader.c:1008 +#: src/data/sys-file-reader.c:1036 #, c-format msgid "" "Number of variables associated with a value label (%d) is not between 1 and " "the number of variables (%u)." msgstr "" -#: src/data/sys-file-reader.c:1018 +#: src/data/sys-file-reader.c:1046 #, c-format msgid "Value labels are not allowed on long string variables (%s)." msgstr "" -#: src/data/sys-file-reader.c:1025 +#: src/data/sys-file-reader.c:1053 #, c-format msgid "" "Variables associated with value label are not all of identical type. " "Variable %s is %s, but variable %s is %s." msgstr "" -#: src/data/sys-file-reader.c:1058 +#: src/data/sys-file-reader.c:1086 #, c-format msgid "Duplicate value label for %g on %s." msgstr "" -#: src/data/sys-file-reader.c:1061 +#: src/data/sys-file-reader.c:1089 #, c-format msgid "Duplicate value label for \"%.*s\" on %s." msgstr "" -#: src/data/sys-file-reader.c:1179 +#: src/data/sys-file-reader.c:1207 msgid "File ends in partial case." msgstr "" -#: src/data/sys-file-reader.c:1275 src/data/sys-file-reader.c:1311 +#: src/data/sys-file-reader.c:1303 src/data/sys-file-reader.c:1339 msgid "Compressed data is corrupt." msgstr "" -#: src/data/sys-file-reader.c:1384 +#: src/data/sys-file-reader.c:1412 #, c-format msgid "Variable index %d not in valid range 1...%d." msgstr "" -#: src/data/sys-file-reader.c:1389 +#: src/data/sys-file-reader.c:1417 #, c-format msgid "Variable index %d refers to long string continuation." msgstr "" -#: src/data/sys-file-reader.c:1475 +#: src/data/sys-file-reader.c:1503 #, c-format msgid "Suppressed %d additional variable map warnings." msgstr "" -#: src/data/sys-file-reader.c:1488 +#: src/data/sys-file-reader.c:1516 #, c-format msgid "Variable map refers to unknown variable %s." msgstr "" -#: src/data/sys-file-reader.c:1564 +#: src/data/sys-file-reader.c:1592 #, c-format msgid "System error: %s." msgstr "" -#: src/data/sys-file-reader.c:1566 +#: src/data/sys-file-reader.c:1594 #, fuzzy msgid "Unexpected end of file." msgstr "plotzlich ist der Datei beendet" @@ -800,41 +800,41 @@ msgstr "" msgid "An I/O error occurred writing system file \"%s\"." msgstr "" -#: src/data/variable.c:231 +#: src/data/variable.c:232 #, c-format msgid "" "Character `%c' (in %s) may not appear as the first character in a variable " "name." msgstr "" -#: src/data/variable.c:243 +#: src/data/variable.c:244 #, c-format msgid "Character `%c' (in %s) may not appear in a variable name." msgstr "" -#: src/data/variable.c:271 +#: src/data/variable.c:272 msgid "Variable name cannot be empty string." msgstr "Ein Variablename darf nicht eines leeres Kette sein." -#: src/data/variable.c:277 +#: src/data/variable.c:278 #, c-format msgid "Variable name %s exceeds %d-character limit." msgstr "Der Variabelname %s ist große als %d Buchstaben." -#: src/data/variable.c:285 +#: src/data/variable.c:286 #, c-format msgid "`%s' may not be used as a variable name because it is a reserved word." msgstr "" -#: src/data/variable.c:966 +#: src/data/variable.c:967 msgid "ordinary" msgstr "" -#: src/data/variable.c:968 +#: src/data/variable.c:969 msgid "system" msgstr "" -#: src/data/variable.c:970 +#: src/data/variable.c:971 msgid "scratch" msgstr "" @@ -1036,7 +1036,7 @@ msgstr "" #: src/language/dictionary/sys-file-info.c:160 #: src/language/dictionary/sys-file-info.c:395 #: src/language/dictionary/sys-file-info.c:620 -#: src/language/stats/descriptives.c:880 +#: src/language/stats/descriptives.c:880 src/ui/gui/dict-display.c:198 msgid "Variable" msgstr "" @@ -2285,7 +2285,7 @@ msgstr "" #: src/language/stats/crosstabs.q:1026 src/language/stats/crosstabs.q:1749 #: src/language/stats/examine.q:909 src/language/stats/frequencies.q:1222 #: src/language/stats/oneway.q:307 src/language/stats/oneway.q:471 -#: src/language/stats/regression.q:326 +#: src/language/stats/regression.q:325 msgid "Total" msgstr "" @@ -2331,7 +2331,7 @@ msgid "Expected N" msgstr "" #: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263 -#: src/language/stats/regression.q:325 +#: src/language/stats/regression.q:324 msgid "Residual" msgstr "" @@ -2349,7 +2349,7 @@ msgstr "" #: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1120 #: src/language/stats/oneway.q:280 src/language/stats/oneway.q:681 -#: src/language/stats/regression.q:319 src/language/stats/t-test.q:980 +#: src/language/stats/regression.q:318 src/language/stats/t-test.q:980 #: src/language/stats/t-test.q:1172 src/language/stats/t-test.q:1265 msgid "df" msgstr "" @@ -2772,7 +2772,7 @@ msgid "Lowest" msgstr "" #: src/language/stats/examine.q:1421 src/language/stats/oneway.q:395 -#: src/language/stats/oneway.q:679 src/language/stats/regression.q:221 +#: src/language/stats/oneway.q:679 src/language/stats/regression.q:220 msgid "Std. Error" msgstr "" @@ -3072,21 +3072,21 @@ msgstr "" msgid "`%s' is not a variable name" msgstr "" -#: src/language/stats/oneway.q:279 src/language/stats/regression.q:318 +#: src/language/stats/oneway.q:279 src/language/stats/regression.q:317 msgid "Sum of Squares" msgstr "" -#: src/language/stats/oneway.q:281 src/language/stats/regression.q:320 +#: src/language/stats/oneway.q:281 src/language/stats/regression.q:319 msgid "Mean Square" msgstr "" -#: src/language/stats/oneway.q:282 src/language/stats/regression.q:321 +#: src/language/stats/oneway.q:282 src/language/stats/regression.q:320 #: src/language/stats/t-test.q:977 msgid "F" msgstr "" #: src/language/stats/oneway.q:283 src/language/stats/oneway.q:537 -#: src/language/stats/regression.q:224 src/language/stats/regression.q:322 +#: src/language/stats/regression.q:223 src/language/stats/regression.q:321 msgid "Significance" msgstr "" @@ -3098,7 +3098,7 @@ msgstr "" msgid "Within Groups" msgstr "" -#: src/language/stats/oneway.q:353 src/language/stats/regression.q:348 +#: src/language/stats/oneway.q:353 src/language/stats/regression.q:347 msgid "ANOVA" msgstr "" @@ -3134,7 +3134,7 @@ msgstr "" msgid "Value of Contrast" msgstr "" -#: src/language/stats/oneway.q:680 src/language/stats/regression.q:223 +#: src/language/stats/oneway.q:680 src/language/stats/regression.q:222 #: src/language/stats/t-test.q:979 src/language/stats/t-test.q:1171 #: src/language/stats/t-test.q:1264 msgid "t" @@ -3206,59 +3206,59 @@ msgstr "" msgid "Too many variables in INTO clause." msgstr "" -#: src/language/stats/regression.q:175 +#: src/language/stats/regression.q:174 msgid "R" msgstr "" -#: src/language/stats/regression.q:176 +#: src/language/stats/regression.q:175 msgid "R Square" msgstr "" -#: src/language/stats/regression.q:177 +#: src/language/stats/regression.q:176 msgid "Adjusted R Square" msgstr "" -#: src/language/stats/regression.q:178 +#: src/language/stats/regression.q:177 msgid "Std. Error of the Estimate" msgstr "" -#: src/language/stats/regression.q:183 +#: src/language/stats/regression.q:182 msgid "Model Summary" msgstr "" -#: src/language/stats/regression.q:220 +#: src/language/stats/regression.q:219 msgid "B" msgstr "" -#: src/language/stats/regression.q:222 +#: src/language/stats/regression.q:221 msgid "Beta" msgstr "" -#: src/language/stats/regression.q:225 +#: src/language/stats/regression.q:224 msgid "(Constant)" msgstr "" -#: src/language/stats/regression.q:287 +#: src/language/stats/regression.q:286 msgid "Coefficients" msgstr "" -#: src/language/stats/regression.q:324 +#: src/language/stats/regression.q:323 msgid "Regression" msgstr "" -#: src/language/stats/regression.q:403 +#: src/language/stats/regression.q:402 msgid "Model" msgstr "" -#: src/language/stats/regression.q:404 +#: src/language/stats/regression.q:403 msgid "Covariances" msgstr "" -#: src/language/stats/regression.q:419 +#: src/language/stats/regression.q:418 msgid "Coefficient Correlations" msgstr "" -#: src/language/stats/regression.q:1196 +#: src/language/stats/regression.q:1195 msgid "Dependent variable must be numeric." msgstr "" @@ -3646,30 +3646,34 @@ msgstr "" msgid "CONVERT requires string input values and numeric output values." msgstr "" -#: src/language/xforms/recode.c:387 +#: src/language/xforms/recode.c:319 +msgid "THRU is not allowed with string variables." +msgstr "" + +#: src/language/xforms/recode.c:393 msgid "expecting output value" msgstr "" -#: src/language/xforms/recode.c:436 +#: src/language/xforms/recode.c:442 #, c-format msgid "" "%u variable(s) cannot be recoded into %u variable(s). Specify the same " "number of variables as source and target variables." msgstr "" -#: src/language/xforms/recode.c:451 +#: src/language/xforms/recode.c:457 #, c-format msgid "" "There is no variable named %s. (All string variables specified on INTO must " "already exist. Use the STRING command to create a string variable.)" msgstr "" -#: src/language/xforms/recode.c:466 +#: src/language/xforms/recode.c:472 #, c-format msgid "INTO is required with %s input values and %s output values." msgstr "" -#: src/language/xforms/recode.c:479 +#: src/language/xforms/recode.c:485 #, c-format msgid "Type mismatch. Cannot store %s data in %s variable %s." msgstr "" @@ -4571,26 +4575,22 @@ msgstr "Di_skretwerte" msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:2055 src/ui/gui/psppire.glade:1169 +#: src/ui/gui/data-editor.glade:2055 src/ui/gui/psppire.glade:1171 msgid "Sort by:" msgstr "" -#: src/ui/gui/data-editor.glade:2104 src/ui/gui/psppire.glade:1222 +#: src/ui/gui/data-editor.glade:2104 src/ui/gui/psppire.glade:1224 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:2117 src/ui/gui/psppire.glade:1232 +#: src/ui/gui/data-editor.glade:2117 src/ui/gui/psppire.glade:1234 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:2133 src/ui/gui/psppire.glade:1248 +#: src/ui/gui/data-editor.glade:2133 src/ui/gui/psppire.glade:1250 msgid "Sort Order" msgstr "" -#: src/ui/gui/dict-display.c:92 -msgid "Var" -msgstr "" - #: src/ui/gui/helper.c:136 msgid "Sorry. The help system hasn't yet been implemented." msgstr "Es gibt noch nicht kein Helpsysteme. Schade!" @@ -4692,14 +4692,14 @@ msgstr "Variableansicht" msgid "Current Status: " msgstr "" -#: src/ui/gui/psppire.glade:259 +#: src/ui/gui/psppire.glade:281 #, fuzzy -msgid "Name Variable:" +msgid "Variable(s):" msgstr "Variableansicht" -#: src/ui/gui/psppire.glade:292 +#: src/ui/gui/psppire.glade:330 #, fuzzy -msgid "Variable(s):" +msgid "Name Variable:" msgstr "Variableansicht" #: src/ui/gui/psppire.glade:446 @@ -4743,7 +4743,7 @@ msgstr "Alle Datei" msgid "If condition is satisfied" msgstr "" -#: src/ui/gui/psppire.glade:773 src/ui/gui/psppire.glade:1551 +#: src/ui/gui/psppire.glade:773 src/ui/gui/psppire.glade:1553 msgid "If..." msgstr "" @@ -4804,24 +4804,24 @@ msgstr "" msgid "Do not filter cases" msgstr "" -#: src/ui/gui/psppire.glade:1317 +#: src/ui/gui/psppire.glade:1319 #, fuzzy msgid "Target Variable:" msgstr "Variableansicht" -#: src/ui/gui/psppire.glade:1348 +#: src/ui/gui/psppire.glade:1350 msgid "Type & Label" msgstr "" -#: src/ui/gui/psppire.glade:1387 +#: src/ui/gui/psppire.glade:1389 msgid "=" msgstr "" -#: src/ui/gui/psppire.glade:1433 +#: src/ui/gui/psppire.glade:1435 msgid "Numeric Expressions:" msgstr "" -#: src/ui/gui/psppire.glade:1487 +#: src/ui/gui/psppire.glade:1489 msgid "Functions:" msgstr "" diff --git a/po/pspp.pot b/po/pspp.pot index 93f36619..b9876c25 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-04-16 18:39+0800\n" +"POT-Creation-Date: 2007-04-25 07:29+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -308,32 +308,32 @@ msgid "%s variables are not compatible with %s format %s." msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1127 +#: src/data/sys-file-reader.c:629 src/ui/gui/data-editor.glade:1127 #: src/ui/gui/psppire-var-store.c:481 msgid "String" msgstr "" #: src/data/format.c:310 src/data/por-file-reader.c:489 -#: src/data/sys-file-reader.c:602 src/ui/gui/data-editor.glade:1023 +#: src/data/sys-file-reader.c:629 src/ui/gui/data-editor.glade:1023 #: src/ui/gui/psppire-var-store.c:474 msgid "Numeric" msgstr "" -#: src/data/format.c:311 src/data/sys-file-reader.c:1029 -#: src/data/sys-file-reader.c:1031 +#: src/data/format.c:311 src/data/sys-file-reader.c:1057 +#: src/data/sys-file-reader.c:1059 #: src/language/dictionary/apply-dictionary.c:77 #: src/language/dictionary/apply-dictionary.c:78 -#: src/language/xforms/recode.c:468 src/language/xforms/recode.c:469 -#: src/language/xforms/recode.c:481 src/language/xforms/recode.c:482 +#: src/language/xforms/recode.c:474 src/language/xforms/recode.c:475 +#: src/language/xforms/recode.c:487 src/language/xforms/recode.c:488 msgid "numeric" msgstr "" -#: src/data/format.c:311 src/data/sys-file-reader.c:1029 -#: src/data/sys-file-reader.c:1031 +#: src/data/format.c:311 src/data/sys-file-reader.c:1057 +#: src/data/sys-file-reader.c:1059 #: src/language/dictionary/apply-dictionary.c:77 #: src/language/dictionary/apply-dictionary.c:78 -#: src/language/xforms/recode.c:468 src/language/xforms/recode.c:469 -#: src/language/xforms/recode.c:481 src/language/xforms/recode.c:482 +#: src/language/xforms/recode.c:474 src/language/xforms/recode.c:475 +#: src/language/xforms/recode.c:487 src/language/xforms/recode.c:488 msgid "string" msgstr "" @@ -511,272 +511,272 @@ msgstr "" msgid "Could not access definition for terminal `%s'." msgstr "" -#: src/data/sys-file-reader.c:207 +#: src/data/sys-file-reader.c:209 #, c-format msgid "Error opening \"%s\" for reading as a system file: %s." msgstr "" -#: src/data/sys-file-reader.c:237 +#: src/data/sys-file-reader.c:239 msgid "Misplaced type 4 record." msgstr "" -#: src/data/sys-file-reader.c:248 +#: src/data/sys-file-reader.c:250 #, c-format msgid "Unrecognized record type %d." msgstr "" -#: src/data/sys-file-reader.c:257 +#: src/data/sys-file-reader.c:284 #, c-format msgid "File header claims %d variable positions but %d were read from file." msgstr "" -#: src/data/sys-file-reader.c:289 +#: src/data/sys-file-reader.c:316 #, c-format msgid "Error closing system file \"%s\": %s." msgstr "" -#: src/data/sys-file-reader.c:349 src/data/sys-file-reader.c:359 +#: src/data/sys-file-reader.c:376 src/data/sys-file-reader.c:386 msgid "This is not an SPSS system file." msgstr "" -#: src/data/sys-file-reader.c:377 +#: src/data/sys-file-reader.c:404 #, c-format msgid "" "Compression bias (%g) is not the usual value of 100, or system file uses " "unrecognized floating-point format." msgstr "" -#: src/data/sys-file-reader.c:451 +#: src/data/sys-file-reader.c:478 #, c-format msgid "Invalid variable name `%s'." msgstr "" -#: src/data/sys-file-reader.c:455 +#: src/data/sys-file-reader.c:482 #, c-format msgid "Bad variable width %d." msgstr "" -#: src/data/sys-file-reader.c:459 +#: src/data/sys-file-reader.c:486 #, c-format msgid "Duplicate variable name `%s' within system file." msgstr "" -#: src/data/sys-file-reader.c:467 +#: src/data/sys-file-reader.c:494 msgid "Variable label indicator field is not 0 or 1." msgstr "" -#: src/data/sys-file-reader.c:475 +#: src/data/sys-file-reader.c:502 #, c-format msgid "Variable %s has label of invalid length %u." msgstr "" -#: src/data/sys-file-reader.c:486 +#: src/data/sys-file-reader.c:513 msgid "Missing value indicator field is not -3, -2, 0, 1, 2, or 3." msgstr "" -#: src/data/sys-file-reader.c:522 +#: src/data/sys-file-reader.c:549 #, c-format msgid "String variable %s may not have missing values specified as a range." msgstr "" -#: src/data/sys-file-reader.c:527 +#: src/data/sys-file-reader.c:554 #, c-format msgid "Long string variable %s may not have missing values." msgstr "" -#: src/data/sys-file-reader.c:549 +#: src/data/sys-file-reader.c:576 msgid "Missing string continuation record." msgstr "" -#: src/data/sys-file-reader.c:583 +#: src/data/sys-file-reader.c:610 #, c-format msgid "Unknown variable format %d." msgstr "" -#: src/data/sys-file-reader.c:601 +#: src/data/sys-file-reader.c:628 #, c-format msgid "%s variable %s has invalid %s format %s." msgstr "" -#: src/data/sys-file-reader.c:604 +#: src/data/sys-file-reader.c:631 msgid "print" msgstr "" -#: src/data/sys-file-reader.c:604 +#: src/data/sys-file-reader.c:631 msgid "write" msgstr "" -#: src/data/sys-file-reader.c:608 +#: src/data/sys-file-reader.c:635 msgid "Suppressing further invalid format warnings." msgstr "" -#: src/data/sys-file-reader.c:626 +#: src/data/sys-file-reader.c:653 msgid "Weighting variable must be numeric." msgstr "" -#: src/data/sys-file-reader.c:640 +#: src/data/sys-file-reader.c:667 msgid "Multiple type 6 (document) records." msgstr "" -#: src/data/sys-file-reader.c:644 +#: src/data/sys-file-reader.c:671 #, c-format msgid "Number of document lines (%d) must be greater than 0." msgstr "" -#: src/data/sys-file-reader.c:715 +#: src/data/sys-file-reader.c:742 #, c-format msgid "Unrecognized record type 7, subtype %d." msgstr "" -#: src/data/sys-file-reader.c:739 +#: src/data/sys-file-reader.c:766 #, c-format msgid "Bad size (%u) or count (%u) field on record type 7, subtype 3." msgstr "" -#: src/data/sys-file-reader.c:754 +#: src/data/sys-file-reader.c:781 #, c-format msgid "" "Floating-point representation indicated by system file (%d) differs from " "expected (%d)." msgstr "" -#: src/data/sys-file-reader.c:767 +#: src/data/sys-file-reader.c:794 msgid "little-endian" msgstr "" -#: src/data/sys-file-reader.c:767 +#: src/data/sys-file-reader.c:794 msgid "big-endian" msgstr "" -#: src/data/sys-file-reader.c:768 +#: src/data/sys-file-reader.c:795 #, c-format msgid "" "Integer format indicated by system file (%s) differs from expected (%s)." msgstr "" -#: src/data/sys-file-reader.c:784 +#: src/data/sys-file-reader.c:811 #, c-format msgid "Bad size (%u) or count (%u) on extension 4." msgstr "" -#: src/data/sys-file-reader.c:788 +#: src/data/sys-file-reader.c:815 #, c-format msgid "File specifies unexpected value %g as SYSMIS." msgstr "" -#: src/data/sys-file-reader.c:790 +#: src/data/sys-file-reader.c:817 #, c-format msgid "File specifies unexpected value %g as HIGHEST." msgstr "" -#: src/data/sys-file-reader.c:792 +#: src/data/sys-file-reader.c:819 #, c-format msgid "File specifies unexpected value %g as LOWEST." msgstr "" -#: src/data/sys-file-reader.c:806 +#: src/data/sys-file-reader.c:833 #, c-format msgid "Bad size (%u) or count (%u) on extension 11." msgstr "" -#: src/data/sys-file-reader.c:823 +#: src/data/sys-file-reader.c:850 msgid "Invalid variable display parameters. Default parameters substituted." msgstr "" -#: src/data/sys-file-reader.c:861 +#: src/data/sys-file-reader.c:888 #, c-format msgid "Long variable mapping from %s to invalid variable name `%s'." msgstr "" -#: src/data/sys-file-reader.c:871 +#: src/data/sys-file-reader.c:898 #, c-format msgid "Duplicate long variable name `%s' within system file." msgstr "" -#: src/data/sys-file-reader.c:909 +#: src/data/sys-file-reader.c:937 #, c-format msgid "%s listed as string of length %s in length table." msgstr "" -#: src/data/sys-file-reader.c:923 +#: src/data/sys-file-reader.c:951 #, c-format msgid "Very long string %s overflows dictionary." msgstr "" -#: src/data/sys-file-reader.c:970 +#: src/data/sys-file-reader.c:998 #, c-format msgid "Invalid number of labels: %d. Ignoring labels." msgstr "" -#: src/data/sys-file-reader.c:1001 +#: src/data/sys-file-reader.c:1029 msgid "" "Variable index record (type 4) does not immediately follow value label " "record (type 3) as it should." msgstr "" -#: src/data/sys-file-reader.c:1008 +#: src/data/sys-file-reader.c:1036 #, c-format msgid "" "Number of variables associated with a value label (%d) is not between 1 and " "the number of variables (%u)." msgstr "" -#: src/data/sys-file-reader.c:1018 +#: src/data/sys-file-reader.c:1046 #, c-format msgid "Value labels are not allowed on long string variables (%s)." msgstr "" -#: src/data/sys-file-reader.c:1025 +#: src/data/sys-file-reader.c:1053 #, c-format msgid "" "Variables associated with value label are not all of identical type. " "Variable %s is %s, but variable %s is %s." msgstr "" -#: src/data/sys-file-reader.c:1058 +#: src/data/sys-file-reader.c:1086 #, c-format msgid "Duplicate value label for %g on %s." msgstr "" -#: src/data/sys-file-reader.c:1061 +#: src/data/sys-file-reader.c:1089 #, c-format msgid "Duplicate value label for \"%.*s\" on %s." msgstr "" -#: src/data/sys-file-reader.c:1179 +#: src/data/sys-file-reader.c:1207 msgid "File ends in partial case." msgstr "" -#: src/data/sys-file-reader.c:1275 src/data/sys-file-reader.c:1311 +#: src/data/sys-file-reader.c:1303 src/data/sys-file-reader.c:1339 msgid "Compressed data is corrupt." msgstr "" -#: src/data/sys-file-reader.c:1384 +#: src/data/sys-file-reader.c:1412 #, c-format msgid "Variable index %d not in valid range 1...%d." msgstr "" -#: src/data/sys-file-reader.c:1389 +#: src/data/sys-file-reader.c:1417 #, c-format msgid "Variable index %d refers to long string continuation." msgstr "" -#: src/data/sys-file-reader.c:1475 +#: src/data/sys-file-reader.c:1503 #, c-format msgid "Suppressed %d additional variable map warnings." msgstr "" -#: src/data/sys-file-reader.c:1488 +#: src/data/sys-file-reader.c:1516 #, c-format msgid "Variable map refers to unknown variable %s." msgstr "" -#: src/data/sys-file-reader.c:1564 +#: src/data/sys-file-reader.c:1592 #, c-format msgid "System error: %s." msgstr "" -#: src/data/sys-file-reader.c:1566 +#: src/data/sys-file-reader.c:1594 msgid "Unexpected end of file." msgstr "" @@ -795,41 +795,41 @@ msgstr "" msgid "An I/O error occurred writing system file \"%s\"." msgstr "" -#: src/data/variable.c:231 +#: src/data/variable.c:232 #, c-format msgid "" "Character `%c' (in %s) may not appear as the first character in a variable " "name." msgstr "" -#: src/data/variable.c:243 +#: src/data/variable.c:244 #, c-format msgid "Character `%c' (in %s) may not appear in a variable name." msgstr "" -#: src/data/variable.c:271 +#: src/data/variable.c:272 msgid "Variable name cannot be empty string." msgstr "" -#: src/data/variable.c:277 +#: src/data/variable.c:278 #, c-format msgid "Variable name %s exceeds %d-character limit." msgstr "" -#: src/data/variable.c:285 +#: src/data/variable.c:286 #, c-format msgid "`%s' may not be used as a variable name because it is a reserved word." msgstr "" -#: src/data/variable.c:966 +#: src/data/variable.c:967 msgid "ordinary" msgstr "" -#: src/data/variable.c:968 +#: src/data/variable.c:969 msgid "system" msgstr "" -#: src/data/variable.c:970 +#: src/data/variable.c:971 msgid "scratch" msgstr "" @@ -1031,7 +1031,7 @@ msgstr "" #: src/language/dictionary/sys-file-info.c:160 #: src/language/dictionary/sys-file-info.c:395 #: src/language/dictionary/sys-file-info.c:620 -#: src/language/stats/descriptives.c:880 +#: src/language/stats/descriptives.c:880 src/ui/gui/dict-display.c:198 msgid "Variable" msgstr "" @@ -2280,7 +2280,7 @@ msgstr "" #: src/language/stats/crosstabs.q:1026 src/language/stats/crosstabs.q:1749 #: src/language/stats/examine.q:909 src/language/stats/frequencies.q:1222 #: src/language/stats/oneway.q:307 src/language/stats/oneway.q:471 -#: src/language/stats/regression.q:326 +#: src/language/stats/regression.q:325 msgid "Total" msgstr "" @@ -2326,7 +2326,7 @@ msgid "Expected N" msgstr "" #: src/language/stats/chisquare.c:223 src/language/stats/chisquare.c:263 -#: src/language/stats/regression.q:325 +#: src/language/stats/regression.q:324 msgid "Residual" msgstr "" @@ -2344,7 +2344,7 @@ msgstr "" #: src/language/stats/chisquare.c:325 src/language/stats/crosstabs.q:1120 #: src/language/stats/oneway.q:280 src/language/stats/oneway.q:681 -#: src/language/stats/regression.q:319 src/language/stats/t-test.q:980 +#: src/language/stats/regression.q:318 src/language/stats/t-test.q:980 #: src/language/stats/t-test.q:1172 src/language/stats/t-test.q:1265 msgid "df" msgstr "" @@ -2767,7 +2767,7 @@ msgid "Lowest" msgstr "" #: src/language/stats/examine.q:1421 src/language/stats/oneway.q:395 -#: src/language/stats/oneway.q:679 src/language/stats/regression.q:221 +#: src/language/stats/oneway.q:679 src/language/stats/regression.q:220 msgid "Std. Error" msgstr "" @@ -3066,21 +3066,21 @@ msgstr "" msgid "`%s' is not a variable name" msgstr "" -#: src/language/stats/oneway.q:279 src/language/stats/regression.q:318 +#: src/language/stats/oneway.q:279 src/language/stats/regression.q:317 msgid "Sum of Squares" msgstr "" -#: src/language/stats/oneway.q:281 src/language/stats/regression.q:320 +#: src/language/stats/oneway.q:281 src/language/stats/regression.q:319 msgid "Mean Square" msgstr "" -#: src/language/stats/oneway.q:282 src/language/stats/regression.q:321 +#: src/language/stats/oneway.q:282 src/language/stats/regression.q:320 #: src/language/stats/t-test.q:977 msgid "F" msgstr "" #: src/language/stats/oneway.q:283 src/language/stats/oneway.q:537 -#: src/language/stats/regression.q:224 src/language/stats/regression.q:322 +#: src/language/stats/regression.q:223 src/language/stats/regression.q:321 msgid "Significance" msgstr "" @@ -3092,7 +3092,7 @@ msgstr "" msgid "Within Groups" msgstr "" -#: src/language/stats/oneway.q:353 src/language/stats/regression.q:348 +#: src/language/stats/oneway.q:353 src/language/stats/regression.q:347 msgid "ANOVA" msgstr "" @@ -3128,7 +3128,7 @@ msgstr "" msgid "Value of Contrast" msgstr "" -#: src/language/stats/oneway.q:680 src/language/stats/regression.q:223 +#: src/language/stats/oneway.q:680 src/language/stats/regression.q:222 #: src/language/stats/t-test.q:979 src/language/stats/t-test.q:1171 #: src/language/stats/t-test.q:1264 msgid "t" @@ -3200,59 +3200,59 @@ msgstr "" msgid "Too many variables in INTO clause." msgstr "" -#: src/language/stats/regression.q:175 +#: src/language/stats/regression.q:174 msgid "R" msgstr "" -#: src/language/stats/regression.q:176 +#: src/language/stats/regression.q:175 msgid "R Square" msgstr "" -#: src/language/stats/regression.q:177 +#: src/language/stats/regression.q:176 msgid "Adjusted R Square" msgstr "" -#: src/language/stats/regression.q:178 +#: src/language/stats/regression.q:177 msgid "Std. Error of the Estimate" msgstr "" -#: src/language/stats/regression.q:183 +#: src/language/stats/regression.q:182 msgid "Model Summary" msgstr "" -#: src/language/stats/regression.q:220 +#: src/language/stats/regression.q:219 msgid "B" msgstr "" -#: src/language/stats/regression.q:222 +#: src/language/stats/regression.q:221 msgid "Beta" msgstr "" -#: src/language/stats/regression.q:225 +#: src/language/stats/regression.q:224 msgid "(Constant)" msgstr "" -#: src/language/stats/regression.q:287 +#: src/language/stats/regression.q:286 msgid "Coefficients" msgstr "" -#: src/language/stats/regression.q:324 +#: src/language/stats/regression.q:323 msgid "Regression" msgstr "" -#: src/language/stats/regression.q:403 +#: src/language/stats/regression.q:402 msgid "Model" msgstr "" -#: src/language/stats/regression.q:404 +#: src/language/stats/regression.q:403 msgid "Covariances" msgstr "" -#: src/language/stats/regression.q:419 +#: src/language/stats/regression.q:418 msgid "Coefficient Correlations" msgstr "" -#: src/language/stats/regression.q:1196 +#: src/language/stats/regression.q:1195 msgid "Dependent variable must be numeric." msgstr "" @@ -3640,30 +3640,34 @@ msgstr "" msgid "CONVERT requires string input values and numeric output values." msgstr "" -#: src/language/xforms/recode.c:387 +#: src/language/xforms/recode.c:319 +msgid "THRU is not allowed with string variables." +msgstr "" + +#: src/language/xforms/recode.c:393 msgid "expecting output value" msgstr "" -#: src/language/xforms/recode.c:436 +#: src/language/xforms/recode.c:442 #, c-format msgid "" "%u variable(s) cannot be recoded into %u variable(s). Specify the same " "number of variables as source and target variables." msgstr "" -#: src/language/xforms/recode.c:451 +#: src/language/xforms/recode.c:457 #, c-format msgid "" "There is no variable named %s. (All string variables specified on INTO must " "already exist. Use the STRING command to create a string variable.)" msgstr "" -#: src/language/xforms/recode.c:466 +#: src/language/xforms/recode.c:472 #, c-format msgid "INTO is required with %s input values and %s output values." msgstr "" -#: src/language/xforms/recode.c:479 +#: src/language/xforms/recode.c:485 #, c-format msgid "Type mismatch. Cannot store %s data in %s variable %s." msgstr "" @@ -4546,26 +4550,22 @@ msgstr "" msgid "Case Number:" msgstr "" -#: src/ui/gui/data-editor.glade:2055 src/ui/gui/psppire.glade:1169 +#: src/ui/gui/data-editor.glade:2055 src/ui/gui/psppire.glade:1171 msgid "Sort by:" msgstr "" -#: src/ui/gui/data-editor.glade:2104 src/ui/gui/psppire.glade:1222 +#: src/ui/gui/data-editor.glade:2104 src/ui/gui/psppire.glade:1224 msgid "Ascending" msgstr "" -#: src/ui/gui/data-editor.glade:2117 src/ui/gui/psppire.glade:1232 +#: src/ui/gui/data-editor.glade:2117 src/ui/gui/psppire.glade:1234 msgid "Descending" msgstr "" -#: src/ui/gui/data-editor.glade:2133 src/ui/gui/psppire.glade:1248 +#: src/ui/gui/data-editor.glade:2133 src/ui/gui/psppire.glade:1250 msgid "Sort Order" msgstr "" -#: src/ui/gui/dict-display.c:92 -msgid "Var" -msgstr "" - #: src/ui/gui/helper.c:136 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" @@ -4664,12 +4664,12 @@ msgstr "" msgid "Current Status: " msgstr "" -#: src/ui/gui/psppire.glade:259 -msgid "Name Variable:" +#: src/ui/gui/psppire.glade:281 +msgid "Variable(s):" msgstr "" -#: src/ui/gui/psppire.glade:292 -msgid "Variable(s):" +#: src/ui/gui/psppire.glade:330 +msgid "Name Variable:" msgstr "" #: src/ui/gui/psppire.glade:446 @@ -4712,7 +4712,7 @@ msgstr "" msgid "If condition is satisfied" msgstr "" -#: src/ui/gui/psppire.glade:773 src/ui/gui/psppire.glade:1551 +#: src/ui/gui/psppire.glade:773 src/ui/gui/psppire.glade:1553 msgid "If..." msgstr "" @@ -4768,23 +4768,23 @@ msgstr "" msgid "Do not filter cases" msgstr "" -#: src/ui/gui/psppire.glade:1317 +#: src/ui/gui/psppire.glade:1319 msgid "Target Variable:" msgstr "" -#: src/ui/gui/psppire.glade:1348 +#: src/ui/gui/psppire.glade:1350 msgid "Type & Label" msgstr "" -#: src/ui/gui/psppire.glade:1387 +#: src/ui/gui/psppire.glade:1389 msgid "=" msgstr "" -#: src/ui/gui/psppire.glade:1433 +#: src/ui/gui/psppire.glade:1435 msgid "Numeric Expressions:" msgstr "" -#: src/ui/gui/psppire.glade:1487 +#: src/ui/gui/psppire.glade:1489 msgid "Functions:" msgstr "" diff --git a/src/libpspp/ChangeLog b/src/libpspp/ChangeLog index ee213a65..4d3df135 100644 --- a/src/libpspp/ChangeLog +++ b/src/libpspp/ChangeLog @@ -1,3 +1,7 @@ +2007-04-25 John Darrington + + * i18n.c: Fixed bug converting long strings + 2007-04-22 Ben Pfaff Patch #5884. diff --git a/src/libpspp/i18n.c b/src/libpspp/i18n.c index 23254ea3..e77abfe5 100644 --- a/src/libpspp/i18n.c +++ b/src/libpspp/i18n.c @@ -24,6 +24,7 @@ #include #include #include +#include "assertion.h" #include "i18n.h" @@ -39,21 +40,21 @@ static iconv_t convertor[n_CONV]; /* A wrapper around iconv_open */ -static iconv_t +static iconv_t create_iconv (const char* tocode, const char* fromcode) { iconv_t conv = iconv_open (tocode, fromcode); /* I don't think it's safe to translate this string or to use messaging as the convertors have not yet been set up */ - if ( (iconv_t) -1 == conv) + if ( (iconv_t) -1 == conv) { const int err = errno; - fprintf (stderr, + fprintf (stderr, "Warning: cannot create a convertor for \"%s\" to \"%s\": %s\n", fromcode, tocode, strerror (err)); } - + return conv; } @@ -74,19 +75,19 @@ recode_string (enum conv_id how, const char *text, int length) /* FIXME: Need to ensure that this char is valid in the target encoding */ const char fallbackchar = '?'; - if ( text == NULL ) + if ( text == NULL ) return NULL; - if ( length == -1 ) + if ( length == -1 ) length = strlen(text); assert (how < n_CONV); - if (convertor[how] == (iconv_t) -1) + if (convertor[how] == (iconv_t) -1) return xstrndup (text, length); for ( outbufferlength = 1 ; outbufferlength != 0; outbufferlength <<= 1 ) - if ( outbufferlength > length) + if ( outbufferlength > length) break; outbuf = xmalloc(outbufferlength); @@ -94,12 +95,13 @@ recode_string (enum conv_id how, const char *text, int length) outbytes = outbufferlength; inbytes = length; - + do { - result = iconv (convertor[how], (ICONV_CONST char **) &text, &inbytes, + char *ip = text; + result = iconv (convertor[how], (ICONV_CONST char **) &text, &inbytes, &op, &outbytes); - if ( -1 == result ) + if ( -1 == result ) { int the_error = errno; @@ -107,7 +109,7 @@ recode_string (enum conv_id how, const char *text, int length) { case EILSEQ: case EINVAL: - if ( outbytes > 0 ) + if ( outbytes > 0 ) { *op++ = fallbackchar; outbytes--; @@ -123,19 +125,21 @@ recode_string (enum conv_id how, const char *text, int length) op = outbuf; outbytes = outbufferlength; inbytes = length; + text = ip; break; default: /* should never happen */ + NOT_REACHED (); break; } } } while ( -1 == result ); - if (outbytes == 0 ) + if (outbytes == 0 ) { char *const oldaddr = outbuf; outbuf = xrealloc (outbuf, outbufferlength + 1); - + op += (outbuf - oldaddr) ; } @@ -154,7 +158,7 @@ get_pspp_locale (void) } /* Set the PSPP locale */ -void +void set_pspp_locale (const char *l) { char *current_locale; @@ -166,7 +170,7 @@ set_pspp_locale (const char *l) current_locale = setlocale (LC_CTYPE, 0); current_charset = locale_charset (); setlocale (LC_CTYPE, locale); - + charset = locale_charset (); setlocale (LC_CTYPE, current_locale); @@ -191,16 +195,16 @@ i18n_init (void) } -void +void i18n_done (void) { int i; free (locale); locale = 0; - for(i = 0 ; i < n_CONV; ++i ) + for(i = 0 ; i < n_CONV; ++i ) { - if ( (iconv_t) -1 == convertor[i] ) + if ( (iconv_t) -1 == convertor[i] ) continue; iconv_close (convertor[i]); } diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index 1b75e56b..6a2b717c 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,13 @@ +2007-04-25 John Darrington + + * icons/scalable icons/16x16: new directories. + * psppire.c : Add new icons to factory. + + * dict-display.c: Refactor code get model from modelfilter. + Added cellrenderer to display icon indicating variables' types. + Displayed the label of variables, if there is one. + + 2007-04-15 Ben Pfaff * compute-dialog.c (function_list_populate): Use new accessor diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 6b95ff68..122cd3b9 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -59,7 +59,12 @@ dist_src_ui_gui_psppire_DATA = \ $(top_srcdir)/src/ui/gui/icons/recent-dialogs.png \ $(top_srcdir)/src/ui/gui/icons/split-file.png \ $(top_srcdir)/src/ui/gui/icons/select-cases.png \ - $(top_srcdir)/src/ui/gui/icons/weight-cases.png + $(top_srcdir)/src/ui/gui/icons/weight-cases.png \ + $(top_srcdir)/src/ui/gui/icons/16x16/nominal.png \ + $(top_srcdir)/src/ui/gui/icons/16x16/ordinal.png \ + $(top_srcdir)/src/ui/gui/icons/16x16/scale.png \ + $(top_srcdir)/src/ui/gui/icons/16x16/string.png \ + $(top_srcdir)/src/ui/gui/icons/16x16/date-scale.png src_ui_gui_psppire_SOURCES = \ diff --git a/src/ui/gui/dict-display.c b/src/ui/gui/dict-display.c index 68b7b8d4..13269b63 100644 --- a/src/ui/gui/dict-display.c +++ b/src/ui/gui/dict-display.c @@ -51,7 +51,112 @@ filter_variables (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) return predicate (var); } -/* Sets up TREEVIEW to display the variables of DICT. +/* A GtkTreeCellDataFunc which sets the icon appropriate to the type + of variable */ +static void +var_icon_cell_data_func (GtkTreeViewColumn *col, + GtkCellRenderer *cell, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer data) +{ + struct variable *var; + gtk_tree_model_get (model, iter, DICT_TVM_COL_VAR, &var, -1); + + if ( var_is_alpha (var)) + { + g_object_set (cell, "stock-id", "var-string", NULL); + } + else + { + const struct fmt_spec *fs = var_get_write_format (var); + int cat = fmt_get_category (fs->type); + switch ( var_get_measure (var)) + { + case MEASURE_NOMINAL: + g_object_set (cell, "stock-id", "var-nominal", NULL); + break; + case MEASURE_ORDINAL: + g_object_set (cell, "stock-id", "var-ordinal", NULL); + break; + case MEASURE_SCALE: + if ( ( FMT_CAT_DATE | FMT_CAT_TIME ) & cat ) + g_object_set (cell, "stock-id", "var-date-scale", NULL); + else + g_object_set (cell, "stock-id", "var-scale", NULL); + break; + default: + g_assert_not_reached (); + }; + } +} + + +static void +get_base_model (GtkTreeModel *top_model, GtkTreeIter *top_iter, + GtkTreeModel **model, GtkTreeIter *iter + ) +{ + *model = top_model; + *iter = *top_iter; + while (GTK_IS_TREE_MODEL_FILTER (*model)) + { + GtkTreeIter parent_iter = *iter; + GtkTreeModelFilter *parent_model = GTK_TREE_MODEL_FILTER (*model); + + *model = gtk_tree_model_filter_get_model (parent_model); + + gtk_tree_model_filter_convert_iter_to_child_iter (parent_model, + iter, + &parent_iter); + } + + g_assert (PSPPIRE_IS_DICT (*model)); +} + +/* A GtkTreeCellDataFunc which renders the name and/or label of the + variable */ +static void +var_description_cell_data_func (GtkTreeViewColumn *col, + GtkCellRenderer *cell, + GtkTreeModel *top_model, + GtkTreeIter *top_iter, + gpointer data) +{ + struct variable *var; + GtkTreeIter iter; + GtkTreeModel *model; + + + get_base_model (top_model, top_iter, &model, &iter); + + g_assert (PSPPIRE_IS_DICT (model)); + + + gtk_tree_model_get (model, + &iter, DICT_TVM_COL_VAR, &var, -1); + + if ( var_has_label (var)) + { + gchar *text = g_strdup_printf ( + "%s" + " (%s)", + var_get_label (var), + var_get_name (var)); + + char *utf8 = pspp_locale_to_utf8 (text, -1, NULL); + + g_free (text); + g_object_set (cell, "markup", utf8, NULL); + g_free (utf8); + } + else + { + g_object_set (cell, "text", var_get_name (var), NULL); + } +} + + /* Sets up TREEVIEW to display the variables of DICT. MODE is the selection mode for TREEVIEW. PREDICATE determines which variables should be visible, or NULL if all are to be visible. @@ -67,7 +172,8 @@ attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict, GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); - GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); + GtkCellRenderer *renderer; + GtkTreeModel *model ; if ( predicate ) @@ -88,18 +194,31 @@ attach_dictionary_to_treeview (GtkTreeView *treeview, PsppireDict *dict, gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), model); + col = gtk_tree_view_column_new (); + gtk_tree_view_column_set_title (col, _("Variable")); - col = gtk_tree_view_column_new_with_attributes (_("Var"), - renderer, - "text", - 0, - NULL); + renderer = gtk_cell_renderer_pixbuf_new (); + gtk_tree_view_column_pack_start (col, renderer, FALSE); - /* FIXME: make this a value in terms of character widths */ - g_object_set (col, "min-width", 100, NULL); + gtk_tree_view_column_set_cell_data_func (col, renderer, + var_icon_cell_data_func, + NULL, NULL); + + + renderer = gtk_cell_renderer_text_new (); + gtk_tree_view_column_pack_start (col, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func (col, renderer, + var_description_cell_data_func, + NULL, NULL); + + g_object_set (renderer, "ellipsize-set", TRUE, NULL); + g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_MIDDLE, NULL); gtk_tree_view_column_set_sizing (col, GTK_TREE_VIEW_COLUMN_FIXED); + /* FIXME: make this a value in terms of character widths */ + gtk_tree_view_column_set_min_width (col, 150); + gtk_tree_view_append_column (treeview, col); gtk_tree_selection_set_mode (selection, mode); @@ -113,7 +232,7 @@ insert_source_row_into_entry (GtkTreeIter iter, ) { GtkTreePath *path; - PsppireDict *dict; + GtkTreeModel *dict; gint *idx; struct variable *var; GtkTreeIter dict_iter; @@ -121,27 +240,13 @@ insert_source_row_into_entry (GtkTreeIter iter, g_return_if_fail (GTK_IS_ENTRY(dest)); - - if ( GTK_IS_TREE_MODEL_FILTER (model)) - { - dict = PSPPIRE_DICT (gtk_tree_model_filter_get_model - (GTK_TREE_MODEL_FILTER(model))); - gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER - (model), - &dict_iter, &iter); - } - else - { - dict = PSPPIRE_DICT (model); - dict_iter = iter; - } - + get_base_model (model, &iter, &dict, &dict_iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (dict), &dict_iter); idx = gtk_tree_path_get_indices (path); - var = psppire_dict_get_variable (dict, *idx); + var = psppire_dict_get_variable (PSPPIRE_DICT (dict), *idx); gtk_tree_path_free (path); @@ -164,24 +269,12 @@ insert_source_row_into_tree_view (GtkTreeIter iter, gint *row ; GtkTreeModel *destmodel = gtk_tree_view_get_model ( GTK_TREE_VIEW (dest)); - PsppireDict *dict; + GtkTreeModel *dict; - if ( GTK_IS_TREE_MODEL_FILTER (model)) - { - dict = PSPPIRE_DICT (gtk_tree_model_filter_get_model - (GTK_TREE_MODEL_FILTER(model))); - gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER - (model), - &dict_iter, &iter); - } - else - { - dict = PSPPIRE_DICT (model); - dict_iter = iter; - } + get_base_model (model, &iter, &dict, &dict_iter); - path = gtk_tree_model_get_path (GTK_TREE_MODEL (dict), &dict_iter); + path = gtk_tree_model_get_path (dict, &dict_iter); row = gtk_tree_path_get_indices (path); @@ -199,37 +292,22 @@ is_currently_in_entry (GtkTreeModel *model, GtkTreeIter *iter, gboolean result; gchar *name; GtkTreeIter dict_iter; - PsppireDict *dict; + GtkTreeModel *dict; struct variable *var; gint dict_index; gint *indeces; GtkTreePath *path; const gchar *text = gtk_entry_get_text (GTK_ENTRY (selector->dest)); + get_base_model (model, iter, &dict, &dict_iter); - if ( GTK_IS_TREE_MODEL_FILTER (model)) - { - dict = PSPPIRE_DICT (gtk_tree_model_filter_get_model - (GTK_TREE_MODEL_FILTER(model))); - gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER - (model), - &dict_iter, iter); - } - else - { - dict = PSPPIRE_DICT (model); - dict_iter = *iter; - } - - - path = gtk_tree_model_get_path (GTK_TREE_MODEL(dict), - &dict_iter); + path = gtk_tree_model_get_path (dict, &dict_iter); indeces = gtk_tree_path_get_indices (path); dict_index = indeces [0]; - var = psppire_dict_get_variable (dict, dict_index); + var = psppire_dict_get_variable (PSPPIRE_DICT (dict), dict_index); gtk_tree_path_free (path); diff --git a/src/ui/gui/icons/16x16/date-scale.png b/src/ui/gui/icons/16x16/date-scale.png new file mode 100644 index 00000000..16247d2a Binary files /dev/null and b/src/ui/gui/icons/16x16/date-scale.png differ diff --git a/src/ui/gui/icons/16x16/nominal.png b/src/ui/gui/icons/16x16/nominal.png new file mode 100644 index 00000000..896a254c Binary files /dev/null and b/src/ui/gui/icons/16x16/nominal.png differ diff --git a/src/ui/gui/icons/16x16/ordinal.png b/src/ui/gui/icons/16x16/ordinal.png new file mode 100644 index 00000000..752369fb Binary files /dev/null and b/src/ui/gui/icons/16x16/ordinal.png differ diff --git a/src/ui/gui/icons/16x16/scale.png b/src/ui/gui/icons/16x16/scale.png new file mode 100644 index 00000000..c6006178 Binary files /dev/null and b/src/ui/gui/icons/16x16/scale.png differ diff --git a/src/ui/gui/icons/16x16/string.png b/src/ui/gui/icons/16x16/string.png new file mode 100644 index 00000000..a10dd66c Binary files /dev/null and b/src/ui/gui/icons/16x16/string.png differ diff --git a/src/ui/gui/icons/scalable/date-scale.svg b/src/ui/gui/icons/scalable/date-scale.svg new file mode 100644 index 00000000..ee03b00c --- /dev/null +++ b/src/ui/gui/icons/scalable/date-scale.svg @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ui/gui/icons/scalable/nominal.svg b/src/ui/gui/icons/scalable/nominal.svg new file mode 100644 index 00000000..32488a31 --- /dev/null +++ b/src/ui/gui/icons/scalable/nominal.svg @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/src/ui/gui/icons/scalable/ordinal.svg b/src/ui/gui/icons/scalable/ordinal.svg new file mode 100644 index 00000000..1d0ecf91 --- /dev/null +++ b/src/ui/gui/icons/scalable/ordinal.svg @@ -0,0 +1,78 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/src/ui/gui/icons/scalable/scale.svg b/src/ui/gui/icons/scalable/scale.svg new file mode 100644 index 00000000..fc854722 --- /dev/null +++ b/src/ui/gui/icons/scalable/scale.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/src/ui/gui/icons/scalable/string.svg b/src/ui/gui/icons/scalable/string.svg new file mode 100644 index 00000000..dad564d0 --- /dev/null +++ b/src/ui/gui/icons/scalable/string.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + a + + + diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index f6bf1de3..dc912a2f 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -280,6 +280,31 @@ create_icon_factory (void) g_object_unref (pixbuf); gtk_icon_factory_add ( factory, "pspp-recent-dialogs", icon_set); + pixbuf = PIXBUF_NEW_FROM_FILE ("nominal.png"); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); + gtk_icon_factory_add ( factory, "var-nominal", icon_set); + + pixbuf = PIXBUF_NEW_FROM_FILE ("ordinal.png"); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); + gtk_icon_factory_add ( factory, "var-ordinal", icon_set); + + pixbuf = PIXBUF_NEW_FROM_FILE ("scale.png"); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); + gtk_icon_factory_add ( factory, "var-scale", icon_set); + + pixbuf = PIXBUF_NEW_FROM_FILE ("string.png"); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); + gtk_icon_factory_add ( factory, "var-string", icon_set); + + pixbuf = PIXBUF_NEW_FROM_FILE ("date-scale.png"); + icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); + g_object_unref (pixbuf); + gtk_icon_factory_add ( factory, "var-date-scale", icon_set); + gtk_icon_factory_add_default (factory); diff --git a/src/ui/gui/psppire.glade b/src/ui/gui/psppire.glade index eb5ab423..b35f6c1a 100644 --- a/src/ui/gui/psppire.glade +++ b/src/ui/gui/psppire.glade @@ -250,36 +250,25 @@ 5 5 - + True - - - True - 0 - Name Variable: - - - False - False - - - - - True - - - False - False - 1 - - + 5 + + + + + + + + + True + 5 - 1 - 2 1 2 - + + GTK_FILL @@ -332,24 +321,35 @@ - + True - 5 + + + True + 0 + Name Variable: + + + False + False + + + + + True + + + False + False + 1 + + + 1 + 2 1 2 - - GTK_FILL - - - - - True - 5 - - - @@ -1150,6 +1150,8 @@ + False + False 1