authPrompt: Also replace full-width colon

It is used instead of the regular colon in some locales, for
example Chinese.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5716

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2598>
This commit is contained in:
Kolja Lampe 2023-01-20 08:51:46 +01:00 committed by Marge Bot
parent 0c16e09002
commit 096ef1fa9b

View File

@ -309,7 +309,7 @@ var AuthPrompt = GObject.registerClass({
if (question === 'Password:' || question === 'Password: ')
this.setQuestion(_('Password'));
else
this.setQuestion(question.replace(/: *$/, '').trim());
this.setQuestion(question.replace(/[:] *$/, '').trim());
this.updateSensitivity(true);
this.emit('prompted');