[json-glib] Use Unicode in translatable strings
- From: Piotr Drąg <piotrdrag src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] Use Unicode in translatable strings
- Date: Sat, 18 Mar 2017 16:05:14 +0000 (UTC)
commit 5c69617973690bf75cf911f03e2c47f382e4673a
Author: Piotr Drąg <piotrdrag gmail com>
Date: Tue Oct 11 15:18:39 2016 +0200
Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html
https://bugzilla.gnome.org/show_bug.cgi?id=772753
json-glib/json-glib-format.c | 4 ++--
json-glib/json-glib-validate.c | 4 ++--
json-glib/json-gobject.c | 2 +-
json-glib/json-gvariant.c | 6 +++---
json-glib/json-path.c | 12 ++++++------
json-glib/json-reader.c | 26 +++++++++++++-------------
6 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/json-glib/json-glib-format.c b/json-glib/json-glib-format.c
index 177e8b3..52a40ec 100644
--- a/json-glib/json-glib-format.c
+++ b/json-glib/json-glib-format.c
@@ -178,7 +178,7 @@ main (int argc,
*/
g_printerr (_("Error parsing commandline options: %s\n"), error->message);
g_printerr ("\n");
- g_printerr (_("Try \"%s --help\" for more information."), g_get_prgname ());
+ g_printerr (_("Try “%s --help” for more information."), g_get_prgname ());
g_printerr ("\n");
g_error_free (error);
return 1;
@@ -192,7 +192,7 @@ main (int argc,
*/
g_printerr (_("%s: missing files"), g_get_prgname ());
g_printerr ("\n");
- g_printerr (_("Try \"%s --help\" for more information."), g_get_prgname ());
+ g_printerr (_("Try “%s --help” for more information."), g_get_prgname ());
g_printerr ("\n");
return 1;
}
diff --git a/json-glib/json-glib-validate.c b/json-glib/json-glib-validate.c
index 2eb013a..b717275 100644
--- a/json-glib/json-glib-validate.c
+++ b/json-glib/json-glib-validate.c
@@ -135,7 +135,7 @@ main (int argc,
*/
g_printerr (_("Error parsing commandline options: %s\n"), error->message);
g_printerr ("\n");
- g_printerr (_("Try \"%s --help\" for more information."), g_get_prgname ());
+ g_printerr (_("Try “%s --help” for more information."), g_get_prgname ());
g_printerr ("\n");
g_error_free (error);
return 1;
@@ -149,7 +149,7 @@ main (int argc,
*/
g_printerr (_("%s: missing files"), g_get_prgname ());
g_printerr ("\n");
- g_printerr (_("Try \"%s --help\" for more information."), g_get_prgname ());
+ g_printerr (_("Try “%s --help” for more information."), g_get_prgname ());
g_printerr ("\n");
return 1;
}
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 9bbb29b..923f0e1 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -940,7 +940,7 @@ json_gobject_from_data (GType gtype,
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'"),
+ _("Expecting a JSON object, but the root node is of type “%s”"),
json_node_type_name (root));
g_object_unref (parser);
return NULL;
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index afa6405..58694de 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -520,7 +520,7 @@ json_node_assert_type (JsonNode *json_node,
G_IO_ERROR,
G_IO_ERROR_INVALID_DATA,
/* translators: the '%s' is the type name */
- _("Unexpected type '%s' in JSON node"),
+ _("Unexpected type “%s” in JSON node"),
g_type_name (json_node_get_value_type (json_node)));
return FALSE;
}
@@ -618,7 +618,7 @@ json_to_gvariant_tuple (JsonNode *json_node,
g_set_error_literal (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_DATA,
- _("Missing closing symbol ')' in the GVariant tuple type"));
+ _("Missing closing symbol “)” in the GVariant tuple type"));
roll_back = TRUE;
}
else if (json_array_get_length (array) >= i)
@@ -1245,7 +1245,7 @@ json_to_gvariant_recurse (JsonNode *json_node,
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_INVALID_DATA,
- _("GVariant class '%c' not supported"), class);
+ _("GVariant class “%c” not supported"), class);
break;
}
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index ed09e9b..5777f64 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -395,7 +395,7 @@ json_path_compile (JsonPath *path,
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'"),
+ _("Root node followed by invalid character “%c”"),
*(p + 1));
return FALSE;
}
@@ -509,7 +509,7 @@ json_path_compile (JsonPath *path,
{
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- _("Malformed slice expression '%*s'"),
+ _("Malformed slice expression “%*s”"),
(int)(end_p - p),
p + 1);
goto fail;
@@ -553,7 +553,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”"),
(int)(end_p - p),
p + 1);
goto fail;
@@ -606,7 +606,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”"),
(int)(end_p - p),
p + 1);
goto fail;
@@ -634,7 +634,7 @@ json_path_compile (JsonPath *path,
{
g_set_error (error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- _("Invalid array index definition '%*s'"),
+ _("Invalid array index definition “%*s”"),
(int)(end_p - p),
p + 1);
goto fail;
@@ -653,7 +653,7 @@ json_path_compile (JsonPath *path,
{
g_set_error(error, JSON_PATH_ERROR,
JSON_PATH_ERROR_INVALID_QUERY,
- _("Invalid first character '%c'"),
+ _("Invalid first character “%c”"),
*p);
return FALSE;
}
diff --git a/json-glib/json-reader.c b/json-glib/json-reader.c
index cc33629..a4c5838 100644
--- a/json-glib/json-reader.c
+++ b/json-glib/json-reader.c
@@ -471,7 +471,7 @@ json_reader_read_element (JsonReader *reader,
if (!(JSON_NODE_HOLDS_ARRAY (priv->current_node) ||
JSON_NODE_HOLDS_OBJECT (priv->current_node)))
return json_reader_set_error (reader, JSON_READER_ERROR_NO_ARRAY,
- _("The current node is of type '%s', but "
+ _("The current node is of type “%s”, but "
"an array or an object was expected."),
json_node_type_name (priv->current_node));
@@ -483,7 +483,7 @@ json_reader_read_element (JsonReader *reader,
if (index_ >= json_array_get_length (array))
return json_reader_set_error (reader, JSON_READER_ERROR_INVALID_INDEX,
- _("The index '%d' is greater than the size "
+ _("The index “%d” is greater than the size "
"of the array at the current position."),
index_);
@@ -500,7 +500,7 @@ json_reader_read_element (JsonReader *reader,
if (index_ >= json_object_get_size (object))
return json_reader_set_error (reader, JSON_READER_ERROR_INVALID_INDEX,
- _("The index '%d' is greater than the size "
+ _("The index “%d” is greater than the size "
"of the object at the current position."),
index_);
@@ -591,7 +591,7 @@ json_reader_count_elements (JsonReader *reader)
if (!JSON_NODE_HOLDS_ARRAY (priv->current_node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_ARRAY,
- _("The current position holds a '%s' and not an array"),
+ _("The current position holds a “%s” and not an array"),
json_node_type_get_name (JSON_NODE_TYPE (priv->current_node)));
return -1;
}
@@ -667,14 +667,14 @@ json_reader_read_member (JsonReader *reader,
if (!JSON_NODE_HOLDS_OBJECT (priv->current_node))
return json_reader_set_error (reader, JSON_READER_ERROR_NO_OBJECT,
- _("The current node is of type '%s', but "
+ _("The current node is of type “%s”, but "
"an object was expected."),
json_node_type_name (priv->current_node));
object = json_node_get_object (priv->current_node);
if (!json_object_has_member (object, member_name))
return json_reader_set_error (reader, JSON_READER_ERROR_INVALID_MEMBER,
- _("The member '%s' is not defined in the "
+ _("The member “%s” is not defined in the "
"object at the current position."),
member_name);
@@ -755,7 +755,7 @@ json_reader_list_members (JsonReader *reader)
if (!JSON_NODE_HOLDS_OBJECT (priv->current_node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_OBJECT,
- _("The current position holds a '%s' and not an object"),
+ _("The current position holds a “%s” and not an object"),
json_node_type_get_name (JSON_NODE_TYPE (priv->current_node)));
return NULL;
}
@@ -806,7 +806,7 @@ json_reader_count_members (JsonReader *reader)
if (!JSON_NODE_HOLDS_OBJECT (priv->current_node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_OBJECT,
- _("The current position holds a '%s' and not an object"),
+ _("The current position holds a “%s” and not an object"),
json_node_type_get_name (JSON_NODE_TYPE (priv->current_node)));
return -1;
}
@@ -846,7 +846,7 @@ json_reader_get_value (JsonReader *reader)
if (!JSON_NODE_HOLDS_VALUE (node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_VALUE,
- _("The current position holds a '%s' and not a value"),
+ _("The current position holds a “%s” and not a value"),
json_node_type_get_name (JSON_NODE_TYPE (node)));
return NULL;
}
@@ -884,7 +884,7 @@ json_reader_get_int_value (JsonReader *reader)
if (!JSON_NODE_HOLDS_VALUE (node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_VALUE,
- _("The current position holds a '%s' and not a value"),
+ _("The current position holds a “%s” and not a value"),
json_node_type_get_name (JSON_NODE_TYPE (node)));
return 0;
}
@@ -922,7 +922,7 @@ json_reader_get_double_value (JsonReader *reader)
if (!JSON_NODE_HOLDS_VALUE (node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_VALUE,
- _("The current position holds a '%s' and not a value"),
+ _("The current position holds a “%s” and not a value"),
json_node_type_get_name (JSON_NODE_TYPE (node)));
return 0.0;
}
@@ -960,7 +960,7 @@ json_reader_get_string_value (JsonReader *reader)
if (!JSON_NODE_HOLDS_VALUE (node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_VALUE,
- _("The current position holds a '%s' and not a value"),
+ _("The current position holds a “%s” and not a value"),
json_node_type_get_name (JSON_NODE_TYPE (node)));
return NULL;
}
@@ -1005,7 +1005,7 @@ json_reader_get_boolean_value (JsonReader *reader)
if (!JSON_NODE_HOLDS_VALUE (node))
{
json_reader_set_error (reader, JSON_READER_ERROR_NO_VALUE,
- _("The current position holds a '%s' and not a value"),
+ _("The current position holds a “%s” and not a value"),
json_node_type_get_name (JSON_NODE_TYPE (node)));
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]