Harden translated output formatting

This commit is contained in:
Mario Fetka
2026-07-14 17:56:23 +02:00
parent da5195c6bf
commit 1ec17f758e
3 changed files with 26 additions and 26 deletions
+9 -9
View File
@@ -275,8 +275,8 @@ void DisplayCursesInfo(download_t * download)
// erase();
refresh();
attrset(COLOR_PAIR(HIGHLIGHT_PAIR) | A_BOLD);
snprintf(buf, sizeof(buf), _("Connection Server Status Received"));
mvprintw(line++, 1, buf);
snprintf(buf, sizeof(buf), "%s", _("Connection Server Status Received"));
mvprintw(line++, 1, "%s", buf);
attrset(COLOR_PAIR(NULL_PAIR));
@@ -304,7 +304,7 @@ void DisplayCursesInfo(download_t * download)
(float)proz_connection_get_total_bytes_got(download->
pconnections[i]) / 1024,
((float)download->pconnections[i]->main_file_size / 1024) / download->num_connections);
mvprintw(line++, 1, buf);
mvprintw(line++, 1, "%s", buf);
}
line = line + 2;
@@ -317,17 +317,17 @@ void DisplayCursesInfo(download_t * download)
mvprintw(line++, 1, _("File Size = %jdK"),
(intmax_t) (download->main_file_size / 1024));
else
mvprintw(line++, 1, _("File Size = UNKNOWN"));
mvprintw(line++, 1, "%s", _("File Size = UNKNOWN"));
snprintf(buf, sizeof(buf), _("Total Bytes received %jd Kb (%.2f%%)"),
(intmax_t) total_bytes_got,
(((float)total_bytes_got * 100) / ((float)download->main_file_size / 1024)));
line++;
mvprintw(line++, 1, buf);
mvprintw(line++, 1, "%s", buf);
snprintf(buf, sizeof(buf), _("Current speed = %1.2fKb/s, Average D/L speed = %1.2fKb/s"),
current_dl_speed, proz_download_get_average_speed(download) / 1024);
mvprintw(line++, 1, buf);
mvprintw(line++, 1, "%s", buf);
clrtoeol();
if ((secs_left = proz_download_get_est_time_left(download)) != -1)
@@ -341,15 +341,15 @@ void DisplayCursesInfo(download_t * download)
snprintf(buf, sizeof(buf), _("Time Remaining %d Hours %d minutes"), secs_left / 3600,
(secs_left % 3600) / 60);
mvprintw(line++, 1, buf);
mvprintw(line++, 1, "%s", buf);
clrtoeol();
line++;
attrset(COLOR_PAIR(HIGHLIGHT_PAIR) | A_BOLD);
if (download->resume_support)
mvprintw(line++, 1, _("Resume Supported"));
mvprintw(line++, 1, "%s", _("Resume Supported"));
else
mvprintw(line++, 1, _("Resume NOT Supported"));
mvprintw(line++, 1, "%s", _("Resume NOT Supported"));
}
attrset(COLOR_PAIR(NULL_PAIR));
refresh();