Make the tone of the error messages a bit less formal, by using

contractions.  (Safari does, at least when you're trying to open a file
to which you don't have read access.)

svn path=/trunk/; revision=12852
This commit is contained in:
Guy Harris 2004-12-29 01:08:20 +00:00
parent 85a6bea56e
commit f1deabed56
21 changed files with 61 additions and 61 deletions

View File

@ -113,7 +113,7 @@ bad_dfilter_alert_box(const char *dftext)
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"%s%s%s\n"
"\n"
"The filter expression \"%s\" is not a valid display filter.\n"
"The filter expression \"%s\" isn't a valid display filter.\n"
"See the help for a description of the display filter syntax.",
simple_dialog_primary_start(), dfilter_error_msg,
simple_dialog_primary_end(), dftext);

View File

@ -735,7 +735,7 @@ static int capture_loop_init_filter(loop_data *ld, char *errmsg, int errmsg_len)
g_snprintf(errmsg, errmsg_len,
"%sInvalid capture filter: \"%s\"!%s\n"
"\n"
"That string looks like a valid display filter; however, it is not a valid\n"
"That string looks like a valid display filter; however, it isn't a valid\n"
"capture filter (%s).\n"
"\n"
"Note that display filters and capture filters don't have the same syntax,\n"
@ -749,7 +749,7 @@ static int capture_loop_init_filter(loop_data *ld, char *errmsg, int errmsg_len)
g_snprintf(errmsg, errmsg_len,
"%sInvalid capture filter: \"%s\"!%s\n"
"\n"
"That string is not a valid capture filter (%s).\n"
"That string isn't a valid capture filter (%s).\n"
"See the help for a description of the capture filter syntax.",
simple_dialog_primary_start(), cfile.cfilter, simple_dialog_primary_end(),
pcap_geterr(ld->pcap_h));

View File

@ -230,12 +230,12 @@ set_time_adjustment(char *optarg)
} else {
val = strtol(optarg, &frac, 10);
if (frac == NULL || frac == optarg || val == LONG_MIN || val == LONG_MAX) {
fprintf(stderr, "editcap: \"%s\" is not a valid ime adjustment\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg);
exit(1);
}
if (val < 0) { /* implies '--' since we caught '-' above */
fprintf(stderr, "editcap: \"%s\" is not a valid time adjustment\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg);
exit(1);
}
@ -247,7 +247,7 @@ set_time_adjustment(char *optarg)
val = strtol(&(frac[1]), &end, 10);
if (*frac != '.' || end == NULL || end == frac
|| val < 0 || val > ONE_MILLION || val == LONG_MIN || val == LONG_MAX) {
fprintf(stderr, "editcap: \"%s\" is not a valid time adjustment\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n",
optarg);
exit(1);
}
@ -324,7 +324,7 @@ int main(int argc, char *argv[])
case 'T':
out_frame_type = wtap_short_string_to_encap(optarg);
if (out_frame_type < 0) {
fprintf(stderr, "editcap: \"%s\" is not a valid encapsulation type\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid encapsulation type\n",
optarg);
exit(1);
}
@ -333,7 +333,7 @@ int main(int argc, char *argv[])
case 'F':
out_file_type = wtap_short_string_to_file_type(optarg);
if (out_file_type < 0) {
fprintf(stderr, "editcap: \"%s\" is not a valid capture file type\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid capture file type\n",
optarg);
exit(1);
}
@ -350,7 +350,7 @@ int main(int argc, char *argv[])
case 's':
snaplen = strtol(optarg, &p, 10);
if (p == optarg || *p != '\0') {
fprintf(stderr, "editcap: \"%s\" is not a valid snapshot length\n",
fprintf(stderr, "editcap: \"%s\" isn't a valid snapshot length\n",
optarg);
exit(1);
}

View File

@ -657,16 +657,16 @@ file_open_error_message(int err, gboolean for_writing)
case ENOENT:
if (for_writing)
errmsg = "The path to the file \"%s\" does not exist.";
errmsg = "The path to the file \"%s\" doesn't exist.";
else
errmsg = "The file \"%s\" does not exist.";
errmsg = "The file \"%s\" doesn't exist.";
break;
case EACCES:
if (for_writing)
errmsg = "You do not have permission to create or write to the file \"%s\".";
errmsg = "You don't have permission to create or write to the file \"%s\".";
else
errmsg = "You do not have permission to read the file \"%s\".";
errmsg = "You don't have permission to read the file \"%s\".";
break;
case EISDIR:

22
file.c
View File

@ -1182,7 +1182,7 @@ filter_packets(capture_file *cf, gchar *dftext, gboolean force)
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"%s%s%s\n"
"\n"
"The following display filter is not a valid display filter:\n%s\n"
"The following display filter isn't a valid display filter:\n%s\n"
"See the help for a description of the display filter syntax.",
simple_dialog_primary_start(), safe_dfilter_error_msg,
simple_dialog_primary_end(), safe_dftext);
@ -2784,7 +2784,7 @@ goto_frame(capture_file *cf, guint fnumber)
/* that packet currently isn't displayed */
/* XXX - add it to the set of displayed packets? */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"That packet is not currently being displayed.");
"That packet isn't currently being displayed.");
return FALSE; /* we failed to go to that packet */
}
@ -3249,21 +3249,21 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info,
case WTAP_ERR_RANDOM_OPEN_PIPE:
/* Seen only when opening a capture file for reading. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is a pipe or FIFO; Ethereal cannot read pipe or FIFO files.",
"The file \"%s\" is a pipe or FIFO; Ethereal can't read pipe or FIFO files.",
filename);
break;
case WTAP_ERR_FILE_UNKNOWN_FORMAT:
/* Seen only when opening a capture file for reading. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is not a capture file in a format Ethereal understands.",
"The file \"%s\" isn't a capture file in a format Ethereal understands.",
filename);
break;
case WTAP_ERR_UNSUPPORTED:
/* Seen only when opening a capture file for reading. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is not a capture file in a format Ethereal understands.\n"
"The file \"%s\" isn't a capture file in a format Ethereal understands.\n"
"(%s)",
filename, err_info);
g_free(err_info);
@ -3272,7 +3272,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info,
case WTAP_ERR_CANT_WRITE_TO_PIPE:
/* Seen only when opening a capture file for writing. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is a pipe, and %s capture files cannot be "
"The file \"%s\" is a pipe, and %s capture files can't be "
"written to a pipe.",
filename, wtap_file_type_string(file_type));
break;
@ -3280,13 +3280,13 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info,
case WTAP_ERR_UNSUPPORTED_FILE_TYPE:
/* Seen only when opening a capture file for writing. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Ethereal does not support writing capture files in that format.");
"Ethereal doesn't support writing capture files in that format.");
break;
case WTAP_ERR_UNSUPPORTED_ENCAP:
if (for_writing) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Ethereal cannot save this capture in that format.");
"Ethereal can't save this capture in that format.");
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is a capture for a network type that Ethereal doesn't support.\n"
@ -3299,7 +3299,7 @@ cf_open_failure_alert_box(const char *filename, int err, gchar *err_info,
case WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED:
if (for_writing) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Ethereal cannot save this capture in that format.");
"Ethereal can't save this capture in that format.");
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The file \"%s\" is a capture for a network type that Ethereal doesn't support.",
@ -3364,11 +3364,11 @@ file_rename_error_message(int err)
switch (err) {
case ENOENT:
errmsg = "The path to the file \"%s\" does not exist.";
errmsg = "The path to the file \"%s\" doesn't exist.";
break;
case EACCES:
errmsg = "You do not have permission to move the capture file to \"%s\".";
errmsg = "You don't have permission to move the capture file to \"%s\".";
break;
default:

View File

@ -1417,7 +1417,7 @@ edit_color_filter_ok_cb (GtkButton *button,
if(!dfilter_compile(filter_text, &compiled_filter)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Filter \"%s\" did not compile correctly.\n"
"Filter \"%s\" didn't compile correctly.\n"
" Please try again. Filter unchanged.\n%s\n", filter_name,
dfilter_error_msg);
} else {

View File

@ -862,11 +862,11 @@ dfilter_expr_dlg_accept_cb(GtkWidget *w, gpointer filter_te_arg)
if (!can_compare) {
if (range_str == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"That field cannot be tested with \"%s\".",
"That field can't be tested with \"%s\".",
item_str);
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Ranges of that field cannot be tested with \"%s\".",
"Ranges of that field can't be tested with \"%s\".",
item_str);
}
if (range_str != NULL)

View File

@ -981,7 +981,7 @@ file_merge_cmd_cb(GtkWidget *widget, gpointer data _U_) {
/* user didn't saved his current file, ask him */
dialog = simple_dialog(ESD_TYPE_CONFIRMATION, ESD_BTNS_OK_CANCEL,
PRIMARY_TEXT_START "Save the capture file before merging to another one?" PRIMARY_TEXT_END "\n\n"
"A temporary capture file cannot be merged.");
"A temporary capture file can't be merged.");
simple_dialog_set_cb(dialog, file_merge_answered_cb, widget);
} else {
/* unchanged file, just start to merge */

View File

@ -300,7 +300,7 @@ user_font_test(gchar *font_name)
Tell the user, but don't tear down the font selection
dialog, so that they can try again. */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The font you selected cannot be loaded.");
"The font you selected can't be loaded.");
#if GTK_MAJOR_VERSION < 2
g_free(bold_font_name);

