[tin-dev] [PATCH] moved a couple of strings to lang.c

Dennis Preiser dennis at d--p.de
Sun Nov 12 17:53:39 CET 2023


As suggested in the comments, I have moved some strings to lang.c.

Interestingly, extern.h is sorted alphabetically and lang.c partially
thematically (e.g. #ifdef NNTP blocks).

Dennis
-------------- next part --------------
--- a/include/extern.h
+++ b/include/extern.h
@@ -505,6 +505,7 @@ extern constext txt_mime_lines[];
 extern constext txt_mime_name[];
 extern constext txt_mime_sep[];
 extern constext txt_mime_size[];
+extern constext txt_mime_preamble_multipsrt_mixed[];
 extern constext txt_mime_unsup_charset[];
 extern constext txt_attachment_menu[];
 extern constext txt_attachment_menu_com[];
@@ -566,7 +567,11 @@ extern constext txt_cannot_post_group[];
 #ifdef NNTP_ABLE
 	extern constext txt_cannot_retrieve[];
 #endif /* NNTP_ABLE */
+extern constext txt_cannot_supersede_mailgroups[];
 extern constext txt_cannot_write_to_directory[];
+#ifdef NNTP_ABLE
+	extern constext txt_capabilities_without_reader[];
+#endif /* NNTP_ABLE */
 extern constext txt_catchup[];
 extern constext txt_catchup_group[];
 extern constext txt_catchup_all_read_groups[];
@@ -589,6 +594,7 @@ extern constext txt_cook_article_failed_exiting[];
 extern constext txt_confirm_select_on_exit[];
 #ifdef NNTP_ABLE
 	extern constext txt_connecting_port[];
+	extern constext txt_connection_error[];
 #endif /* NNTP_ABLE */
 #if defined(NNTP_ABLE) && !defined(INET6)
 	extern constext txt_connection_to[];
@@ -639,6 +645,7 @@ extern constext txt_error_bad_to[];
 #endif /* NNTP_ABLE && USE_ZLIB */
 extern constext txt_error_copy_fp[];
 extern constext txt_error_corrupted_file[];
+extern constext txt_error_couldnt_expand[];
 extern constext txt_error_fseek[];
 extern constext txt_error_followup_poster[];
 extern constext txt_error_format_string[];
@@ -682,6 +689,11 @@ extern constext txt_error_header_line_space[];
 #ifndef FILE_MODE_BROKEN
 	extern constext txt_error_insecure_permissions[];
 #endif /* !FILE_MODE_BROKEN */
+#ifdef MIME_BREAK_LONG_LINES
+	extern constext txt_error_should_be_folded[];
+#else
+	extern constext txt_error_should_be_shortened[];
+#endif /* MIME_BREAK_LONG_LINES */
 #if defined(HAVE_SETLOCALE) && !defined(NO_LOCALE)
 	extern constext txt_error_locale[];
 #endif /* HAVE_SETLOCALE && !NO_LOCALE */
@@ -711,10 +723,14 @@ extern constext txt_error_server_has_no_listed_groups[];
 	extern constext txt_error_server_unavailable[];
 	extern constext txt_error_topen[];
 #endif /* NNTP_ABLE && TLI && !INET6 */
+extern constext txt_error_unlink[];
 extern constext txt_error_unknown_dlevel[];
 #if defined(NNTP_ABLE) && defined(HAVE_GETSERVBYNAME) && !defined(INET6)
 	extern constext txt_error_unknown_service[];
 #endif /* NNTP_ABLE && HAVE_GETSERVBYNAME && !INET6 */
+#ifndef NNTP_ABLE
+	extern constext txt_error_unreachable[];
+#endif /* !NNTP_ABLE */
 extern constext txt_esc[];
 extern constext txt_exiting[];
 extern constext txt_external_mail_done[];
@@ -1078,6 +1094,7 @@ extern constext txt_mini_thread_2[];
 extern constext txt_mini_url_1[];
 extern constext txt_mini_url_2[];
 extern constext txt_more[];
+extern constext txt_motd[];
 extern constext txt_moving[];
 extern constext txt_msgid_line_last[];
 extern constext txt_msgid_line_only[];
@@ -1140,6 +1157,13 @@ extern constext txt_pcre_error_num[];
 #ifndef HAVE_LIB_PCRE2
 	extern constext txt_pcre_error_text[];
 #endif /* !HAVE_LIB_PCRE2 */
+#ifdef NNTP_ABLE
+#	ifdef DEBUG
+	extern constext txt_port_not_numeric[];
+	extern constext txt_port_not_numeric_file[];
+	extern constext txt_port_not_numeric_server[];
+#	endif /* DEBUG */
+#endif /* NNTP_ABLE */
 extern constext txt_post_a_followup[];
 extern constext txt_post_error_ask_postpone[];
 extern constext txt_post_history_menu[];
@@ -1157,6 +1181,10 @@ extern constext txt_post_subject[];
 #endif /* NNTP_INEWS */
 extern constext txt_posted_info_file[];
 extern constext txt_posting[];
+#ifdef NNTP_INEWS
+	extern constext txt_posting_failed[];
+#endif /* NNTP_INEWS */
+extern constext txt_postpone_post[];
 extern constext txt_postpone_repost[];
 extern constext txt_prefix_hot[];
 extern constext txt_prefix_tagged[];
@@ -1190,6 +1218,9 @@ extern constext txt_reading_arts[];
 extern constext txt_reading_attributes_file[];
 extern constext txt_reading_config_file[];
 extern constext txt_reading_filter_file[];
+#ifdef DEBUG
+	extern constext txt_reading_from_spool[];
+#endif /* DEBUG */
 extern constext txt_reading_group[];
 extern constext txt_reading_groups[];
 extern constext txt_reading_input_history_file[];
@@ -1199,6 +1230,9 @@ extern constext txt_reading_news_newsrc_file[];
 extern constext txt_reading_newsgroups_file[];
 extern constext txt_reading_newsrc[];
 #ifdef NNTP_ABLE
+#	ifdef DEBUG
+		extern constext txt_reconnect_limit_reached[];
+#	endif /* DEBUG */
 	extern constext txt_reconnect_to_news_server[];
 #endif /* NNTP_ABLE */
 extern constext txt_refs_line_only[];
@@ -1266,6 +1300,7 @@ extern constext txt_send_bugreport[];
 #endif /* NNTP_ABLE */
 extern constext txt_serverconfig_header[];
 extern constext txt_servers_active[];
+extern constext txt_skipped_group[];
 extern constext txt_skipping_newgroups[];
 extern constext txt_space[];
 extern constext txt_starting_command[];
@@ -1291,6 +1326,7 @@ extern constext txt_thread_marked_as_selected[];
 extern constext txt_thread_singular[];
 extern constext txt_thread_x_of_n[];
 extern constext txt_threading_arts[];
+extern constext txt_threading_by_multipart[];
 extern constext txt_time_default_days[];
 extern constext txt_tinrc_defaults[];
 extern constext txt_tinrc_filter[];
@@ -1310,6 +1346,7 @@ extern constext txt_toggled_tabwidth[];
 #endif /* NO_LOCKING */
 extern constext txt_type_h_for_help[];
 extern constext txt_unlimited_time[];
+extern constext txt_unknown[];
 extern constext txt_unread[];
 extern constext txt_unsubscribe_pattern[];
 extern constext txt_unsubscribed_num_groups[];
@@ -1325,9 +1362,13 @@ extern constext txt_url_select[];
 extern constext txt_url_done[];
 extern constext txt_usage_catchup[];
 extern constext txt_usage_check_for_unread_news[];
-#ifdef USE_ZLIB
+#ifdef NNTP_ABLE
+#	ifdef USE_ZLIB
+	extern constext txt_continuing[];
+	extern constext txt_read_timeout_quit[];
 	extern constext txt_usage_compress[];
-#endif /* USE_ZLIB */
+#	endif /* USE_ZLIB */
+#endif /* NNTP_ABLE */
 #ifdef DEBUG
 	extern constext txt_usage_debug[];
 #endif /* DEBUG */
@@ -1420,6 +1461,7 @@ extern constext txt_warn_wrong_sig_format[];
 extern constext txt_warn_xref_not_supported[];
 extern constext txt_writing_attributes_file[];
 extern constext txt_writing_group[];
+extern constext txt_writing_overview[];
 extern constext txt_x_resp[];
 extern constext txt_yanked_groups[];
 extern constext txt_yanked_none[];
@@ -1729,6 +1771,7 @@ extern t_bool word_highlight;
 extern constext txt_art_deleted[];
 extern constext txt_art_undeleted[];
 extern constext txt_intro_page[];
+extern constext txt_processing_attributes[];
 extern constext txt_processing_mail_arts[];
 extern constext txt_processing_saved_arts[];
 
--- a/src/art.c
+++ b/src/art.c
@@ -1213,8 +1213,8 @@ thread_by_multipart(
 		}
 		FreeAndNull(minfo);
 		arts[i].multipart_subj = FALSE;
-		if (i % MODULO_COUNT_NUM == 0) /* TODO: -> lang.c */
-			show_progress(_("Threading by multipart"), i, top_art);
+		if (i % MODULO_COUNT_NUM == 0)
+			show_progress(_(txt_threading_by_multipart), i, top_art);
 	}
 }
 
