'clearsilver' dependencies
This commit is contained in:
parent
9990c5ec9f
commit
662be231b9
2 changed files with 8 additions and 2 deletions
|
@ -66,7 +66,10 @@ class CryptoBoxPlugin:
|
||||||
|
|
||||||
|
|
||||||
def getLanguageData(self, lang="en"):
|
def getLanguageData(self, lang="en"):
|
||||||
import neo_cgi, neo_util
|
try:
|
||||||
|
import neo_cgi, neo_util
|
||||||
|
except:
|
||||||
|
raise CryptoBoxExceptions.CBEnvironmentError("couldn't import 'neo_*'! Try 'apt-get install python-clearsilver'.")
|
||||||
langdir = os.path.abspath(os.path.join(self.pluginDir, "lang"))
|
langdir = os.path.abspath(os.path.join(self.pluginDir, "lang"))
|
||||||
## first: the default language file (english)
|
## first: the default language file (english)
|
||||||
langFiles = [os.path.join(langdir, "en.hdf")]
|
langFiles = [os.path.join(langdir, "en.hdf")]
|
||||||
|
|
|
@ -79,7 +79,10 @@ class WebInterfaceDataset(dict):
|
||||||
|
|
||||||
|
|
||||||
def __getLanguageName(self, lang):
|
def __getLanguageName(self, lang):
|
||||||
import neo_cgi, neo_util, neo_cs
|
try:
|
||||||
|
import neo_cgi, neo_util, neo_cs
|
||||||
|
except:
|
||||||
|
raise CryptoBoxExceptions.CBEnvironmentError("couldn't import 'neo_*'! Try 'apt-get install python-clearsilver'.")
|
||||||
hdf_path = os.path.join(self.prefs["Locations"]["LangDir"], lang + ".hdf")
|
hdf_path = os.path.join(self.prefs["Locations"]["LangDir"], lang + ".hdf")
|
||||||
hdf = neo_util.HDF()
|
hdf = neo_util.HDF()
|
||||||
hdf.readFile(hdf_path)
|
hdf.readFile(hdf_path)
|
||||||
|
|
Loading…
Reference in a new issue