summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2009-06-19 09:36:04 +0200
committerClaude Paroz <claude@2xlibre.net>2009-09-30 17:57:54 +0200
commitebe371a3e0b09bd15d89fab6eb5016abce83d3fc (patch)
tree2abff11181cee5720fb9cfebc06f3f024f9b4fb3 /client
parentc4d0742068cfb8f4a55a27ebc5a1bb7790a50a91 (diff)
downloadgvfs-ebe371a3e0b09bd15d89fab6eb5016abce83d3fc.tar.gz
Bug 517014 – Factorize error messages marked for translation
Diffstat (limited to 'client')
-rw-r--r--client/gdaemonfile.c57
-rw-r--r--client/gvfsiconloadable.c6
2 files changed, 32 insertions, 31 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index efc46b46..e55830aa 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -863,8 +863,9 @@ g_daemon_file_query_info (GFile *file,
if (!dbus_message_iter_init (reply, &iter) ||
(dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRUCT))
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from get_info"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ /* Translators: %s is the name of a programming function */
+ _("Invalid return value from %s"), "get_info");
goto out;
}
@@ -898,7 +899,7 @@ query_info_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from query_info"));
+ _("Invalid return value from %s"), "query_info");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
}
@@ -1013,7 +1014,7 @@ read_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ _("Invalid return value from %s"), "open");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
}
@@ -1091,8 +1092,8 @@ g_daemon_file_read (GFile *file,
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "open");
return NULL;
}
@@ -1154,8 +1155,8 @@ g_daemon_file_append_to (GFile *file,
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "open");
return NULL;
}
@@ -1217,8 +1218,8 @@ g_daemon_file_create (GFile *file,
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "open");
return NULL;
}
@@ -1283,8 +1284,8 @@ g_daemon_file_replace (GFile *file,
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "open");
return NULL;
}
@@ -1346,7 +1347,7 @@ mount_mountable_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from call"));
+ _("Invalid return value from %s"), "call");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
@@ -1363,7 +1364,7 @@ mount_mountable_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from call"));
+ _("Invalid return value from %s"), "call");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
}
@@ -1846,8 +1847,8 @@ g_daemon_file_query_filesystem_info (GFile *file,
if (!dbus_message_iter_init (reply, &iter) ||
(dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRUCT))
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from get_filesystem_info"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "get_filesystem_info");
goto out;
}
@@ -1876,7 +1877,7 @@ query_fs_info_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from query_info"));
+ _("Invalid return value from %s"), "query_info");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
}
@@ -2031,8 +2032,8 @@ g_daemon_file_set_display_name (GFile *file,
G_DBUS_TYPE_CSTRING, &new_path,
0))
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from query_filesystem_info"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "query_filesystem_info");
goto out;
}
@@ -2531,8 +2532,8 @@ g_daemon_file_monitor_dir (GFile* file,
{
g_mount_info_unref (mount_info);
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from monitor_dir"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "monitor_dir");
return NULL;
}
@@ -2580,8 +2581,8 @@ g_daemon_file_monitor_file (GFile* file,
{
g_mount_info_unref (mount_info);
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from monitor_file"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "monitor_file");
return NULL;
}
@@ -2645,7 +2646,7 @@ append_to_async_cb (DBusMessage *reply,
DBUS_TYPE_INVALID))
{
g_simple_async_result_set_error (result, G_IO_ERROR, G_IO_ERROR_FAILED,
- "%s", _("Invalid return value from open"));
+ _("Invalid return value from %s"), "open");
goto failure;
}
@@ -2729,7 +2730,7 @@ create_async_cb (DBusMessage *reply,
DBUS_TYPE_INVALID))
{
g_simple_async_result_set_error (result, G_IO_ERROR, G_IO_ERROR_FAILED,
- "%s", _("Invalid return value from open"));
+ _("Invalid return value from %s"), "open");
goto failure;
}
@@ -2804,7 +2805,7 @@ enumerate_children_async_cb (DBusMessage *reply,
if (reply == NULL || connection == NULL)
{
g_simple_async_result_set_error (result, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Invalid return value from enumerate_children");
+ _("Invalid return value from %s"), "enumerate_children");
goto out;
}
@@ -2992,7 +2993,7 @@ replace_async_cb (DBusMessage *reply,
DBUS_TYPE_INVALID))
{
g_simple_async_result_set_error (result, G_IO_ERROR, G_IO_ERROR_FAILED,
- "%s", _("Invalid return value from open"));
+ _("Invalid return value from %s"), "open");
goto failure;
}
@@ -3072,7 +3073,7 @@ set_display_name_async_cb (DBusMessage *reply,
0))
{
g_simple_async_result_set_error (result, G_IO_ERROR, G_IO_ERROR_FAILED,
- "%s", "Invalid return value from set_display_name");
+ _("Invalid return value from %s"), "set_display_name");
goto out;
}
diff --git a/client/gvfsiconloadable.c b/client/gvfsiconloadable.c
index 28251cf0..50af5809 100644
--- a/client/gvfsiconloadable.c
+++ b/client/gvfsiconloadable.c
@@ -141,8 +141,8 @@ g_vfs_icon_load (GLoadableIcon *icon,
DBUS_TYPE_INVALID))
{
dbus_message_unref (reply);
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open_icon_for_read"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid return value from %s"), "open_icon_for_read");
return NULL;
}
@@ -371,7 +371,7 @@ load_async_cb (DBusMessage *reply,
{
g_simple_async_result_set_error (result,
G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid return value from open"));
+ _("Invalid return value from %s"), "open");
_g_simple_async_result_complete_with_cancellable (result, cancellable);
return;
}