View File

@ -1523,7 +1523,7 @@ filter_callback(GtkWidget *widget _U_, io_stat_graph_t *gio)
if(gio->io->count_type==COUNT_TYPE_ADVANCED){
/* warn and bail out if there was no field specified */
if(field==NULL || field[0]==0){
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You did not specify a field name.");
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You didn't specify a field name.");
disable_graph(gio);
io_stat_redraw(gio->io);
return 0;
@ -1531,7 +1531,7 @@ filter_callback(GtkWidget *widget _U_, io_stat_graph_t *gio)
/* warn and bail out if the field could not be found */
hfi=proto_registrar_get_byname(field);
if(hfi==NULL){
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "'%s' is not a valid field name.", field);
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "'%s' isn't a valid field name.", field);
disable_graph(gio);
io_stat_redraw(gio->io);
return 0;

View File

@ -1014,7 +1014,7 @@ get_natural_int(const char *string, const char *name)
number = strtol(string, &p, 10);
if (p == string || *p != '\0') {
fprintf(stderr, "ethereal: The specified %s \"%s\" is not a decimal number\n",
fprintf(stderr, "ethereal: The specified %s \"%s\" isn't a decimal number\n",
name, string);
exit(1);
}
@ -2088,7 +2088,7 @@ main(int argc, char *argv[])
#ifdef HAVE_PCAP_DATALINK_NAME_TO_VAL
capture_opts.linktype = pcap_datalink_name_to_val(optarg);
if (capture_opts.linktype == -1) {
fprintf(stderr, "ethereal: The specified data link type \"%s\" is not valid\n",
fprintf(stderr, "ethereal: The specified data link type \"%s\" isn't valid\n",
optarg);
exit(1);
}
@ -2192,7 +2192,7 @@ main(int argc, char *argv[])
#ifdef HAVE_LIBPCAP
if (start_capture && list_link_layer_types) {
/* Specifying *both* is bogus. */
fprintf(stderr, "ethereal: You cannot specify both -L and a live capture.\n");
fprintf(stderr, "ethereal: You can't specify both -L and a live capture.\n");
exit(1);
}
@ -2201,12 +2201,12 @@ main(int argc, char *argv[])
did the user also specify a capture file to be read? */
if (cf_name) {
/* Yes - that's bogus. */
fprintf(stderr, "ethereal: You cannot specify -L and a capture file to be read.\n");
fprintf(stderr, "ethereal: You can't specify -L and a capture file to be read.\n");
exit(1);
}
/* No - did they specify a ring buffer option? */
if (capture_opts.multi_files_on) {
fprintf(stderr, "ethereal: Ring buffer requested, but a capture is not being done.\n");
fprintf(stderr, "ethereal: Ring buffer requested, but a capture isn't being done.\n");
exit(1);
}
} else {
@ -2214,7 +2214,7 @@ main(int argc, char *argv[])
a capture file to be read? */
if (start_capture && cf_name) {
/* Yes - that's bogus. */
fprintf(stderr, "ethereal: You cannot specify both a live capture and a capture file to be read.\n");
fprintf(stderr, "ethereal: You can't specify both a live capture and a capture file to be read.\n");
exit(1);
}

View File

@ -1099,13 +1099,13 @@ prefs_main_fetch_all(GtkWidget *dlg, gboolean *must_redissect)
case PREF_UINT:
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The value for \"%s\" is not a valid number.",
"The value for \"%s\" isn't a valid number.",
badpref->title);
return FALSE;
case PREF_RANGE:
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"The value for \"%s\" is not a valid range.",
"The value for \"%s\" isn't a valid range.",
badpref->title);
return FALSE;

View File

@ -3656,7 +3656,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
/* check if it is RTP Version 2 */
if (!get_int_value_from_proto_tree(edt->tree, "rtp", "rtp.version", &version_fwd) || version_fwd != 2) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"RTP Version != 2 is not supported!");
"RTP Version != 2 isn't supported!");
return;
}

