[gtk: 1/2] gtkplacessidebar: Improve error message when unlocking volume fails
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] gtkplacessidebar: Improve error message when unlocking volume fails
- Date: Tue, 7 Aug 2018 10:03:49 +0000 (UTC)
commit 61f50f241058be9fedc70f99718a416605d9252d
Author: segfault <segfault riseup net>
Date: Mon Jul 23 23:35:01 2018 +0200
gtkplacessidebar: Improve error message when unlocking volume fails
gtk/gtkplacessidebar.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 20d32f47d1..97aa807c0d 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -2368,7 +2368,13 @@ volume_mount_cb (GObject *source_object,
error->code != G_IO_ERROR_ALREADY_MOUNTED)
{
name = g_volume_get_name (G_VOLUME (source_object));
- primary = g_strdup_printf (_("Unable to access “%s”"), name);
+ if (g_str_has_prefix (error->message, "Error unlocking"))
+ /* Translators: This means that unlocking an encrypted storage
+ * device failed. %s is the name of the device.
+ */
+ primary = g_strdup_printf (_("Error unlocking “%s”"), name);
+ else
+ primary = g_strdup_printf (_("Unable to access “%s”"), name);
g_free (name);
emit_show_error_message (sidebar, primary, error->message);
g_free (primary);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]