@@ -2615,8 +2615,8 @@ write_overview(
 				FreeIfNeeded(ref);
 			}
 		}
-		if (i % (MODULO_COUNT_NUM * 20) == 0) /* TODO: -> lang.c */
-			show_progress(_("Writing overview cache..."), i, top_art);
+		if (i % (MODULO_COUNT_NUM * 20) == 0)
+			show_progress(_(txt_writing_overview), i, top_art);
 	}
 #ifdef HAVE_FCHMOD
 	fchmod(fileno(fp), (mode_t) (S_IWUSR|S_IRUGO));
--- a/src/attrib.c
+++ b/src/attrib.c
@@ -1007,7 +1007,7 @@ assign_attributes_to_groups(
 #endif /* CHARSET_CONVERSION */
 
 	if (!batch_mode || verbose)
-		wait_message(0, _("Processing attributes... ")); /* TODO: -> lang.c */
+		wait_message(0, _(txt_processing_attributes));
 
 	default_scope = &scopes[0];
 	for_each_group(i) {
--- a/src/cook.c
+++ b/src/cook.c
@@ -1116,12 +1116,14 @@ process_text_body_part(
 				 * when uue sections are split across > 1 article
 				 */
 				if (is_uubody && hide_uue == UUE_ALL) {
-					char name[] = N_("(unknown)"); /* TODO: -> lang.c */
+					/* _(txt_unknown) cannot be used directly in new_uue() due to str_trim() there */
+					char *name = my_strdup(_(txt_unknown));
 
 					in_uue = TRUE;
 					curruue = new_uue(&part, name);
 					curruue->line_count++;
 					curruue->bytes += len;
+					free(name);
 					continue;
 				}
 			}
--- a/src/inews.c
+++ b/src/inews.c
@@ -323,8 +323,7 @@ submit_inews(
 	 * response.)
 	 */
 	if (respcode != OK_POSTED) {
-		/* TODO: -> lang.c */
-		error_message(2, "Posting failed (%s)", str_trim(response));
+		error_message(2, _(txt_posting_failed), str_trim(response));
 		return ret_code;
 	}
 
--- a/src/lang.c
+++ b/src/lang.c
@@ -87,6 +87,9 @@ constext txt_mime_lines[] = N_("%s lines");
 constext txt_mime_name[] = N_("name %s");
 constext txt_mime_sep[] = N_(", ");
 constext txt_mime_size[] = N_("size %s");
+extern constext txt_mime_preamble_multipsrt_mixed[] = N_("This message has been composed in the 'multipart/mixed' MIME-format. If you\n\
+are reading this prefix, your mail reader probably has not yet been modified\n\
+to understand the new format, and some of what follows may look strange.\n\n");
 constext txt_attachment_menu[] = N_("Attachment Menu");
 constext txt_attachment_menu_com[] = N_("Attachment Menu Commands");
 constext txt_attachment_no_name[] = N_("<no name>");
@@ -138,6 +141,7 @@ constext txt_cannot_post_group[] = N_("Posting is not allowed to %s");
 #ifdef NNTP_ABLE
 	constext txt_cannot_retrieve[] = N_("Can't retrieve %s");
 #endif /* NNTP_ABLE */
+constext txt_cannot_supersede_mailgroups[] = N_("Can't supersede in mailgroups, try repost instead.");
 constext txt_cannot_write_to_directory[] = N_("%s is a directory");
 constext txt_catchup[] = N_("Catchup");
 constext txt_catchup_group[] = N_("Catchup %s...");
@@ -201,6 +205,7 @@ constext txt_error_bad_to[] = N_("\nError: Bad address in To: header.\n");
 #endif /* NNTP_ABLE && USE_ZLIB */
 constext txt_error_copy_fp[] = "copy_fp() failed";
 constext txt_error_corrupted_file[] = N_("Corrupted file %s");
+constext txt_error_couldnt_expand[] = N_("couldn't expand %s\n");
 constext txt_error_fseek[] = "fseek() error on [%s]";
 constext txt_error_followup_poster[] = N_("\nError: Followup-To \"poster\" and a newsgroup is not allowed!\n");
 constext txt_error_format_string[] = N_("Error: Custom format exceeds screen width. Using default \"%s\".");
@@ -254,6 +259,11 @@ constext txt_error_header_duplicate[] = N_("\nError: There are multiple (%d) \"%
 # ifndef FILE_MODE_BROKEN
 	constext txt_error_insecure_permissions[] = N_("Insecure permissions of %s (%o)");
 #endif /* !FILE_MODE_BROKEN */
+#ifdef MIME_BREAK_LONG_LINES
+	constext txt_error_should_be_folded[] = N_("Line %d is longer than %d octets and should be folded.\n");
+#else
+	constext txt_error_should_be_shortened[] = N_("Line %d is longer than %d octets and should be shortened.\n");
+#endif /* MIME_BREAK_LONG_LINES */
 #if defined(HAVE_SETLOCALE) && !defined(NO_LOCALE)
 	constext txt_error_locale[] = "Can't set the specified locale!";
 #endif /* HAVE_SETLOCALE && !NO_LOCALE */
@@ -279,7 +289,11 @@ constext txt_error_passwd_missing[] = N_("Can't get user information (/etc/passw
 	constext txt_error_sender_in_header_not_allowed[] = N_("\nError on line %d: \"Sender:\" header not allowed (it will be added for you)\n");
 #endif /* !FORGERY */
 constext txt_error_server_has_no_listed_groups[] = N_("Server has non of the groups listed in %s");
+constext txt_error_unlink[] = N_("Error: unlink %s");
 constext txt_error_unknown_dlevel[] = N_("Unknown display level");
+#ifndef NNTP_ABLE
+	constext txt_error_unreachable[] = N_("Unreachable?\n");
+#endif /* !NNTP_ABLE */
 constext txt_esc[] = N_("<ESC>");
 constext txt_exiting[] = N_("Exiting...");
 constext txt_external_mail_done[] = N_("leaving external mail-reader");
@@ -678,6 +692,7 @@ constext txt_mini_thread_2[] = N_("%s=help; %s=line down; %s=line up; %s=quit; %
 constext txt_mini_url_1[] = N_("<n>=set current to n; %s=line down; %s=line up; %s=help; %s=quit");
 constext txt_mini_url_2[] = N_("%s=search forwards; %s=search backwards; %s=repeat search");
 constext txt_more[] = N_("--More--");
+constext txt_motd[] = N_("MOTD: %s\n");
 constext txt_moving[] = N_("Moving %s...");
 constext txt_msgid_line_last[] = N_("Message-ID: & last Reference  ");
 constext txt_msgid_line_only[] = N_("Message-ID: line              ");
@@ -760,6 +775,10 @@ constext txt_post_processing_finished[] = N_("-- post processing completed --");
 constext txt_post_subject[] = N_("Post subject [%s]> ");
 constext txt_posted_info_file[] = N_("# Summary of mailed/posted messages viewable by 'W' command from within tin.\n");
 constext txt_posting[] = N_("Posting article...");
+#ifdef NNTP_INEWS
+	constext txt_posting_failed[] = N_("Posting failed (%s)");
+#endif /* NNTP_INEWS */
+constext txt_postpone_post[] = N_("Posting: %.*s ...");
 constext txt_postpone_repost[] = N_("Post postponed articles [%%s]? (%s/%s/%s/%s/%s): ");
 constext txt_prefix_hot[] = N_("Hot %s");
 constext txt_prefix_tagged[] = N_("Tagged %s");
@@ -767,6 +786,7 @@ constext txt_prefix_untagged[] = N_("Untagged %s");
 #ifdef NNTP_ABLE
 	constext txt_prep_for_filter_on_path[] = N_("Preparing for filtering on Path header (%d/%d)...");
 #endif /* NNTP_ABLE */
+constext txt_processing_attributes[] = N_("Processing attributes...");
 constext txt_processing_mail_arts[] = N_("Processing mail messages marked for deletion.");
 constext txt_processing_saved_arts[] = N_("Processing saved articles marked for deletion.");
 constext txt_prompt_fup_ignore[] = N_("Accept Followup-To? %s=post, %s=ignore, %s=quit: ");
@@ -794,6 +814,9 @@ constext txt_reading_arts[] = N_("Reading %s articles...");
 constext txt_reading_attributes_file[] = N_("Reading %sattributes file...\n");
 constext txt_reading_config_file[] = N_("Reading %sconfig file...\n");
 constext txt_reading_filter_file[] = N_("Reading filter file...\n");
+#ifdef DEBUG
+	constext txt_reading_from_spool[] = N_("reading from local spool");
+#endif /* DEBUG */
 constext txt_reading_group[] = N_("Reading %s\n");
 constext txt_reading_groups[] = N_("Reading %s groups...");
 constext txt_reading_input_history_file[] = N_("Reading input history file...\n");
@@ -875,6 +898,7 @@ constext txt_select_pattern[] = N_("Enter selection pattern [%s]> ");
 constext txt_select_thread[] = N_("Select thread> ");
 constext txt_send_bugreport[] = N_("%s %s %s (\"%s\"): send a DETAILED bug report to %s\n");
 constext txt_servers_active[] = N_("servers active-file");
+constext txt_skipped_group[] = N_("Skipped %s");
 constext txt_skipping_newgroups[] = N_("Cannot move into new newsgroups. Subscribe first...");
 constext txt_space[] = N_("<SPACE>");
 constext txt_starting_command[] = N_("Starting: (%s)");
@@ -916,6 +940,7 @@ constext txt_thread_marked_as_selected[] = N_("Thread selected");
 constext txt_thread_singular[] = N_("thread");
 constext txt_thread_x_of_n[] = N_("Thread %4s of %4s");
 constext txt_threading_arts[] = N_("Threading articles...");
+constext txt_threading_by_multipart[] = N_("Threading by multipart");
 constext txt_toggled_high[] = N_("Toggled word highlighting %s");
 constext txt_toggled_rot13[] = N_("Toggled rot13 encoding");
 constext txt_toggled_tex2iso[] = N_("Toggled German TeX encoding %s");
@@ -931,6 +956,7 @@ constext txt_unsubscribe_pattern[] = N_("Enter wildcard unsubscribe pattern> ");
 constext txt_uu_error_decode[] = N_("Error decoding %s : %s");
 constext txt_uu_error_no_end[] = N_("No end.");
 constext txt_uu_success[] = N_("%s successfully decoded.");
+constext txt_unknown[] = N_("(unknown)");
 constext txt_unread[] = N_("unread");
 constext txt_unsubscribed_num_groups[] = N_("unsubscribed from %d groups");
 constext txt_unsubscribed_to[] = N_("Unsubscribed from %s");
@@ -1034,6 +1060,7 @@ constext txt_warn_unprintable_char[] = N_("Warning: line %d contains unprintable
 constext txt_warn_wrong_sig_format[] = N_("\nWarning: Signatures should start with '-- \\n' not with '--\\n'.\n");
 constext txt_writing_attributes_file[] = N_("Writing attributes file...");
 constext txt_writing_group[] = N_("Writing %s\n");
+constext txt_writing_overview[] = N_("Writing overview cache...");
 
 constext txt_x_resp[] = N_("%4d Responses");
 
@@ -1157,15 +1184,25 @@ Warning: Posting is in %s and contains characters which are not\n\
 	constext txt_caching_off[] = N_("Try cache_overview_files to speed up things.\n");
 	constext txt_caching_on[] = N_("Tin will use local index files instead.\n");
 	constext txt_cannot_get_nntp_server_name[] = N_("Cannot find NNTP server name");
+	constext txt_capabilities_without_reader[] = N_("CAPABILITIES did not announce READER");
 	constext txt_connecting_port[] = N_("Connecting to %s:%u...");
+	constext txt_connection_error[] = N_("NNTP connection error. Exiting...");
 	constext txt_disconnecting[] = N_("Disconnecting from server...");
 	constext txt_failed_to_connect_to_server[] = N_("Failed to connect to NNTP server %s. Exiting...");
 	constext txt_nntp_ok_goodbye[] = N_("205  Closing connection");
 	constext txt_no_xover_support[] = N_("Your server does not support the NNTP XOVER or OVER command.\n");
+#	ifdef DEBUG
+		constext txt_port_not_numeric[] = N_("Port isn't numeric: %s:%s\n");
+		constext txt_port_not_numeric_file[] = N_("Port in %s isn't numeric: %s:%s\n");
+		constext txt_port_not_numeric_server[] = N_("Port in $NNTPSERVER isn't numeric: %s:%s\n");
+		constext txt_reconnect_limit_reached[] = N_("reconnect(%d) limit %d reached, giving up.");
+#	endif /* DEBUG */
 	constext txt_reconnect_to_news_server[] = N_("Connection to news server has timed out. Reconnect?");
 	constext txt_server_name_in_file_env_var[] = N_("Put the server name in the file %s,\nor set the environment variable NNTPSERVER");
 #ifdef USE_ZLIB
-	constext txt_usage_compress[] = N_("  -C       try COMPRESS NNTP extension");
+		constext txt_continuing[] = N_("Continuing...");
+		constext txt_read_timeout_quit[] = N_("Read timeout from server (%d seconds) - quit tin?");
+		constext txt_usage_compress[] = N_("  -C       try COMPRESS NNTP extension");
 #endif /* USE_ZLIB */
 	constext txt_usage_force_authentication[] = N_("  -A       force authentication on connect");
 	constext txt_usage_newsserver[] = N_("  -g serv  read news from NNTP server serv [default=%s]");
--- a/src/main.c
+++ b/src/main.c
@@ -614,8 +614,8 @@ read_cmd_line_options(
 								nntp_tcp_port = i;
 #	ifdef DEBUG
 							else {
-								if (debug & DEBUG_MISC) /* -> lang.c and _()? */
-									wait_message(3, "Port isn't numeric: %s:%s\n", cmdline.nntpserver, p);
+								if (debug & DEBUG_MISC)
+									wait_message(3, _(txt_port_not_numeric), cmdline.nntpserver, p);
 							}
 #	endif /* DEBUG */
 						}
@@ -949,8 +949,7 @@ read_cmd_line_options(
 	}
 #	ifdef DEBUG
 	if ((debug & DEBUG_NNTP) && !read_news_via_nntp) {
-		/* TODO: lang.c */
-		wait_message(3, _(txt_useless_combination), _("reading from local spool"), "-D nntp", "-D nntp");
+		wait_message(3, _(txt_useless_combination), _(txt_reading_from_spool), "-D nntp", "-D nntp");
 		debug &= ~DEBUG_NNTP;
 	}
 #	endif /* DEBUG */
--- a/src/misc.c
+++ b/src/misc.c
@@ -771,8 +771,8 @@ rename_file(
 	struct stat statbuf;
 
 	if (unlink(new_filename) == -1) {
-		if (errno == EPERM) { /* TODO: != ENOENT ? and -> lang.c */
-			perror_message(_("Error: unlink %s"), new_filename);
+		if (errno == EPERM) { /* TODO: != ENOENT ? */
+			perror_message(_(txt_error_unlink), new_filename);
 			return;
 		}
 	}
--- a/src/newsrc.c
+++ b/src/newsrc.c
@@ -483,7 +483,7 @@ group_get_art_info(
 				return -1;
 		}
 #else
-		my_fprintf(stderr, _("Unreachable?\n")); /* TODO: -> lang.c */
+		my_fprintf(stderr, _(txt_error_unreachable));
 		return 0;
 #endif /* NNTP_ABLE */
 	} else {
--- a/src/nntplib.c
+++ b/src/nntplib.c
@@ -177,8 +177,8 @@ getserverbyfile(
 					nntp_tcp_port = (unsigned short) i;
 #	ifdef DEBUG
 				else {
-					if (debug & DEBUG_MISC) /* -> lang.c and _()? */
-						wait_message(3, "Port in %s isn't numeric: %s:%s\n", local_newsrctable_file, buf, cp);
+					if (debug & DEBUG_MISC)
+						wait_message(3, _(txt_port_not_numeric_file), local_newsrctable_file, buf, cp);
 				}
 #	endif /* DEBUG */
 			}
@@ -208,8 +208,8 @@ getserverbyfile(
 					nntp_tcp_port = (unsigned short) i;
 #	ifdef DEBUG
 				else {
-					if (debug & DEBUG_MISC) /* -> lang.c and _()? */
-						wait_message(3, "Port in $NNTPSERVER isn't numeric: %s:%s\n", buf, cp);
+					if (debug & DEBUG_MISC)
+						wait_message(3, _(txt_port_not_numeric_server), buf, cp);
 				}
 #	endif /* DEBUG */
 			}
@@ -921,12 +921,11 @@ reconnect(
 		}
 		if (retry > NNTP_TRY_RECONNECT) {
 #	ifdef DEBUG
-			/* TODO: -> lang.c */
 			if ((debug & DEBUG_NNTP) && verbose > 1)
-				debug_print_file("NNTP", "reconnect(%d) limit %d reached, giving up.", retry, NNTP_TRY_RECONNECT);
+				debug_print_file("NNTP", _(txt_reconnect_limit_reached), retry, NNTP_TRY_RECONNECT);
 #	endif /* DEBUG */
 		}
-		tin_done(NNTP_ERROR_EXIT, _("NNTP connection error. Exiting..."));		/* user said no to reconnect or no more retries */
+		tin_done(NNTP_ERROR_EXIT, _(txt_connection_error));		/* user said no to reconnect or no more retries */
 	}
 
 	/* reset signal_context */
@@ -1640,9 +1639,9 @@ nntp_open(
 		if (!nntp_caps.reader) {
 #	ifdef DEBUG
 			if ((debug & DEBUG_NNTP) && verbose > 1)
-				debug_print_file("NNTP", "CAPABILITIES did not announce READER");
+				debug_print_file("NNTP", _(txt_capabilities_without_reader));
 #	endif /* DEBUG */
-			error_message(2, _("CAPABILITIES did not announce READER")); /* TODO: -> lang.c */
+			error_message(2, _(txt_capabilities_without_reader));
 			return -1; /* give up */
 		}
 		can_post = nntp_caps.post && !force_no_post;
@@ -2169,12 +2168,11 @@ list_motd(
 				 *         and only if it differs from the old value display the
 				 *         motd?
 				 *       - use some sort of pager?
-				 *       - -> lang.c
 				 */
 				p = my_strdup(ptr);
 				len = strlen(p);
 				process_charsets(&p, &len, "UTF-8", tinrc.mm_local_charset, FALSE);
-				my_printf("%s%s\n", _("MOTD: "), p);
+				my_printf(_(txt_motd), p);
 				free(p);
 				l++;
 			}
--- a/src/nrctbl.c
+++ b/src/nrctbl.c
@@ -181,7 +181,7 @@ get_newsrcname(
 			int error = 0;
 
 			if (!strfpath(name_found, tmp_newsrc, sizeof(tmp_newsrc), NULL, FALSE)) {
-				my_fprintf(stderr, _("couldn't expand %s\n"), name_found); /* TODO: -> lang.c */
+				my_fprintf(stderr, _(txt_error_couldnt_expand), name_found);
 				error = 1;
 			} else {
 				if (tmp_newsrc[0] == '/') {
--- a/src/post.c
+++ b/src/post.c
@@ -1352,11 +1352,11 @@ check_article_to_be_posted(
 		if (*c_group ? (*c_group)->attribute->post_8bit_header : tinrc.post_8bit_header)
 #endif /* MIME_BREAK_LONG_LINES */
 		{
-			if (strlen(line) > IMF_LINE_LEN) {  /* TODO: -> lang.c */
+			if (strlen(line) > IMF_LINE_LEN) {
 #ifdef MIME_BREAK_LONG_LINES
-				my_fprintf(stderr, _("Line %d is longer than %d octets and should be folded.\n"), cnt, IMF_LINE_LEN);
+				my_fprintf(stderr, _(txt_error_should_be_folded), cnt, IMF_LINE_LEN);
 #else
-				my_fprintf(stderr, _("Line %d is longer than %d octets and should be shortened.\n"), cnt, IMF_LINE_LEN);
+				my_fprintf(stderr, _(txt_error_should_be_shortened), cnt, IMF_LINE_LEN);
 #endif /* MIME_BREAK_LONG_LINES */
 				my_fflush(stderr);
 				warnings++;
@@ -2854,7 +2854,7 @@ post_postponed_article(
 	if ((p = strchr(ng, ',')) != NULL)
 		*p = '\0';
 
-	snprintf(buf, sizeof(buf), _("Posting: %.*s ..."), cCOLS - 14, subject); /* TODO: -> lang.c, use strunc() */
+	snprintf(buf, sizeof(buf), _(txt_postpone_post), cCOLS - 14, subject); /* TODO: use strunc() */
 	post_loop(POST_POSTPONED, group_find(ng, FALSE), (ask ? POST_EDIT : GLOBAL_POST), buf, GROUP_TYPE_NEWS, 0);
 	free(ng);
 }
@@ -4603,7 +4603,7 @@ repost_article(
 		art_type = GROUP_TYPE_MAIL;
 
 	if (art_type == GROUP_TYPE_MAIL && supersede) {
-		error_message(3, _("Can't supersede in mailgroups, try repost instead.")); /* TODO: -> lang.c */
+		error_message(3, _(txt_cannot_supersede_mailgroups));
 		return ret_code;
 	}
 
--- a/src/rfc2047.c
+++ b/src/rfc2047.c
@@ -1353,11 +1353,8 @@ compose_multipart_mixed(
 
 	/*
 	 * preamble
-	 * TODO: -> lang.c
 	 */
-	fprintf(fp, "%s", _("This message has been composed in the 'multipart/mixed' MIME-format. If you\n\
-are reading this prefix, your mail reader probably has not yet been modified\n\
-to understand the new format, and some of what follows may look strange.\n\n"));
+	fprintf(fp, "%s", _(txt_mime_preamble_multipsrt_mixed));
 
 	/*
 	 * Body: boundary+text, message/rfc822 part, closing boundary
--- a/src/save.c
+++ b/src/save.c
@@ -212,9 +212,9 @@ check_start_save_any_news(
 		}
 
 		if (function == MAIL_ANY_NEWS || function == SAVE_ANY_NEWS) {
-			if (!group->attribute->batch_save) { /* TODO: string -> lang.c */
+			if (!group->attribute->batch_save) {
 				if (verbose > 1 && function == MAIL_ANY_NEWS)
-					fprintf(fp_log, "Skipped %s", group->name);
+					fprintf(fp_log, _(txt_skipped_group), group->name);
 
 				continue;
 			}
--- a/src/signal.c
+++ b/src/signal.c
@@ -439,16 +439,24 @@ signal_handler(
 			 * response compression from the server may take a while
 			 * when running interactively and not being in connection
 			 * phase give the user a chance to go on instead of exiting
-			 *
-			 * TODO: strings to lang.c and incl. nntp_read_timeout_secs
 			 */
-			if (signal_context == cReconnect || batch_mode || !use_compress || !nntp_caps.compress || prompt_yn(_("Read timeout from server - quit tin?"), FALSE) == 1)
+			{
+				char *prompt;
+				size_t len;
+
+				len = strlen(_(txt_read_timeout_quit)) + snprintf(NULL, 0, "%d", tinrc.nntp_read_timeout_secs) - 1;
+				prompt = my_malloc(len);
+				snprintf(prompt, len, _(txt_read_timeout_quit), tinrc.nntp_read_timeout_secs);
+				if (signal_context == cReconnect || batch_mode || !use_compress || !nntp_caps.compress || prompt_yn(prompt, FALSE) == 1) {
+					free(prompt);
 #	endif /* USE_ZLIB */
-				tin_done(NNTP_ERROR_EXIT, _("NNTP connection error. Exiting..."));
+					tin_done(NNTP_ERROR_EXIT, _(txt_connection_error));
 #	ifdef USE_ZLIB
-			else {
-				RESTORE_HANDLER(sig, signal_handler);
-				wait_message(0, "Continuing...");
+				} else {
+					free(prompt);
+					RESTORE_HANDLER(sig, signal_handler);
+					wait_message(0, _(txt_continuing));
+				}
 			}
 #	endif /* USE_ZLIB */
 #	endif /* NNTP_ABLE */


More information about the tin-dev mailing list