Skip to content
Permalink
Browse files

show english help for console if translations not found

  • Loading branch information
alexbruy committed Oct 29, 2012
1 parent d1a5bbf commit ae2c14d78490eb120ef08f28f98c1ae82b72e364
Showing with 4 additions and 15 deletions.
  1. +0 −12 build.xml
  2. +4 −3 python/console_help.py

This file was deleted.

@@ -35,7 +35,7 @@ def __init__(self):
QtGui.QDialog.__init__(self)
self.setModal(True)
self.setupUi()

def setupUi(self):
self.setMaximumSize(500, 300)
self.webView = QtWebKit.QWebView()
@@ -58,15 +58,16 @@ def setupUi(self):
qgisDataDir = QgsApplication.pkgDataPath()
listFile = os.listdir(qgisDataDir + "/python/console_help/i18n")
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
locale = "en_US"
for i in listFile:
lang = i[0:5]
if localeFullName in (lang[0:2], lang):
locale = lang

filename = qgisDataDir + "/python/console_help/help.htm? \
lang=" + locale \
+ "&pkgDir=" + qgisDataDir

url = QtCore.QUrl(filename)
self.webView.load(url)

0 comments on commit ae2c14d

Please sign in to comment.
You can’t perform that action at this time.