summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2020-02-14 21:54:21 +0100
committerJonas Dreßler <verdre@v0yd.nl>2021-01-15 09:07:06 +0100
commitf8eeeabd6e22b52b0d08959b8724464434646c09 (patch)
tree360947578a1a974bd424a0aeba21bf0dcd4ef5ff
parentb3c488929a9d0d5f0f5eb7796096c35b22cd9207 (diff)
downloadgvfs-wip/verdre/dialog-titles.tar.gz
Use shorter strings for prompt dialog titleswip/verdre/dialog-titles
The layout of the modal dialogs in gnome-shell changed [1] and the title now is larger and uses the style of a headline. Make sure all titles remain fully visible and use shorter strings for those. Also unify the generic "Enter password" strings a bit to make work easier for translators and use this string for most cases: "Authentication Required\nEnter password for “%s”:" [1] https://gitlab.gnome.org/GNOME/gnome-shell/issues/1343
-rw-r--r--daemon/gvfsafpserver.c15
-rw-r--r--daemon/gvfsbackendafc.c4
-rw-r--r--daemon/gvfsbackenddav.c5
-rw-r--r--daemon/gvfsbackendftp.c6
-rw-r--r--daemon/gvfsbackendsftp.c18
-rw-r--r--daemon/gvfsbackendsmb.c16
-rw-r--r--daemon/gvfsbackendsmbbrowse.c16
-rw-r--r--daemon/gvfsdaemonutils.c4
-rw-r--r--monitor/udisks2/gvfsudisks2volume.c9
9 files changed, 58 insertions, 35 deletions
diff --git a/daemon/gvfsafpserver.c b/daemon/gvfsafpserver.c
index a8eeb824..a3ab24ca 100644
--- a/daemon/gvfsafpserver.c
+++ b/daemon/gvfsafpserver.c
@@ -1053,22 +1053,17 @@ g_vfs_afp_server_login (GVfsAfpServer *server,
gboolean aborted;
g_free (prompt);
+ g_clear_error (&err);
str = g_string_new (NULL);
- if (err)
- {
- g_string_append_printf (str, "%s\n", err->message);
- g_clear_error (&err);
- }
-
/* create prompt */
if (initial_user)
- /* translators: %s here is the hostname */
- g_string_append_printf (str, _("Enter your password for the server “%s”."), server_name);
+ /* Translators: the first %s is the username, the second the host name */
+ g_string_append_printf (str, _("Authentication Required\nEnter password for “%s” on “%s”:"), initial_user, server_name);
else
- /* translators: %s here is the hostname */
- g_string_append_printf (str, _("Enter your name and password for the server “%s”."), server_name);
+ /* Translators: %s here is the hostname */
+ g_string_append_printf (str, _("Authentication Required\nEnter user and password for “%s”:"), server_name);
prompt = g_string_free (str, FALSE);
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index b34e16ec..88817703 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -574,7 +574,7 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
/* translators:
* %s is the device name. 'Try again' is the caption of the button
* shown in the dialog which is defined above. */
- message = g_strdup_printf (_("The device “%s” is locked. Enter the passcode on the device and click “Try again”."), display_name);
+ message = g_strdup_printf (_("Device Locked\nThe device “%s” is locked.\n\nEnter the passcode on the device and click “Try again”."), display_name);
}
else if (lerr == LOCKDOWN_E_PAIRING_DIALOG_RESPONSE_PENDING)
{
@@ -582,7 +582,7 @@ g_vfs_backend_afc_mount (GVfsBackend *backend,
* %s is the device name. 'Try again' is the caption of the button
* shown in the dialog which is defined above. 'Trust' is the caption
* of the button shown in the device. */
- message = g_strdup_printf (_("The device “%s” is not trusted yet. Select “Trust” on the device and click “Try again”."), display_name);
+ message = g_strdup_printf (_("Untrusted Device\nThe device “%s” is not trusted yet.\n\nSelect “Trust” on the device and click “Try again”."), display_name);
}
else
g_assert_not_reached ();
diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c
index 4ac94aca..ce25fc66 100644
--- a/daemon/gvfsbackenddav.c
+++ b/daemon/gvfsbackenddav.c
@@ -1588,10 +1588,11 @@ soup_authenticate_interactive (SoupSession *session,
if (realm == NULL)
realm = _("WebDAV share");
- prompt = g_strdup_printf (_("Enter password for %s"), realm);
+ /* Translators: %s is the name of the WebDAV share */
+ prompt = g_strdup_printf (_("Authentication Required\nEnter password for “%s”:"), realm);
}
else
- prompt = g_strdup (_("Please enter proxy password"));
+ prompt = g_strdup (_("Authentication Required\nEnter proxy password:"));
if (info->username == NULL)
pw_ask_flags |= G_ASK_PASSWORD_NEED_USERNAME;
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 1d9de93a..0654584d 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -527,10 +527,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 %s on %s"), ftp->user, ftp->host_display_name);
+ prompt = g_strdup_printf (_("Authentication Required\nEnter 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 %s"), ftp->host_display_name);
+ /* Translators: %s here is the hostname */
+ prompt = g_strdup_printf (_("Authentication Required\nEnter user and password for “%s”:"), ftp->host_display_name);
}
flags = G_ASK_PASSWORD_NEED_PASSWORD;
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 1bb4a673..fc2f16cf 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -1160,17 +1160,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 secure key for %s on %s"), op_backend->user, op_backend->host);
+ prompt = g_strdup_printf (_("Authentication Required\nEnter 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 %s on %s"), op_backend->user, hostname ? hostname : op_backend->host);
+ prompt = g_strdup_printf (_("Authentication Required\nEnter password for “%s” on “%s”:"), op_backend->user, hostname ? hostname : op_backend->host);
else
if (strcmp (authtype, "publickey") == 0)
/* Translators: %s is the hostname */
- prompt = g_strdup_printf (_("Enter passphrase for secure key for %s"), op_backend->host);
+ prompt = g_strdup_printf (_("Authentication Required\nEnter passphrase for secure key for “%s”:"), op_backend->host);
else
/* Translators: %s is the hostname */
- prompt = g_strdup_printf (_("Enter password for %s"), hostname ? hostname : op_backend->host);
+ prompt = g_strdup_printf (_("Authentication Required\nEnter user and password for “%s”:"), hostname ? hostname : op_backend->host);
if (!g_mount_source_ask_password (mount_source,
prompt,
@@ -1275,8 +1275,10 @@ handle_login (GVfsBackend *backend,
get_hostname_and_fingerprint_from_line (buffer, &hostname, &fingerprint);
- message = g_strdup_printf (_("Can’t verify the identity of “%s”.\n"
- "This happens when you log in to a computer the first time.\n\n"
+ /* Translators: the first %s is the hostname, the second the key fingerprint */
+ message = g_strdup_printf (_("Identity Verification Failed\n"
+ "Verifying the identity of “%s” failed, this happens when "
+ "you log in to a computer the first time.\n\n"
"The identity sent by the remote computer is “%s”. "
"If you want to be absolutely sure it is safe to continue, "
"contact the system administrator."),
@@ -1302,7 +1304,9 @@ handle_login (GVfsBackend *backend,
get_hostname_and_ip_address (buffer, &hostname, &ip_address);
- message = g_strdup_printf (_("The host key for “%s” differs from the key for the IP address “%s”\n"
+ /* Translators: the first %s is the hostname, the second is an ip address */
+ message = g_strdup_printf (_("Identity Verification Failed\n"
+ "The host key for “%s” differs from the key for the IP address “%s”\n"
"If you want to be absolutely sure it is safe to continue, "
"contact the system administrator."),
hostname ? hostname : op_backend->host,
diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c
index 01b1de79..5146ace8 100644
--- a/daemon/gvfsbackendsmb.c
+++ b/daemon/gvfsbackendsmb.c
@@ -263,9 +263,19 @@ auth_callback (SMBCCTX *context,
g_debug ("auth_callback - asking for password...\n");
- /* translators: First %s is a share name, second is a server name */
- message = g_strdup_printf (_("Password required for share %s on %s"),
- share_name, server_name);
+ if (backend->user)
+ {
+ /* Translators: First %s is a share name, second is a server name */
+ message = g_strdup_printf (_("Authentication Required\nEnter password for share “%s” on “%s”:"),
+ share_name, server_name);
+ }
+ else
+ {
+ /* Translators: First %s is a share name, second is a server name */
+ message = g_strdup_printf (_("Authentication Required\nEnter user and password for share “%s” on “%s”:"),
+ share_name, server_name);
+ }
+
handled = g_mount_source_ask_password (backend->mount_source,
message,
username_out,
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
index 3b11883e..0bbbe6a9 100644
--- a/daemon/gvfsbackendsmbbrowse.c
+++ b/daemon/gvfsbackendsmbbrowse.c
@@ -367,9 +367,19 @@ auth_callback (SMBCCTX *context,
g_debug ("auth_callback - asking for password...\n");
- /* translators: %s is a server name */
- message = g_strdup_printf (_("Password required for %s"),
- server_name);
+ if (backend->user)
+ {
+ /* Translators: %s is a server name */
+ message = g_strdup_printf (_("Authentication Required\nEnter password for “%s”:"),
+ server_name);
+ }
+ else
+ {
+ /* Translators: %s is a server name */
+ message = g_strdup_printf (_("Authentication Required\nEnter user and password for “%s”:"),
+ server_name);
+ }
+
handled = g_mount_source_ask_password (backend->mount_source,
message,
username_out,
diff --git a/daemon/gvfsdaemonutils.c b/daemon/gvfsdaemonutils.c
index 5292ba4a..e50e186a 100644
--- a/daemon/gvfsdaemonutils.c
+++ b/daemon/gvfsdaemonutils.c
@@ -332,7 +332,9 @@ gvfs_accept_certificate (GMountSource *mount_source,
certificate_str = certificate_to_string (certificate);
reason = certificate_flags_to_string (errors);
- message = g_strdup_printf (_("The site’s identity can’t be verified:"
+
+ /* Translators: The first %s is the reason why verification failed, the second a certificate */
+ message = g_strdup_printf (_("Identity Verification Failed\n"
"%s\n\n"
"%s\n\n"
"Are you really sure you would like to continue?"),
diff --git a/monitor/udisks2/gvfsudisks2volume.c b/monitor/udisks2/gvfsudisks2volume.c
index 8c0794d7..30078846 100644
--- a/monitor/udisks2/gvfsudisks2volume.c
+++ b/monitor/udisks2/gvfsudisks2volume.c
@@ -1496,13 +1496,14 @@ do_unlock (GTask *task)
task);
if (g_strcmp0 (type, "crypto_unknown") == 0)
/* Translators: %s is the description of the volume that is being unlocked */
- message = g_strdup_printf (_("Enter a passphrase to unlock the volume\n"
- "The volume %s might be a VeraCrypt volume as it contains random data."),
+ message = g_strdup_printf (_("Authentication Required\n"
+ "A passphrase is needed to access encrypted data on “%s”.\n"
+ "The volume might be a VeraCrypt volume as it contains random data."),
data->desc_of_encrypted_to_unlock);
else
/* Translators: %s is the description of the volume that is being unlocked */
- message = g_strdup_printf (_("Enter a passphrase to unlock the volume\n"
- "The passphrase is needed to access encrypted data on %s."),
+ message = g_strdup_printf (_("Authentication Required\n"
+ "A passphrase is needed to access encrypted data on “%s”."),
data->desc_of_encrypted_to_unlock);
pw_ask_flags = G_ASK_PASSWORD_NEED_PASSWORD | G_ASK_PASSWORD_SAVING_SUPPORTED;