From 267476e3fe4d9b48ee990eb4a0ba2db45072fc5d Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sat, 22 Dec 2012 23:34:22 +0200 Subject: Add some text in statistics.c for translation Some UI texts were missing translation, such as: "for selected dive" "for all dives" Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- statistics.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/statistics.c b/statistics.c index 8ec8ad662..b4427918d 100644 --- a/statistics.c +++ b/statistics.c @@ -604,14 +604,14 @@ static void get_ranges(char *buffer, int size) int i, len; int first, last = -1; - snprintf(buffer, size, "for dives #"); + snprintf(buffer, size, _("for dives #")); for (i = 0; i < dive_table.nr; i++) { struct dive *dive = get_dive(i); if (! dive->selected) continue; if (dive->number < 1) { /* uhh - weird numbers - bail */ - snprintf(buffer, size, "for selected dives"); + snprintf(buffer, size, _("for selected dives")); return; } len = strlen(buffer); @@ -645,13 +645,13 @@ static void get_selected_dives_text(char *buffer, int size) { if (amount_selected == 1) { if (current_dive) - snprintf(buffer, size, "for dive #%d", current_dive->number); + snprintf(buffer, size, _("for dive #%d"), current_dive->number); else - snprintf(buffer, size, "for selected dive"); + snprintf(buffer, size, _("for selected dive")); } else if (amount_selected == dive_table.nr) { - snprintf(buffer, size, "for all dives"); + snprintf(buffer, size, _("for all dives")); } else if (amount_selected == 0) { - snprintf(buffer, size, "(no dives)"); + snprintf(buffer, size, _("(no dives)")); } else { get_ranges(buffer, size); if (strlen(buffer) == size -1) { @@ -676,7 +676,7 @@ static void show_total_dive_stats(struct dive *dive) stats_ptr = &stats_selection; get_selected_dives_text(buffer, sizeof(buffer)); - set_label(stats_w.framelabel, "Statistics %s", buffer); + set_label(stats_w.framelabel, _("Statistics %s"), buffer); set_label(stats_w.selection_size, "%d", stats_ptr->selection_size); if (stats_ptr->selection_size == 0) { clear_stats_widgets(); -- cgit v1.2.3-70-g09d2