[json-glib] Fix translator comments
- From: Piotr Drąg <piotrdrag src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] Fix translator comments
- Date: Sat, 28 Jan 2017 00:19:46 +0000 (UTC)
commit c1146f5d0b2fa1a7df6ce73500da4c7c06a750d6
Author: Piotr Drąg <piotrdrag gmail com>
Date: Sat Jan 28 01:19:17 2017 +0100
Fix translator comments
They need to be exactly one line above a string to show up in .po files.
json-glib/json-gobject.c | 2 +-
json-glib/json-gvariant.c | 2 +-
json-glib/json-parser.c | 8 ++++----
json-glib/json-path.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 34a43c8..9bbb29b 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -937,9 +937,9 @@ json_gobject_from_data (GType gtype,
root = json_parser_get_root (parser);
if (root == NULL || JSON_NODE_TYPE (root) != JSON_NODE_OBJECT)
{
- /* translators: the %s is the name of the data structure */
g_set_error (error, JSON_PARSER_ERROR,
JSON_PARSER_ERROR_PARSE,
+ /* translators: the %s is the name of the data structure */
_("Expecting a JSON object, but the root node is of type `%s'"),
json_node_type_name (root));
g_object_unref (parser);
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index 6d55fb8..061c284 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -516,10 +516,10 @@ json_node_assert_type (JsonNode *json_node,
(type == JSON_NODE_VALUE &&
(json_node_get_value_type (json_node) != sub_type)))
{
- /* translators: the '%s' is the type name */
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_DATA,
+ /* translators: the '%s' is the type name */
_("Unexpected type '%s' in JSON node"),
g_type_name (json_node_get_value_type (json_node)));
return FALSE;
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c
index 10ce3d8..efd7e14 100644
--- a/json-glib/json-parser.c
+++ b/json-glib/json-parser.c
@@ -905,12 +905,12 @@ json_scanner_msg_handler (JsonScanner *scanner,
JsonParserPrivate *priv = parser->priv;
GError *error = NULL;
- /* translators: %s: is the file name, the first %d is the line
- * number, the second %d is the position on the line, and %s is
- * the error message
- */
g_set_error (&error, JSON_PARSER_ERROR,
priv->error_code,
+ /* translators: %s: is the file name, the first %d is the line
+ * number, the second %d is the position on the line, and %s is
+ * the error message
+ */
_("%s:%d:%d: Parse error: %s"),
priv->is_filename ? priv->filename : "<data>",
scanner->line,
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index 4604cd9..c325da5 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -391,9 +391,9 @@ json_path_compile (JsonPath *path,
if (!(*(p + 1) == '.' || *(p + 1) == '[' || *(p + 1) == '\0'))
{
- /* translators: the %c is the invalid character */
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
+ /* translators: the %c is the invalid character */
_("Root node followed by invalid character '%c'"),
*(p + 1));
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]