[gnome-shell/wip/verdre/dialog-strings: 2/2] authPrompt: Use the same hint text as the polkitDialog for the password
- From: verdre <jonasd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/verdre/dialog-strings: 2/2] authPrompt: Use the same hint text as the polkitDialog for the password
- Date: Fri, 14 Feb 2020 22:35:07 +0000 (UTC)
commit 554a275b2965b55ccb46dfac0ca695b7cc5c3478
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Feb 14 22:14:25 2020 +0100
authPrompt: Use the same hint text as the polkitDialog for the password
Be consistent and show the hint for the password entry that we already
show in the polkitDialog in the auth dialog.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/977
js/gdm/authPrompt.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 5515db60d2..d00d1d7856 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -215,8 +215,14 @@ var AuthPrompt = GObject.registerClass({
}
this._updateEntry(secret);
- // HACK: the question comes directly from PAM
- this.setQuestion(question.replace(/: *$/, '…').trim());
+
+ // Hack: The question string comes directly from PAM, if it's "Password:"
+ // we replace it with our own to allow localization, if it's something
+ // else we remove the last colon and any trailing or leading spaces.
+ if (question === 'Password:' || question === 'Password: ')
+ this.setQuestion(_('Password'));
+ else
+ this.setQuestion(question.replace(/: *$/, '').trim());
this.updateSensitivity(true);
this.emit('prompted');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]