summaryrefslogtreecommitdiff
path: root/json-glib/json-path.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-06-01 13:21:32 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-06-01 13:21:32 +0100
commit8863766ca4792383dad0e48550f8fb79d4c104e4 (patch)
treeba0efa89049cf053a230d00a3d550355e9f05e2c /json-glib/json-path.c
parent67edce08670ce1da4956f87948985434ac5ae2ca (diff)
downloadjson-glib-8863766ca4792383dad0e48550f8fb79d4c104e4.tar.gz
Mark GError messages for translations
These errors might find their way into a UI.
Diffstat (limited to 'json-glib/json-path.c')
-rw-r--r--json-glib/json-path.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index 4ed232f..4be1909 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -372,15 +372,16 @@ json_path_compile (JsonPath *path,
{
g_set_error_literal (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Multiple roots");
+ _("Only one root node is allowed in a JSONPath expression"));
return FALSE;
}
if (!(*(p + 1) == '.' || *(p + 1) == '['))
{
+ /* translators: the %c is the invalid character */
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Root node followed by '%c'",
+ _("Root node followed by invalid character '%c'"),
*(p + 1));
return FALSE;
}
@@ -486,7 +487,7 @@ json_path_compile (JsonPath *path,
{
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Malformed slice '%*s'",
+ _("Malformed slice expression '%*s'"),
end_p - p,
p + 1);
goto fail;
@@ -530,7 +531,7 @@ json_path_compile (JsonPath *path,
g_array_unref (indices);
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Invalid set definition '%*s'",
+ _("Invalid set definition '%*s'"),
end_p - p,
p + 1);
goto fail;
@@ -583,7 +584,7 @@ json_path_compile (JsonPath *path,
{
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Invalid slice definition '%*s'",
+ _("Invalid slice definition '%*s'"),
end_p - p,
p + 1);
goto fail;
@@ -611,7 +612,7 @@ json_path_compile (JsonPath *path,
{
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- "Invalid array index '%*s'",
+ _("Invalid array index definition '%*s'"),
end_p - p,
p + 1);
goto fail;