mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
This commit is contained in:
parent
95ebbb9360
commit
bcc652632d
1 changed files with 8 additions and 2 deletions
|
|
@ -227,8 +227,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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue