location: Use translated reason string

Gio now has API to look up localized strings from desktop files,
so we can display a correctly translated reason where available.

https://bugzilla.gnome.org/show_bug.cgi?id=779413
This commit is contained in:
Florian Müllner 2018-01-08 16:56:43 +01:00
parent 3f3e514ff2
commit 723c49a8b7

View File

@ -321,7 +321,7 @@ var AppAuthorizer = new Lang.Class({
_userAuthorizeApp: function() { _userAuthorizeApp: function() {
let name = this._app.get_name(); let name = this._app.get_name();
let appInfo = this._app.get_app_info(); let appInfo = this._app.get_app_info();
let reason = appInfo.get_string("X-Geoclue-Reason"); let reason = appInfo.get_locale_string("X-Geoclue-Reason");
this._showAppAuthDialog(name, reason); this._showAppAuthDialog(name, reason);
}, },