[gvfs] Don't include jargon in mount display names and messages



commit a1983951e725e511ae4cb901c19eb7c900cae23d
Author: William Jon McCann <jmccann redhat com>
Date:   Tue Aug 28 09:43:10 2012 -0400

    Don't include jargon in mount display names and messages
    
    The backend protocol isn't necessary in the display name for a
    location. And having it there makes it much harder to actually
    find the user interesting part of the name. Once a mount is connected
    the user interesting part of the name is "what it is" and not
    "how it is accessed".
    
    This is possible now that we aren't using the display name
    to make a unique mount point.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682878

 daemon/gvfsafpvolume.c        |    2 +-
 daemon/gvfsbackendafp.c       |    4 ++--
 daemon/gvfsbackendafpbrowse.c |    4 ++--
 daemon/gvfsbackenddav.c       |    7 ++-----
 daemon/gvfsbackendftp.c       |    8 ++++----
 daemon/gvfsbackendsftp.c      |   15 +++++++--------
 6 files changed, 18 insertions(+), 22 deletions(-)
---
diff --git a/daemon/gvfsafpvolume.c b/daemon/gvfsafpvolume.c
index eccaf9c..fcef081 100644
--- a/daemon/gvfsafpvolume.c
+++ b/daemon/gvfsafpvolume.c
@@ -142,7 +142,7 @@ g_vfs_afp_volume_mount_sync (GVfsAfpVolume *volume,
 generic_error:
   /* Translators: first %s is volumename and second servername */ 
   g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-               _("Couldn't mount AFP volume %s on %s"), volume_name,
+               _("Couldn't load %s on %s"), volume_name,
                g_vfs_afp_server_get_info(priv->server)->server_name);
   return FALSE;
 }
