Make gettext optional; if it fails to load, define our own _() method that just returns the string.
This commit is contained in:
parent
e901e72730
commit
39bcfa8d32
|
@ -25,8 +25,12 @@ APP_VERSION = '0.9'
|
||||||
import os, platform, sys, string, time, math
|
import os, platform, sys, string, time, math
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
import gettext
|
try:
|
||||||
gettext.install (APP_NAME)
|
import gettext
|
||||||
|
gettext.install (APP_NAME)
|
||||||
|
except:
|
||||||
|
def _ (text):
|
||||||
|
return text
|
||||||
|
|
||||||
# import unix-lib
|
# import unix-lib
|
||||||
import pwd
|
import pwd
|
||||||
|
|
Loading…
Reference in New Issue