diff --git a/custom_news_feed/custom_news_feed.py b/custom_news_feed/custom_news_feed.py index 3df3df8..92202ac 100644 --- a/custom_news_feed/custom_news_feed.py +++ b/custom_news_feed/custom_news_feed.py @@ -24,7 +24,7 @@ import os.path import json -from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, Qt, QTimer, QUrl +from qgis.PyQt.QtCore import QLocale, QTranslator, QCoreApplication, Qt, QTimer, QUrl from qgis.PyQt.QtGui import QIcon, QPixmap, QImage from qgis.PyQt.QtNetwork import QNetworkReply, QNetworkRequest from qgis.core import Qgis, QgsMessageLog, QgsBlockingNetworkRequest, QgsSettings @@ -58,7 +58,7 @@ def __init__(self, iface): self.plugin_dir = os.path.dirname(__file__) # Initialize locale - locale = QSettings().value('locale/userLocale')[0:2] + locale = self.settings.value('locale/userLocale', QLocale().name())[0:2] locale_path = os.path.join( self.plugin_dir, 'i18n', diff --git a/custom_news_feed/metadata.txt b/custom_news_feed/metadata.txt index 3eb001c..a57691c 100644 --- a/custom_news_feed/metadata.txt +++ b/custom_news_feed/metadata.txt @@ -3,7 +3,7 @@ name=Custom News Feed qgisMinimumVersion=3.0 description=This plugin helps you display a newsfeed in QGIS. about=This QGIS plugin lets you display a feed of articles containing a title, date, text, image and link. The information to display is managed in a JSON-file, that can be provided locally or via url. Custom News Feed plugin is helpful if you want to distriubte news articles organisation-wide. -version=1.0.1 +version=1.0.2 author=GeoWerkstatt GmbH email=support@geowerkstatt.ch