[Xfce4-commits] <xfce4-weather-plugin:master> Summary window: Reformat report in details tab.

Harald Judt noreply at xfce.org
Wed Dec 19 11:32:05 CET 2012


Updating branch refs/heads/master
         to 77788b6b254142ceaf57e6fc65374132a14a7a26 (commit)
       from 5c0fd23d5b86114bba33bfd5eb798f0313dcadae (commit)

commit 77788b6b254142ceaf57e6fc65374132a14a7a26
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Dec 19 11:14:47 2012 +0100

    Summary window: Reformat report in details tab.
    
    Use tabs to align times and dates and use "Weather Report" instead of
    "Weather Update" as window subtitle. Remove all other occurrences of
    "Weather report for", as these are just unnecessary repetitions.

 panel-plugin/weather-summary.c |   31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index d2b2a5b..6c51bc4 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -325,18 +325,14 @@ create_summary_tab(plugin_data *data)
     ltag1 = gtk_text_buffer_create_tag(buffer, "lnk1",
                                        "foreground-gdk", &lnk_color, NULL);
 
-    /* head */
-    value = g_strdup_printf(_("Weather report for: %s.\n\n"),
-                            data->location_name);
-    APPEND_BTEXT(value);
-    g_free(value);
-
     conditions = get_current_conditions(data->weatherdata);
     APPEND_BTEXT(_("Coordinates\n"));
     APPEND_TEXT_ITEM(_("Altitude"), ALTITUDE);
     APPEND_TEXT_ITEM(_("Latitude"), LATITUDE);
     APPEND_TEXT_ITEM(_("Longitude"), LONGITUDE);
 
+    /* TRANSLATORS: Please use as many \t as appropriate to align the
+       date/time values as in the original. */
     APPEND_BTEXT(_("\nTime\n"));
     last_weather_update = format_date(data->weather_update->last, NULL, TRUE);
     value = g_strdup_printf(_("\tLast updated:\t%s\n\n"),
@@ -346,7 +342,8 @@ create_summary_tab(plugin_data *data)
 
     point = format_date(conditions->point, NULL, TRUE);
     value = g_strdup_printf
-        (_("\tTemperature, wind, atmosphere and cloud data calculated for:\n\t%s\n"),
+        (_("\tTemperature, wind, atmosphere and cloud data calculated\n"
+           "\tfor:\t\t\t%s\n"),
          point);
     g_free(point);
     APPEND_TEXT_ITEM_REAL(value);
@@ -355,9 +352,9 @@ create_summary_tab(plugin_data *data)
     interval_end = format_date(conditions->end, NULL, TRUE);
     value = g_strdup_printf
         (_("\n\tPrecipitation and the weather symbol have been calculated\n"
-           "\tfor the following time interval:\n"
-           "\tStart:\t%s\n"
-           "\tEnd:\t%s\n"),
+           "\tusing the following time interval:\n"
+           "\tStart:\t\t%s\n"
+           "\tEnd:\t\t%s\n"),
          interval_start,
          interval_end);
     g_free(interval_end);
@@ -394,10 +391,12 @@ create_summary_tab(plugin_data *data)
         APPEND_TEXT_ITEM_REAL(value);
 
         if (data->astrodata->moon_never_rises) {
-            value = g_strdup(_("\tMoonrise:\tThe moon never rises today.\n"));
+            value =
+                g_strdup(_("\tMoonrise:\tThe moon never rises today.\n"));
             APPEND_TEXT_ITEM_REAL(value);
         } else if (data->astrodata->moon_never_sets) {
-            value = g_strdup(_("\tMoonset:\tThe moon never sets today.\n"));
+            value =
+                g_strdup(_("\tMoonset:\tThe moon never sets today.\n"));
             APPEND_TEXT_ITEM_REAL(value);
         } else {
             moonrise = format_date(data->astrodata->moonrise, NULL, TRUE);
@@ -861,14 +860,14 @@ create_summary_window(plugin_data *data)
     GdkPixbuf *icon;
     xml_time *conditions;
 
-    window = xfce_titled_dialog_new_with_buttons(_("Weather Update"),
+    conditions = get_current_conditions(data->weatherdata);
+    window = xfce_titled_dialog_new_with_buttons(_("Weather Report"),
                                                  NULL,
                                                  GTK_DIALOG_NO_SEPARATOR,
                                                  GTK_STOCK_CLOSE,
                                                  GTK_RESPONSE_ACCEPT, NULL);
     if (data->location_name != NULL) {
-        title = g_strdup_printf(_("Weather report for: %s"),
-                                data->location_name);
+        title = g_strdup_printf("%s", data->location_name);
         xfce_titled_dialog_set_subtitle(XFCE_TITLED_DIALOG(window), title);
         g_free(title);
     }
@@ -876,8 +875,6 @@ create_summary_window(plugin_data *data)
     vbox = gtk_vbox_new(FALSE, 0);
     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox), vbox, TRUE, TRUE, 0);
 
-    conditions = get_current_conditions(data->weatherdata);
-
     symbol = get_data(conditions, data->units, SYMBOL, FALSE);
     icon = get_icon(data->icon_theme, symbol, 48, data->night_time);
     g_free(symbol);


More information about the Xfce4-commits mailing list