[gnome-maps/wip/mlundblad/transit-service-discovery: 12/17] photonGeocode: Use util function to get language



commit 9c9e6e5f437e7c23a50279ef2e1281703c08361d
Author: Marcus Lundblad <ml update uu se>
Date:   Sat Aug 31 12:53:31 2019 +0200

    photonGeocode: Use util function to get language

 src/photonGeocode.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/photonGeocode.js b/src/photonGeocode.js
index a28cd15..980e9b4 100644
--- a/src/photonGeocode.js
+++ b/src/photonGeocode.js
@@ -149,9 +149,7 @@ var PhotonGeocode = class {
 
     _readService() {
         let photon = Service.getService().photonGeocode;
-        let locale = GLib.get_language_names()[0];
-        // the last item returned is the "bare" language
-        let language = GLib.get_locale_variants(locale).slice(-1)[0];
+        let language = Utils.getLanguage();
         let supportedLanguages;
 
         if (photon) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]