[Xfce4-commits] <xfce4-weather-plugin:master> Add some comments with hints for translators.

Harald Judt noreply at xfce.org
Fri Aug 3 02:06:01 CEST 2012


Updating branch refs/heads/master
         to 94cbe658f7fdacc60ba4fa31505308238fc5cdb3 (commit)
       from 1cfc0573bf83742844cde29312a6cbecd0a6d316 (commit)

commit 94cbe658f7fdacc60ba4fa31505308238fc5cdb3
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Aug 3 01:44:25 2012 +0200

    Add some comments with hints for translators.

 panel-plugin/weather-config.c    |    9 +++++++++
 panel-plugin/weather-search.c    |   14 +++++++++-----
 panel-plugin/weather-translate.c |   11 +++++++++++
 panel-plugin/weather.c           |    3 ++-
 4 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 0130d45..6a2e862 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -36,6 +36,15 @@
 
 
 static const labeloption labeloptions[OPTIONS_N] = {
+    /*
+     * TRANSLATORS: The abbreviations in parentheses will be shown in
+     * the scrollbox together with the values. Keep them in sync with
+     * those in make_label() in weather.c. Some of them may be
+     * standardized internationally, like CL, CM, CH, and you might
+     * read that up somewhere and decide whether you want to use them
+     * or not. In general, though, you should just try to choose
+     * letter(s) that make sense and don't use up too much space.
+     */
     {N_("Temperature (T)"), TEMPERATURE},
     {N_("Atmosphere pressure (P)"), PRESSURE},
     {N_("Wind speed (WS)"), WIND_SPEED},
diff --git a/panel-plugin/weather-search.c b/panel-plugin/weather-search.c
index a7ea67e..06fdc14 100644
--- a/panel-plugin/weather-search.c
+++ b/panel-plugin/weather-search.c
@@ -403,19 +403,23 @@ cb_geolocation(const gboolean succeed,
         return;
     }
 
-    if (geo->country_name && geo->city) {
+    if (geo->country_name && geo->city)
         if (geo->country_code && !strcmp(geo->country_code, "US") &&
             geo->region_name)
             full_loc = g_strdup_printf("%s, %s", geo->city, geo->region_name);
         else
             full_loc = g_strdup_printf("%s, %s", geo->city, geo->country_name);
-    } else if (geo->country_name) {
+    else if (geo->country_name)
         full_loc = g_strdup(geo->country_name);
-    } else if (geo->latitude && geo->longitude) {
+    else if (geo->latitude && geo->longitude) {
+        /*
+         * TRANSLATORS: Latitude and longitude are known from the
+         * search results, but not the location name. The user shall
+         * give the place a name.
+         */
         full_loc = g_strdup(_("Unnamed place"));
-    } else {
+    } else
         full_loc = NULL;
-    }
 
     unit_system = get_preferred_unit_system(geo->country_code);
 
diff --git a/panel-plugin/weather-translate.c b/panel-plugin/weather-translate.c
index 927b0f2..ab48885 100644
--- a/panel-plugin/weather-translate.c
+++ b/panel-plugin/weather-translate.c
@@ -31,6 +31,7 @@
 
 
 static const gchar *wdirs[] = {
+    /* TRANSLATORS: Wind directions. It's where the wind comes _from_. */
     N_("S"),
     N_("SSW"),
     N_("SW"),
@@ -52,6 +53,7 @@ static const gchar *wdirs[] = {
 };
 
 static const gchar *moon_phases[] = {
+    /* TRANSLATORS: Moon phases */
     N_("New moon"),
     N_("Waxing crescent"),
     N_("First quarter"),
@@ -103,6 +105,15 @@ typedef struct {
 } symbol_desc;
 
 static const symbol_desc symbol_to_desc[] = {
+    /*
+     * TRANSLATORS: Some of these terms seem to contradict
+     * themselves. If I'm not mistaken, this is because the forecasts
+     * are for certain time periods which may be 1, 3 or 6 hours, and
+     * during those periods the weather can alternate between several
+     * states. For more information, you might want to read
+     * http://api.met.no/weatherapi/locationforecastlts/1.1/documentation,
+     * but unfortunately it is not very revealing either.
+     */
     { 1, "SUN",                 N_("Sunny"),                     N_("Clear")		},
     { 2, "LIGHTCLOUD",          N_("Lightly cloudy"),            N_("Lightly cloudy")	},
     { 3, "PARTLYCLOUD",         N_("Partly cloudy"),             N_("Partly cloudy")	},
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 57ca77b..fbf65ad 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -133,6 +133,7 @@ make_label(xfceweather_data *data,
 
     switch (type) {
     case TEMPERATURE:
+        /* TRANSLATORS: Keep in sync with labeloptions in weather-config.c */
         lbl = _("T");
         break;
     case PRESSURE:
@@ -895,7 +896,7 @@ weather_get_tooltip_text(xfceweather_data *data)
 
     conditions = get_current_conditions(data->weatherdata);
     if (G_UNLIKELY(conditions == NULL)) {
-        text = g_strdup(_("Current conditions data unavailable"));
+        text = g_strdup(_("Short-term forecast data unavailable."));
         return text;
     }
 


More information about the Xfce4-commits mailing list