Skip to content

Commit

Permalink
Add debug info
Browse files Browse the repository at this point in the history
References #248
  • Loading branch information
m-kuhn committed Sep 22, 2018
1 parent 2f5ac52 commit 7db1dad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions projectgenerator/qgs_project_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
from projectgenerator.libqgsprojectgen.dataobjects.project import Project
from projectgenerator.libqgsprojectgen.generator.generator import Generator

from qgis.core import QgsProject
from qgis.core import (
QgsProject,
QgsMessageLog
)
from qgis.PyQt.QtWidgets import QAction, QMenu, QMessageBox
from qgis.PyQt.QtCore import QObject, QTranslator, QSettings, QLocale, QCoreApplication, Qt
from qgis.PyQt.QtGui import QIcon
Expand All @@ -52,7 +55,9 @@ def __init__(self, iface):
locale.setlocale(locale.LC_ALL, '')

# initialize translation
qgis_locale = QLocale(QSettings().value('locale/userLocale'))
qgis_locale_id = str(QSettings().value('locale/userLocale'))
QgsMessageLog.logMessage('Running with locale {}'.format(qgis_locale_id), self.tr('Projectgenerator'))
qgis_locale = QLocale(qgis_locale_id)
locale_path = os.path.join(self.plugin_dir, 'i18n')
self.translator = QTranslator()
self.translator.load(qgis_locale, 'projectgenerator', '_', locale_path)
Expand Down

0 comments on commit 7db1dad

Please sign in to comment.