Improve or fix some diagnostic messages.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 15 May 2023 02:16:26 +0000 (19:16 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 15 May 2023 02:18:13 +0000 (19:18 -0700)
Thanks to Jaap Verhage for reporting these bugs at
https://lists.gnu.org/archive/html/pspp-dev/2023-05/msg00004.html

src/data/identifier2.c
src/language/commands/aggregate.c
src/language/commands/recode.c
tests/language/commands/aggregate.at
tests/language/commands/recode.at

index 53f98ac6d4adedcff212c7173674d37f3674ad45..8b34bb214a9eae203344647627404a7fe1454e14 100644 (file)
@@ -70,7 +70,7 @@ id_is_valid__ (const char *id, const char *dict_encoding,
       dict_len = ss_length (out);
       ss_dealloc (&out);
       if (!ok)
-        return xasprintf (_("Identifier `%s' is not valid in encoding `%s'."
+        return xasprintf (_("Identifier `%s' is not valid in encoding `%s' "
                             "used for this dictionary."), id, dict_encoding);
     }
   else
index 8afa5f92e60deb031b4cee4603d9cf261da0b491..8396f12c3bd7d75e1976fab93b0a21718e3277fe 100644 (file)
@@ -249,7 +249,7 @@ cmd_aggregate (struct lexer *lexer, struct dataset *ds)
                          "input data."));
           if (presorted_ofs)
             lex_ofs_msg (lexer, SN, presorted_ofs, presorted_ofs,
-                         _("The PRESORTED subcommand state that the "
+                         _("The PRESORTED subcommand states that the "
                            "input data is presorted."));
           else if (addvariables_ofs)
             lex_ofs_msg (lexer, SN, addvariables_ofs, addvariables_ofs,
index 286b2ae6413541c2b6c3fe7b423cd5cfb95782e6..9c43645676e6903c1c2ec12b7b89a4341ebaebb4 100644 (file)
@@ -589,7 +589,7 @@ enlarge_dst_widths (struct lexer *lexer, struct recode_trns *trns,
               msg (SE, _("At least one target variable is too narrow for "
                          "the output values."));
               lex_ofs_msg (lexer, SN, out->ofs, out->ofs,
-                           _("This recoding output value has width %d."),
+                           _("This output value has width %d."),
                            out->width);
               lex_ofs_msg (lexer, SN, dst_start, dst_end,
                            _("Target variable %s only has width %d."),
index ac3ad929aa0a1fc2d212154da1fbeeb4a3e2a7ab..b8f7c8166adcdcfacc8780286a89dd0d3cabc0c0 100644 (file)
@@ -323,7 +323,7 @@ AT_CHECK([pspp --testing-mode -O format=csv insert.sps], [1], [dnl
     2 | AGGREGATE/PRESORTED/BREAK=x(A).
       |                           ^~~~"
 
-"aggregate.sps:2.11-2.19: note: AGGREGATE: The PRESORTED subcommand state that the input data is presorted.
+"aggregate.sps:2.11-2.19: note: AGGREGATE: The PRESORTED subcommand states that the input data is presorted.
     2 | AGGREGATE/PRESORTED/BREAK=x(A).
       |           ^~~~~~~~~"
 
index f12185a410492f826dfd8b67fdfbd15a6b909253..c9cd819c0460820ce50bf312236baa50156119e4 100644 (file)
@@ -332,7 +332,7 @@ list.
 AT_CHECK([pspp -O format=csv recode.sps], [1], [dnl
 recode.sps:9: error: RECODE: At least one target variable is too narrow for the output values.
 
-"recode.sps:9.19-9.25: note: RECODE: This recoding output value has width 5.
+"recode.sps:9.19-9.25: note: RECODE: This output value has width 5.
     9 | recode x y (""a"" = ""first"") .
       |                   ^~~~~~~"
 
@@ -498,7 +498,7 @@ recode.sps:15: error: RECODE: All string variables specified on INTO must alread
 
 recode.sps:20: error: RECODE: At least one target variable is too narrow for the output values.
 
-"recode.sps:20.19-20.26: note: RECODE: This recoding output value has width 6.
+"recode.sps:20.19-20.26: note: RECODE: This output value has width 6.
    20 | RECODE n1 TO n4(1='123456') INTO s1 TO s4.
       |                   ^~~~~~~~"