diff --git a/daemon/gvfsbackendafp.c b/daemon/gvfsbackendafp.c
index 3d753f7..679bc2c 100644
--- a/daemon/gvfsbackendafp.c
+++ b/daemon/gvfsbackendafp.c
@@ -2058,12 +2058,12 @@ do_mount (GVfsBackend *backend,
   
   if (afp_backend->user)
     /* Translators: first %s is volumename, second username and third servername */ 
-    display_name = g_strdup_printf (_("AFP volume %s for %s on %s"), 
+    display_name = g_strdup_printf (_("%s for %s on %s"),
                                     afp_backend->volume_name, afp_backend->user,
                                     server_name);
   else
     /* Translators: first %s is volumename and second servername */
-    display_name = g_strdup_printf (_("AFP volume %s on %s"),
+    display_name = g_strdup_printf (_("%s on %s"),
                                     afp_backend->volume_name, server_name);
   
   g_vfs_backend_set_display_name (backend, display_name);
diff --git a/daemon/gvfsbackendafpbrowse.c b/daemon/gvfsbackendafpbrowse.c
index 78c0747..86db10b 100644
--- a/daemon/gvfsbackendafpbrowse.c
+++ b/daemon/gvfsbackendafpbrowse.c
@@ -458,11 +458,11 @@ do_mount (GVfsBackend *backend,
   
   if (afp_backend->user)
     /* Translators: first %s is username and second serververname */
-    display_name = g_strdup_printf (_("AFP volumes for %s on %s"), afp_backend->user,
+    display_name = g_strdup_printf (_("%s on %s"), afp_backend->user,
                                     server_name);
   else
     /* Translators: %s is the servername */
-    display_name = g_strdup_printf (_("AFP volumes on %s"),
+    display_name = g_strdup_printf (_("%s"),
                                     server_name);
   g_vfs_backend_set_display_name (backend, display_name);
   g_free (display_name);
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 4a4143b..1848884 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -482,15 +482,12 @@ g_vfs_backend_dav_setup_display_name (GVfsBackend *backend)
     /* Translators: This is the name of the WebDAV share constructed as
        "WebDAV as <username> on <hostname>:<port>"; the ":<port>" part is
        the second %s and only shown if it is not the default http(s) port. */
-    display_name = g_strdup_printf (_("WebDAV as %s on %s%s"),
+    display_name = g_strdup_printf (_("%s on %s%s"),
 				    mount_base->user,
 				    mount_base->host,
 				    port);
   else
-    /* Translators: This is the name of the WebDAV share constructed as
-       "WebDAV on <hostname>:<port>"; The ":port" part is again the second
-       %s and it is only shown if it is not the default http(s) port. */
-    display_name = g_strdup_printf (_("WebDAV on %s%s"),
+    display_name = g_strdup_printf ("%s%s",
 				    mount_base->host,
 				    port);
 
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 831bcdf..c55640e 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -485,10 +485,10 @@ restart:
         {
           if (ftp->has_initial_user)
             /* Translators: the first %s is the username, the second the host name */
-            prompt = g_strdup_printf (_("Enter password for FTP as %s on %s"), ftp->user, ftp->host_display_name);
+            prompt = g_strdup_printf (_("Enter password for %s on %s"), ftp->user, ftp->host_display_name);
           else
             /* translators: %s here is the hostname */
-            prompt = g_strdup_printf (_("Enter password for FTP on %s"), ftp->host_display_name);
+            prompt = g_strdup_printf (_("Enter password for %s"), ftp->host_display_name);
         }
          
       flags = G_ASK_PASSWORD_NEED_PASSWORD;
@@ -627,11 +627,11 @@ try_login:
     g_mount_spec_set (mount_spec, "user", ftp->user);
      
   if (g_str_equal (ftp->user, "anonymous"))
-    display_name = g_strdup_printf (_("FTP on %s"), ftp->host_display_name);
+    display_name = g_strdup (ftp->host_display_name);
   else
     {
       /* Translators: the first %s is the username, the second the host name */
-      display_name = g_strdup_printf (_("FTP as %s on %s"), ftp->user, ftp->host_display_name);
+      display_name = g_strdup_printf (_("%s on %s"), ftp->user, ftp->host_display_name);
     }
   g_vfs_backend_set_mount_spec (backend, mount_spec);
   g_mount_spec_unref (mount_spec);
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 654ad71..6a59a50 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -951,17 +951,17 @@ handle_login (GVfsBackend *backend,
               if (op_backend->user_specified)
                 if (strcmp (authtype, "publickey") == 0)
                   /* Translators: the first %s is the username, the second the host name */
-                  prompt = g_strdup_printf (_("Enter passphrase for key for ssh as %s on %s"), op_backend->user, op_backend->host);
+                  prompt = g_strdup_printf (_("Enter passphrase for secure key for %s on %s"), op_backend->user, op_backend->host);
                 else
                   /* Translators: the first %s is the username, the second the host name */
-                  prompt = g_strdup_printf (_("Enter password for ssh as %s on %s"), op_backend->user, op_backend->host);
+                  prompt = g_strdup_printf (_("Enter password for %s on %s"), op_backend->user, op_backend->host);
               else
                 if (strcmp (authtype, "publickey") == 0)
                   /* Translators: %s is the hostname */
-                  prompt = g_strdup_printf (_("Enter passphrase for key for ssh on %s"), op_backend->host);
+                  prompt = g_strdup_printf (_("Enter passphrase for secure key for %s"), op_backend->host);
                 else
                   /* Translators: %s is the hostname */
-                  prompt = g_strdup_printf (_("Enter password for ssh on %s"), op_backend->host);
+                  prompt = g_strdup_printf (_("Enter password for %s"), op_backend->host);
 
               if (!g_mount_source_ask_password (mount_source,
                                                 prompt,
@@ -1683,11 +1683,10 @@ do_mount (GVfsBackend *backend,
   g_mount_spec_unref (sftp_mount_spec);
 
   if (op_backend->user_specified_in_uri)
-    /* Translators: This is the name of an SFTP share, like "SFTP for <user> on <hostname>" */
-    display_name = g_strdup_printf (_("SFTP for %s on %s"), op_backend->user, op_backend->host);
+    /* Translators: This is the name of an SFTP share, like "<user> on <hostname>" */
+    display_name = g_strdup_printf (_("%s on %s"), op_backend->user, op_backend->host);
   else
-    /* Translators: This is the name of an SFTP share, like "SFTP on <hostname>" */
-    display_name = g_strdup_printf (_("SFTP on %s"), op_backend->host);
+    display_name = g_strdup (op_backend->host);
   g_vfs_backend_set_display_name (backend, display_name);
   g_free (display_name);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]