[gnome-panel] [clock] Add/improve translator comments
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-panel] [clock] Add/improve translator comments
- Date: Wed, 12 Aug 2009 13:35:53 +0000 (UTC)
commit de928cb7bb8f63e805f76d90c4218b6415d9e423
Author: Vincent Untz <vuntz gnome org>
Date: Wed Aug 12 15:34:56 2009 +0200
[clock] Add/improve translator comments
http://bugzilla.gnome.org/show_bug.cgi?id=507548
applets/clock/calendar-window.c | 13 +++++++--
applets/clock/clock-location-tile.c | 41 ++++++++++++++----------------
applets/clock/clock.c | 46 ++++++++++++++++++++++++++++------
3 files changed, 67 insertions(+), 33 deletions(-)
---
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index 69f2bf2..d316e3e 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -302,14 +302,21 @@ format_time (ClockFormat format,
month == tm->tm_mon &&
day == tm->tm_mday) {
if (format == CLOCK_FORMAT_12)
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 12-hours format
+ * (eg, like in the US: 8:10 am). The %p expands to
+ * am/pm. */
time_format = g_locale_from_utf8 (_("%l:%M %p"), -1, NULL, NULL, NULL);
else
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format
+ * (eg, like in France: 20:10). */
time_format = g_locale_from_utf8 (_("%H:%M"), -1, NULL, NULL, NULL);
}
else {
- /* Translators: If the event did not start on the current day
- * we will display the start date in the most abbreviated way
- * possible. */
+ /* Translators: This is a strftime format string.
+ * It is used to display the start date of an appointment, in
+ * the most abbreviated way possible. */
time_format = g_locale_from_utf8 (_("%b %d"), -1, NULL, NULL, NULL);
}
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index 2041065..e1b254c 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -444,39 +444,35 @@ format_time (struct tm *now,
if (local_now.tm_wday != now->tm_wday) {
if (clock_format == CLOCK_FORMAT_12) {
-/* translators: This is a strftime format string that is used for formatting
- * the time that is displayed for locations in the popup. This string is used
- * for 12-hour format (the %p expands to am/pm), when the local weekday differs
- * from the weekday at the location (the %A expands to the weekday).
- * There should be little need to translate this string.
- */
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 12-hours format
+ * (eg, like in the US: 8:10 am), when the local
+ * weekday differs from the weekday at the location
+ * (the %A expands to the weekday). The %p expands to
+ * am/pm. */
format = _("%l:%M <small>%p (%A)</small>");
}
else {
-/* translators: This is a strftime format string that is used for formatting
- * the time that is displayed for locations in the popup. This string is used
- * for 24-hour format (the %p expands to am/pm), when the local weekday differs
- * from the weekday at the location (the %A expands to the weekday).
- * There should be little need to translate this string.
- */
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format
+ * (eg, like in France: 20:10), when the local
+ * weekday differs from the weekday at the location
+ * (the %A expands to the weekday). */
format = _("%H:%M <small>(%A)</small>");
}
}
else {
if (clock_format == CLOCK_FORMAT_12) {
-/* translators: This is a strftime format string that is used for formatting
- * the time that is displayed for locations in the popup. This string is used
- * for 12-hour format (the %p expands to am/pm).
- * There should be little need to translate this string.
- */
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 12-hours format
+ * (eg, like in the US: 8:10 am). The %p expands to
+ * am/pm. */
format = _("%l:%M <small>%p</small>");
}
else {
-/* translators: This is a strftime format string that is used for formatting
- * the time that is displayed for locations in the popup. This string is used
- * for 24-hour format.
- * There should be little need to translate this string.
- */
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format
+ * (eg, like in France: 20:10). */
format = _("%H:%M");
}
}
@@ -591,6 +587,7 @@ weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkToolt
if (strcmp (apparent, temp) != 0 &&
/* FMQ: it's broken to read from another module's translations; add some API to libgweather. */
strcmp (apparent, dgettext ("gnome-applets-2.0", "Unknown")) != 0)
+ /* Translators: The two strings are temperatures. */
line2 = g_strdup_printf (_("%s, feels like %s"), temp, apparent);
else
line2 = g_strdup (temp);
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 315f6bf..c86a2be 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -445,8 +445,14 @@ get_updated_timeformat (ClockData *cd,
char *clock_format;
if (cd->format == CLOCK_FORMAT_12)
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 12-hours format (eg, like
+ * in the US: 8:10 am). The %p expands to am/pm. */
time_format = cd->showseconds ? _("%l:%M:%S %p") : _("%l:%M %p");
else
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format (eg, like
+ * in France: 20:10). */
time_format = cd->showseconds ? _("%H:%M:%S") : _("%H:%M");
if (!safe) {
@@ -462,11 +468,11 @@ get_updated_timeformat (ClockData *cd,
clock_format = g_strdup (time_gravity_format);
else {
- /* translators: replace %e with %d if, when the day of the
- * month as a decimal number is a single digit, it
- * should begin with a 0 in your locale (e.g. "May
- * 01" instead of "May 1").
- */
+ /* Translators: This is a strftime format string.
+ * It is used to display the date. Replace %e with %d if, when
+ * the day of the month as a decimal number is a single digit,
+ * it should begin with a 0 in your locale (e.g. "May 01"
+ * instead of "May 1"). */
date_format = _("%a %b %e");
if (use_two_line_format (cd))
@@ -661,9 +667,10 @@ update_tooltip (ClockData * cd)
utf8 = NULL;
- /* Show date in tooltip. Translators: please leave the "%%s" as it is; we
- * use it to put in the timezone name later.
- */
+ /* Show date in tooltip. */
+ /* Translators: This is a strftime format string.
+ * It is used to display a date. Please leave "%%s" as it is:
+ * it will be used to insert the timezone name later. */
loc = g_locale_from_utf8 (_("%A %B %d (%%s)"), -1, NULL, NULL, NULL);
if (!loc)
strcpy (date, "???");
@@ -1564,13 +1571,33 @@ copy_time (BonoboUIComponent *uic,
NULL, NULL, NULL);
} else if (cd->format == CLOCK_FORMAT_12) {
if (cd->showseconds)
+ /* Translators: This is a strftime format
+ * string.
+ * It is used to display the time in 12-hours
+ * format with a leading 0 if needed (eg, like
+ * in the US: 08:10 am). The %p expands to
+ * am/pm. */
format = g_locale_from_utf8 (_("%I:%M:%S %p"), -1, NULL, NULL, NULL);
else
+ /* Translators: This is a strftime format
+ * string.
+ * It is used to display the time in 12-hours
+ * format with a leading 0 if needed (eg, like
+ * in the US: 08:10 am). The %p expands to
+ * am/pm. */
format = g_locale_from_utf8 (_("%I:%M %p"), -1, NULL, NULL, NULL);
} else {
if (cd->showseconds)
+ /* Translators: This is a strftime format
+ * string.
+ * It is used to display the time in 24-hours
+ * format (eg, like in France: 20:10). */
format = g_locale_from_utf8 (_("%H:%M:%S"), -1, NULL, NULL, NULL);
else
+ /* Translators: This is a strftime format
+ * string.
+ * It is used to display the time in 24-hours
+ * format (eg, like in France: 20:10). */
format = g_locale_from_utf8 (_("%H:%M"), -1, NULL, NULL, NULL);
}
@@ -1608,6 +1635,9 @@ copy_date (BonoboUIComponent *uic,
else
tm = localtime (&cd->current_time);
+ /* Translators: This is a strftime format string.
+ * It is used to display a date in the full format (so that people can
+ * copy and paste it elsewhere). */
loc = g_locale_from_utf8 (_("%A, %B %d %Y"), -1, NULL, NULL, NULL);
if (!loc)
strcpy (string, "???");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]