static FILE *
safety_violation (const char *fn)
{
- msg (SE, _("Not opening pipe file `%s' because SAFER option set."), fn);
+ msg (SE, _("Not opening pipe file `%s' because %s option set."), fn, "SAFER");
errno = EPERM;
return NULL;
}
"been defined."), command->name);
break;
case S_INPUT_PROGRAM:
- msg (SE, _("%s is allowed only inside INPUT PROGRAM."),
- command->name);
+ msg (SE, _("%s is allowed only inside %s."),
+ command->name, "INPUT PROGRAM");
break;
case S_FILE_TYPE:
- msg (SE, _("%s is allowed only inside FILE TYPE."), command->name);
+ msg (SE, _("%s is allowed only inside %s."), command->name, "FILE TYPE");
break;
/* Two allowed states. */
command->name, "FILE TYPE");
break;
case S_INPUT_PROGRAM | S_FILE_TYPE:
- msg (SE, _("%s is allowed only inside INPUT PROGRAM or inside FILE TYPE."), command->name);
+ msg (SE, _("%s is allowed only inside %s or inside %s."), command->name,
+ "INPUT PROGRAM", "FILE TYPE");
break;
/* Three allowed states. */
if (settings_get_safer_mode ())
{
- msg (SE, _("This command not allowed when the SAFER option is set."));
+ msg (SE, _("This command not allowed when the %s option is set."), "SAFER");
return CMD_FAILURE;
}
{
if (has_else (do_if))
{
- msg (SE, _("This command may not follow ELSE in DO IF...END IF."));
+ msg (SE, _("This command may not follow %s in %s ... %s."), "ELSE", "DO IF", "END IF");
return false;
}
else
int
cmd_end_repeat (struct lexer *lexer UNUSED, struct dataset *ds UNUSED)
{
- msg (SE, _("No matching DO REPEAT."));
+ msg (SE, _("No matching %s."), "DO REPEAT");
return CMD_CASCADING_FAILURE;
}
{
if (!in_input_program ())
{
- msg (SE, _("The END subcommand may only be used within "
- "INPUT PROGRAM."));
+ msg (SE, _("The %s subcommand may only be used within %s."), "END", "INPUT PROGRAM");
goto error;
}
if (end)
{
- msg (SE, _("The END subcommand may only be specified once."));
+ msg (SE, _("The %s subcommand may only be specified once."), "END");
goto error;
}
if (type != DP_FIXED && end != NULL)
{
- msg (SE, _("The END subcommand may be used only with DATA LIST FIXED."));
+ msg (SE, _("The %s subcommand may be used only with %s."), "END", "DATA LIST FIXED");
goto error;
}
{
if (!lex_match_id (r->lexer, "END") || !lex_match_id (r->lexer, "DATA"))
{
- msg (SE, _("Missing END DATA while reading inline data. "
+ msg (SE, _("Missing %s while reading inline data. "
"This probably indicates a missing or incorrectly "
- "formatted END DATA command. END DATA must appear "
+ "formatted %s command. %s must appear "
"by itself on a single line with exactly one space "
- "between words."));
+ "between words."), "END DATA", "END DATA", "END DATA");
lex_discard_rest_of_command (r->lexer);
}
return false;
msg (ME, _("Attempt to read beyond end-of-file on file %s."),
fh_get_name (r->fh));
else
- msg (ME, _("Attempt to read beyond END DATA."));
+ msg (ME, _("Attempt to read beyond %s."), "END DATA");
}
}
goto error;
if (lex_integer (lexer) < 1)
{
- msg (SE, _("Value of FIRSTCASE must be 1 or greater."));
+ msg (SE, _("Value of %s must be 1 or greater."), "FIRSTCASE");
goto error;
}
data_parser_set_skip (parser, lex_integer (lexer) - 1);
goto error;
if (lex_integer (lexer) < 1)
{
- msg (SE, _("Value of FIXCASE must be at least 1."));
+ msg (SE, _("Value of %s must be 1 or greater."), "FIXCASE");
goto error;
}
data_parser_set_records (parser, lex_integer (lexer));
goto error;
if (lex_integer (lexer) < 1)
{
- msg (SE, _("Value of FIRST must be at least 1."));
+ msg (SE, _("Value of %s must be 1 or greater."), "FIRST");
goto error;
}
data_parser_set_case_limit (parser, lex_integer (lexer));
goto error;
if (lex_integer (lexer) < 1 || lex_integer (lexer) > 100)
{
- msg (SE, _("Value of PERCENT must be between 1 and 100."));
+ msg (SE, _("Value of %s must be between 1 and 100."), "PERCENT");
goto error;
}
data_parser_set_case_percent (parser, lex_integer (lexer));
&& lex_get_error_mode (lexer) != LEX_ERROR_TERMINAL)
{
if (result == CMD_EOF)
- msg (SE, _("Unexpected end-of-file within INPUT PROGRAM."));
+ msg (SE, _("Unexpected end-of-file within %s."), "INPUT PROGRAM");
inside_input_program = false;
destroy_input_program (inp);
return result;
if (!saw_DATA_LIST && !saw_END_FILE)
{
- msg (SE, _("Input program must contain DATA LIST or END FILE."));
+ msg (SE, _("Input program must contain %s or %s."), "DATA LIST", "END FILE");
destroy_input_program (inp);
return CMD_FAILURE;
}
{
double f = expr_evaluate_num (trns->expr, *c, case_num);
if (f == SYSMIS)
- msg (SW, _("The expression on PRINT SPACE evaluated to the "
- "system-missing value."));
+ msg (SW, _("The expression on %s evaluated to the "
+ "system-missing value."), "PRINT SPACE");
else if (f < 0 || f > INT_MAX)
- msg (SW, _("The expression on PRINT SPACE evaluated to %g."), f);
+ msg (SW, _("The expression on %s evaluated to %g."), "PRINT SPACE", f);
else
n = f;
}
}
if (binary && fh == NULL)
{
- msg (SE, _("OUTFILE is required when binary formats are specified."));
+ msg (SE, _("%s is required when binary formats are specified."), "OUTFILE");
goto error;
}
}
else if (!replace && fn_exists (fh_get_file_name (handle)))
{
- msg (SE, _("Output file `%s' exists but REPLACE was not specified."),
- fh_get_file_name (handle));
+ msg (SE, _("Output file `%s' exists but %s was not specified."),
+ fh_get_file_name (handle), "REPLACE");
goto error;
}
if ((f->flags & OPF_PERM_ONLY) &&
proc_in_temporary_transformations (e->ds))
{
- msg (SE, _("%s may not appear after TEMPORARY."), f->prototype);
+ msg (SE, _("%s may not appear after %s."), f->prototype, "TEMPORARY");
goto fail;
}
{
if (*x == LOWEST)
{
- msg (SE, _("LO or LOWEST must be part of a range."));
+ msg (SE, _("%s or %s must be part of a range."), "LO", "LOWEEST");
return false;
}
*y = *x;
if (idata->n_extractions == 0)
{
- msg (MW, _("The FACTOR criteria result in zero factors extracted. Therefore no analysis will be performed."));
+ msg (MW, _("The %s criteria result in zero factors extracted. Therefore no analysis will be performed."), "FACTOR");
goto finish;
}
if (idata->n_extractions > factor->n_vars)
{
- msg (MW, _("The FACTOR criteria result in more factors than variables, which is not meaningful. No analysis will be performed."));
+ msg (MW,
+ _("The %s criteria result in more factors than variables, which is not meaningful. No analysis will be performed."),
+ "FACTOR");
goto finish;
}
bool ok;
if (proc_make_temporary_transformations_permanent (ds))
- msg (SW, _("FLIP ignores TEMPORARY. "
- "Temporary transformations will be made permanent."));
+ msg (SW, _("%s ignores %s. "
+ "Temporary transformations will be made permanent."), "FLIP", "TEMPORARY");
flip = pool_create_container (struct flip_pgm, pool);
flip->n_vars = 0;
flip->file = pool_create_temp_file (flip->pool);
if (flip->file == NULL)
{
- msg (SE, _("Could not create temporary file for FLIP."));
+ msg (SE, _("Could not create temporary file for %s."), "FLIP");
goto error;
}
input_file = flip->file;
if (fseeko (input_file, 0, SEEK_SET) != 0)
{
- msg (SE, _("Error rewinding FLIP file: %s."), strerror (errno));
+ msg (SE, _("Error rewinding %s file: %s."), "FLIP", strerror (errno));
return false;
}
output_file = pool_create_temp_file (flip->pool);
if (output_file == NULL)
{
- msg (SE, _("Error creating FLIP source file."));
+ msg (SE, _("Error creating %s source file."), "FLIP");
return false;
}
if (read_cases != fread (input_buf, case_bytes, read_cases, input_file))
{
if (ferror (input_file))
- msg (SE, _("Error reading FLIP file: %s."), strerror (errno));
+ msg (SE, _("Error reading %s file: %s."), "FLIP", strerror (errno));
else
- msg (SE, _("Unexpected end of file reading FLIP file."));
+ msg (SE, _("Unexpected end of file reading %s file."), "FLIP");
return false;
}
+ (off_t) i * flip->n_cases),
SEEK_SET) != 0)
{
- msg (SE, _("Error seeking FLIP source file: %s."),
+ msg (SE, _("Error seeking %s source file: %s."), "FLIP",
strerror (errno));
return false;
}
if (fwrite (output_buf, sizeof *output_buf, read_cases, output_file)
!= read_cases)
{
- msg (SE, _("Error writing FLIP source file: %s."),
+ msg (SE, _("Error writing %s source file: %s."), "FLIP",
strerror (errno));
return false;
}
if (fseeko (output_file, 0, SEEK_SET) != 0)
{
- msg (SE, _("Error rewinding FLIP source file: %s."), strerror (errno));
+ msg (SE, _("Error rewinding %s source file: %s."), "FLIP", strerror (errno));
return false;
}
flip->file = output_file;
{
case_unref (c);
if (ferror (flip->file))
- msg (SE, _("Error reading FLIP temporary file: %s."),
+ msg (SE, _("Error reading %s temporary file: %s."), "FLIP",
strerror (errno));
else if (feof (flip->file))
- msg (SE, _("Unexpected end of file reading FLIP temporary file."));
+ msg (SE, _("Unexpected end of file reading %s temporary file."), "FLIP");
else
NOT_REACHED ();
flip->error = true;
const struct npar_test *test = specs->test[t];
if ( NULL == test->execute )
{
- msg (SW, _("NPAR subcommand not currently implemented."));
+ msg (SW, _("%s subcommand not currently implemented."), "NPAR");
continue;
}
test->execute (ds, casereader_clone (input), specs->filter, test, specs->exact, specs->timer);
}
else
{
- lex_error (lexer, _("Expecting MEAN, MEDIAN, MODE or number"));
+ lex_error (lexer, _("Expecting %s, %s, %s or a number."), "MEAN", "MEDIAN", "MODE");
return 0;
}
const char *name = lex_tokcstr (lexer);
if ( var_count >= subcase_get_n_fields (&cmd->sc) )
- msg (SE, _("Too many variables in INTO clause."));
+ msg (SE, _("Too many variables in %s clause."), "INTO");
else if ( dict_lookup_var (cmd->dict, name) != NULL )
msg (SE, _("Variable %s already exists."), name);
else if (string_set_contains (new_names, name))
{
int v;
- tab_output_text (0, _("Variables Created By RANK"));
+ tab_output_text_format (0, _("Variables Created By %s"), "RANK");
tab_output_text (0, "");
for (i = 0 ; i < rank.n_rs ; ++i )
if ( cut == true && var_is_alpha (gvar))
{
- msg (SE, _("When applying GROUPS to a string variable, two "
- "values must be specified."));
+ msg (SE, _("When applying %s to a string variable, two "
+ "values must be specified."), "GROUPS");
goto parse_failed;
}
}
if (tt.n_vars > 0)
{
- msg (SE, _("VARIABLES subcommand may not be used with PAIRS."));
+ msg (SE, _("%s subcommand may not be used with %s."), "VARIABLES", "PAIRS");
goto parse_failed;
}
{
if ( tt.mode == MODE_PAIRED)
{
- msg (SE, _("VARIABLES subcommand may not be used with PAIRS."));
+ msg (SE, _("%s subcommand may not be used with %s."), "VARIABLES", "PAIRS");
goto parse_failed;
}
if (lex_match (lexer, T_ALL))
return CMD_SUCCESS;
- msg (SW, _("Only USE ALL is currently implemented."));
+ msg (SW, _("Only %s is currently implemented."), "USE ALL");
return CMD_FAILURE;
}
{
if (settings_get_safer_mode ())
{
- msg (SE, _("This command not allowed when the SAFER option is set."));
+ msg (SE, _("This command not allowed when the %s option is set."), "SAFER");
return CMD_FAILURE;
}
if (settings_get_safer_mode ())
{
- msg (SE, _("This command not allowed when the SAFER option is set."));
+ msg (SE, _("This command not allowed when the %s option is set."), "SAFER");
return 0;
}
if (lex_token (lexer) == T_ID
&& lex_id_match (ss_cstr ("THRU"), lex_tokss (lexer)))
{
- msg (SE, _("THRU is not allowed with string variables."));
+ msg (SE, _("%s is not allowed with string variables."), "THRU");
return false;
}
}