datetime: Make punctuation translatable

https://bugzilla.gnome.org/show_bug.cgi?id=732585
This commit is contained in:
Stanislav Brabec 2014-07-11 20:00:05 +02:00 committed by Bastien Nocera
parent 68ed570a28
commit 98916a60f8

View file

@ -519,7 +519,8 @@ translated_city_name (TzLocation *loc)
length = g_strv_length (split_translated); length = g_strv_length (split_translated);
country = gnome_get_country_from_code (loc->country, NULL); country = gnome_get_country_from_code (loc->country, NULL);
name = g_strdup_printf ("%s, %s", /* Translators: "city, country" */
name = g_strdup_printf (C_("timezone loc", "%s, %s"),
split_translated[length-1], split_translated[length-1],
country); country);
g_free (country); g_free (country);
@ -537,6 +538,7 @@ update_timezone (CcDateTimePanel *self)
char *label; char *label;
char *time_label; char *time_label;
char *utc_label; char *utc_label;
char *tz_desc;
gboolean use_ampm; gboolean use_ampm;
if (priv->clock_format == G_DESKTOP_CLOCK_FORMAT_12H && priv->ampm_available) if (priv->clock_format == G_DESKTOP_CLOCK_FORMAT_12H && priv->ampm_available)
@ -547,7 +549,8 @@ update_timezone (CcDateTimePanel *self)
city_country = translated_city_name (priv->current_location); city_country = translated_city_name (priv->current_location);
/* Update the timezone on the listbow row */ /* Update the timezone on the listbow row */
label = g_strdup_printf ("%s (%s)", /* Translators: "timezone (details)" */
label = g_strdup_printf (C_("timezone desc", "%s (%s)"),
g_date_time_get_timezone_abbreviation (self->priv->date), g_date_time_get_timezone_abbreviation (self->priv->date),
city_country); city_country);
gtk_label_set_text (GTK_LABEL (W ("timezone_label")), label); gtk_label_set_text (GTK_LABEL (W ("timezone_label")), label);
@ -569,15 +572,19 @@ update_timezone (CcDateTimePanel *self)
} }
/* Update the text bubble in the timezone map */ /* Update the text bubble in the timezone map */
bubble_text = g_strdup_printf ("<b>%s (%s)</b>\n" /* Translators: "timezone (utc shift)" */
tz_desc = g_strdup_printf (C_("timezone map", "%s (%s)"),
g_date_time_get_timezone_abbreviation (self->priv->date),
utc_label);
bubble_text = g_strdup_printf ("<b>%s</b>\n"
"<small>%s</small>\n" "<small>%s</small>\n"
"<b>%s</b>", "<b>%s</b>",
g_date_time_get_timezone_abbreviation (self->priv->date), tz_desc,
utc_label,
city_country, city_country,
time_label); time_label);
cc_timezone_map_set_bubble_text (CC_TIMEZONE_MAP (priv->map), bubble_text); cc_timezone_map_set_bubble_text (CC_TIMEZONE_MAP (priv->map), bubble_text);
g_free (tz_desc);
g_free (bubble_text); g_free (bubble_text);
g_free (city_country); g_free (city_country);
g_free (time_label); g_free (time_label);