[QGIS Commit] r13100 - trunk/qgis/python
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Mar 20 05:50:59 EDT 2010
Author: borysiasty
Date: 2010-03-20 05:50:58 -0400 (Sat, 20 Mar 2010)
New Revision: 13100
Modified:
trunk/qgis/python/utils.py
Log:
better names for plugin help files: index-ll_CC.html or index-ll.html
Modified: trunk/qgis/python/utils.py
===================================================================
--- trunk/qgis/python/utils.py 2010-03-20 09:48:24 UTC (rev 13099)
+++ trunk/qgis/python/utils.py 2010-03-20 09:50:58 UTC (rev 13100)
@@ -243,6 +243,7 @@
def showPluginHelp(packageName=None,filename="index",section=""):
+ """ show a help in the user's html browser. The help file should be named index-ll_CC.html or index-ll.html"""
try:
source = ""
if packageName is None:
@@ -253,10 +254,14 @@
except:
return
path = os.path.dirname(source)
- locale = str(QLocale().name()).split("_")[0]
+ locale = str(QLocale().name())
helpfile = os.path.join(path,filename+"-"+locale+".html")
if not os.path.exists(helpfile):
- helpfile = os.path.join(path,filename+".html")
+ helpfile = os.path.join(path,filename+"-"+locale.split("_")[0]+".html")
+ if not os.path.exists(helpfile):
+ helpfile = os.path.join(path,filename+"-en.html")
+ if not os.path.exists(helpfile):
+ helpfile = os.path.join(path,filename+"-en_US.html")
if os.path.exists(helpfile):
url = "file://"+helpfile
if section != "":
More information about the QGIS-commit
mailing list