[libgdata] Bug 581706 – translation issues
- From: Philip Withnall <pwithnall src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgdata] Bug 581706 – translation issues
- Date: Thu, 7 May 2009 16:09:15 -0400 (EDT)
commit 2d3386d6827e524dd103a0bff629c4919398f8a8
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu May 7 21:05:21 2009 +0100
Bug 581706 â?? translation issues
Added more translator comments and corrected minor problems in a couple
of error strings. Closes: bgo#581706
---
gdata/gdata-parser.c | 26 +++++++++++++++++++-
gdata/services/calendar/gdata-calendar-calendar.c | 8 +++++-
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/gdata/gdata-parser.c b/gdata/gdata-parser.c
index 4721310..1a26a23 100644
--- a/gdata/gdata-parser.c
+++ b/gdata/gdata-parser.c
@@ -36,6 +36,8 @@ gdata_parser_error_quark (void)
gboolean
gdata_parser_error_required_content_missing (const gchar *element_name, GError **error)
{
+ /* Translators: the parameter is the name of an XML element.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
_("A <%s> element was missing required content."),
element_name);
@@ -47,9 +49,13 @@ gdata_parser_error_not_iso8601_format (const gchar *element_name, const gchar *p
{
/* Translators: the first parameter is the name of an XML element, the second parameter is the name of
* another XML element which is owned by (possessive) the first parameter, and the third parameter is
- * the erroneous value (which was not in ISO8601 format). */
+ * the erroneous value (which was not in ISO 8601 format).
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names.
+ *
+ * For example:
+ * A <media:group>'s <uploaded> element content ("2009-05-06 26:30Z") was not in ISO 8601 format. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
- _("A <%s>'s <%s> element (\"%s\") was not in ISO8601 format."),
+ _("A <%s>'s <%s> element content (\"%s\") was not in ISO 8601 format."),
parent_element_name, element_name, actual_value);
return FALSE;
}
@@ -57,6 +63,9 @@ gdata_parser_error_not_iso8601_format (const gchar *element_name, const gchar *p
gboolean
gdata_parser_error_unhandled_element (const gchar *element_namespace, const gchar *element_name, const gchar *parent_element_name, GError **error)
{
+ /* Translators: the first parameter is the name of an XML namespace, the second the name of an XML element, and the third the
+ * name of the XML parent element.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. */
g_set_error (error, GDATA_PARSER_ERROR, GDATA_PARSER_ERROR_UNHANDLED_XML_ELEMENT,
_("Unhandled <%s:%s> element as a child of <%s>."),
element_namespace, element_name, parent_element_name);
@@ -66,6 +75,10 @@ gdata_parser_error_unhandled_element (const gchar *element_namespace, const gcha
gboolean
gdata_parser_error_unknown_property_value (const gchar *element_name, const gchar *property_name, const gchar *actual_value, GError **error)
{
+ /* Translators: the first parameter is an unknown value, the second is the name of an XML element, and the third is
+ * the name of an XML property.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. Similarly, do not translate (or remove)
+ * the "@" from before the third parameter. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
_("Unknown value \"%s\" of a <%s> @%s property."),
actual_value, element_name, property_name);
@@ -75,6 +88,9 @@ gdata_parser_error_unknown_property_value (const gchar *element_name, const gcha
gboolean
gdata_parser_error_required_property_missing (const gchar *element_name, const gchar *property_name, GError **error)
{
+ /* Translators: the first parameter is the name of an XML property, and the second is the name of an XML element.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. Similarly, do not translate (or remove)
+ * the "@" from before the first parameter. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
_("A required @%s property of a <%s> was not present."),
property_name, element_name);
@@ -84,6 +100,8 @@ gdata_parser_error_required_property_missing (const gchar *element_name, const g
gboolean
gdata_parser_error_required_element_missing (const gchar *element_name, const gchar *parent_element_name, GError **error)
{
+ /* Translators: the first parameter is the name of an XML element, and the second is the name of the XML parent element.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
_("A required <%s> element as a child of <%s> was not present."),
element_name, parent_element_name);
@@ -93,6 +111,8 @@ gdata_parser_error_required_element_missing (const gchar *element_name, const gc
gboolean
gdata_parser_error_duplicate_element (const gchar *element_name, const gchar *parent_element_name, GError **error)
{
+ /* Translators: the first parameter is the name of an XML element, and the second is the name of the XML parent element.
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
_("A <%s> element as a child of <%s> was duplicated."),
element_name, parent_element_name);
@@ -108,6 +128,7 @@ gdata_parser_time_val_from_date (const gchar *date, GTimeVal *_time)
if (strlen (date) != 10 && strlen (date) != 8)
return FALSE;
+ /* Note: This doesn't need translating, as it's outputting an ISO 8601 time string */
iso8601_date = g_strdup_printf ("%sT00:00:00Z", date);
success = g_time_val_from_iso8601 (iso8601_date, _time);
g_free (iso8601_date);
@@ -124,5 +145,6 @@ gdata_parser_date_from_time_val (GTimeVal *_time)
secs = _time->tv_sec;
tm = gmtime (&secs);
+ /* Note: This doesn't need translating, as it's outputting an ISO 8601 date string */
return g_strdup_printf ("%4d-%02d-%02d", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
}
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c b/gdata/services/calendar/gdata-calendar-calendar.c
index 5112963..aa50580 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -326,9 +326,13 @@ parse_xml (GDataEntry *entry, xmlDoc *doc, xmlNode *node, GError **error)
/* Error */
/* Translators: the first parameter is the name of an XML element, the second parameter is the name of
* another XML element which is owned by (possessive) the first parameter, and the third parameter is
- * the erroneous value (which was not in hexadecimal RGB format). */
+ * the erroneous value (which was not in hexadecimal RGB format).
+ * Do not translate the angle brackets ("<" and ">") â?? they enclose XML element names.
+ *
+ * For example:
+ * A <entry>'s <gCal:color> element ("00FG56") was not in hexadecimal RGB format. */
g_set_error (error, GDATA_SERVICE_ERROR, GDATA_SERVICE_ERROR_PROTOCOL_ERROR,
- _("A <%s>'s <%s> element (\"%s\") was not in hexadecimal RGB format."),
+ _("A <%s>'s <%s> element content (\"%s\") was not in hexadecimal RGB format."),
"entry", "gCal:color", value);
xmlFree (value);
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]