View File

@ -554,7 +554,7 @@ void tcp_graph_cb (GtkWidget *w _U_, gpointer data, guint callback_action /*grap
* nor TCP over IP alone - should display some
* kind of warning dialog */
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Selected packet is not a TCP segment");
"Selected packet isn't a TCP segment");
return;
}

View File

@ -194,7 +194,7 @@ browser_open_url (const gchar *url)
XXX - has to be improved */
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
PRIMARY_TEXT_START "Web browser access not implemented." PRIMARY_TEXT_END
"\n\nThis Ethereal version (using the GLib 1.x toolkit) cannot access web browsers. "
"\n\nThis Ethereal version (using the GLib 1.x toolkit) can't access web browsers. "
"\n\nYou may try to open the following URL in your web browser: \n\n"
"%s",
url);

View File

@ -55,7 +55,7 @@ get_natural_int(const char *string, const char *name)
number = strtol(string, &p, 10);
if (p == string || *p != '\0') {
fprintf(stderr, "mergecap: The specified %s \"%s\" is not a decimal number\n",
fprintf(stderr, "mergecap: The specified %s \"%s\" isn't a decimal number\n",
name, string);
exit(1);
}
@ -162,7 +162,7 @@ main(int argc, char *argv[])
case 'T':
frame_type = wtap_short_string_to_encap(optarg);
if (frame_type < 0) {
fprintf(stderr, "mergecap: \"%s\" is not a valid encapsulation type\n",
fprintf(stderr, "mergecap: \"%s\" isn't a valid encapsulation type\n",
optarg);
exit(1);
}
@ -171,7 +171,7 @@ main(int argc, char *argv[])
case 'F':
file_type = wtap_short_string_to_file_type(optarg);
if (file_type < 0) {
fprintf(stderr, "mergecap: \"%s\" is not a valid capture file type\n",
fprintf(stderr, "mergecap: \"%s\" isn't a valid capture file type\n",
optarg);
exit(1);
}

View File

@ -426,7 +426,7 @@ set_pcap_linktype(pcap_t *pch, char *devname
/* Let them set it to the type it is; reject any other request. */
if (get_pcap_linktype(pch, devname) == dlt)
return NULL; /* no error */
return "That DLT is not one of the DLTs supported by this device";
return "That DLT isn't one of the DLTs supported by this device";
#endif
}

View File

@ -109,7 +109,7 @@ protocolinfo_init(char *optarg)
hfi=proto_registrar_get_byname(field);
if(!hfi){
fprintf(stderr, "tethereal: Field \"%s\" does not exist.\n", field);
fprintf(stderr, "tethereal: Field \"%s\" doesn't exist.\n", field);
exit(1);
}

View File

@ -318,7 +318,7 @@ rpcstat_init(char *optarg)
g_hash_table_foreach(rpc_procs, (GHFunc)rpcstat_find_procs, NULL);
if(rpc_min_proc==-1){
fprintf(stderr,"tethereal: Invalid -z rpc,rrt,%d,%d\n",rpc_program,rpc_version);
fprintf(stderr," Program:%d version:%d is not supported by tethereal.\n", rpc_program, rpc_version);
fprintf(stderr," Program:%d version:%d isn't supported by tethereal.\n", rpc_program, rpc_version);
exit(1);
}

View File

@ -308,7 +308,7 @@ get_natural_int(const char *string, const char *name)
number = strtol(string, &p, 10);
if (p == string || *p != '\0') {
fprintf(stderr, "tethereal: The specified %s \"%s\" is not a decimal number\n",
fprintf(stderr, "tethereal: The specified %s \"%s\" isn't a decimal number\n",
name, string);
exit(1);
}
@ -1043,7 +1043,7 @@ main(int argc, char *argv[])
case 'F':
out_file_type = wtap_short_string_to_file_type(optarg);
if (out_file_type < 0) {
fprintf(stderr, "tethereal: \"%s\" is not a valid capture file type\n",
fprintf(stderr, "tethereal: \"%s\" isn't a valid capture file type\n",
optarg);
exit(1);
}
@ -1250,7 +1250,7 @@ main(int argc, char *argv[])
#ifdef HAVE_PCAP_DATALINK_NAME_TO_VAL
capture_opts.linktype = pcap_datalink_name_to_val(optarg);
if (capture_opts.linktype == -1) {
fprintf(stderr, "tethereal: The specified data link type \"%s\" is not valid\n",
fprintf(stderr, "tethereal: The specified data link type \"%s\" isn't valid\n",
optarg);
exit(1);
}
@ -1394,12 +1394,12 @@ main(int argc, char *argv[])
did the user also specify a capture file to be read? */
if (cf_name) {
/* Yes - that's bogus. */
fprintf(stderr, "tethereal: You cannot specify -L and a capture file to be read.\n");
fprintf(stderr, "tethereal: You can't specify -L and a capture file to be read.\n");
exit(1);
}
/* No - did they specify a ring buffer option? */
if (capture_opts.ringbuffer_on) {
fprintf(stderr, "tethereal: Ring buffer requested, but a capture is not being done.\n");
fprintf(stderr, "tethereal: Ring buffer requested, but a capture isn't being done.\n");
exit(1);
}
} else {
@ -2337,7 +2337,7 @@ load_cap_file(capture_file *cf, int out_file_type)
case WTAP_ERR_UNSUPPORTED_ENCAP:
case WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED:
fprintf(stderr,
"tethereal: The capture file being read cannot be written in "
"tethereal: The capture file being read can't be written in "
"that format.\n");
break;
@ -3093,13 +3093,13 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
case WTAP_ERR_FILE_UNKNOWN_FORMAT:
/* Seen only when opening a capture file for reading. */
errmsg = "The file \"%s\" is not a capture file in a format Tethereal understands.";
errmsg = "The file \"%s\" isn't a capture file in a format Tethereal understands.";
break;
case WTAP_ERR_UNSUPPORTED:
/* Seen only when opening a capture file for reading. */
snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is not a capture file in a format Tethereal understands.\n"
"The file \"%%s\" isn't a capture file in a format Tethereal understands.\n"
"(%s)", err_info);
g_free(err_info);
errmsg = errmsg_errno;
@ -3108,19 +3108,19 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
case WTAP_ERR_CANT_WRITE_TO_PIPE:
/* Seen only when opening a capture file for writing. */
snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a pipe, and %s capture files cannot be "
"The file \"%%s\" is a pipe, and %s capture files can't be "
"written to a pipe.", wtap_file_type_string(file_type));
errmsg = errmsg_errno;
break;
case WTAP_ERR_UNSUPPORTED_FILE_TYPE:
/* Seen only when opening a capture file for writing. */
errmsg = "Tethereal does not support writing capture files in that format.";
errmsg = "Tethereal doesn't support writing capture files in that format.";
break;
case WTAP_ERR_UNSUPPORTED_ENCAP:
if (for_writing)
errmsg = "Tethereal cannot save this capture in that format.";
errmsg = "Tethereal can't save this capture in that format.";
else {
snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a capture for a network type that Tethereal doesn't support.\n"
@ -3132,7 +3132,7 @@ cf_open_error_message(int err, gchar *err_info, gboolean for_writing,
case WTAP_ERR_ENCAP_PER_PACKET_UNSUPPORTED:
if (for_writing)
errmsg = "Tethereal cannot save this capture in that format.";
errmsg = "Tethereal can't save this capture in that format.";
else
errmsg = "The file \"%s\" is a capture for a network type that Tethereal doesn't support.";
break;

View File

@ -188,7 +188,7 @@ get_compiled_version_info(GString *str)
#ifndef HAVE_LIBPCRE
break_point = str->len - 1;
g_string_append(str,
"\nNOTE: this build does not support the \"matches\" operator for Ethereal filter"
"\nNOTE: this build doesn't support the \"matches\" operator for Ethereal filter"
"\nsyntax.");
do_word_wrap(str, break_point);
#endif /* HAVE_LIBPCRE */