From: Christian Van Wambeke Date: Wed, 27 Jun 2018 13:50:41 +0000 (+0200) Subject: fix inexisting LANG=en_US.utf8 X-Git-Tag: 5.1.0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=105d3f8dbb6e9bc5149d53a7d8f0851ad3d001c8;p=tools%2Fsat.git fix inexisting LANG=en_US.utf8 --- diff --git a/data/templates/Application/config/splash_generator/splash2.py b/data/templates/Application/config/splash_generator/splash2.py index 476904d..1521075 100755 --- a/data/templates/Application/config/splash_generator/splash2.py +++ b/data/templates/Application/config/splash_generator/splash2.py @@ -6,7 +6,12 @@ import os, sys -__LANG__=os.getenv("LANG") + +try: + __LANG__ = os.environ["LANG"] # original locale +except: + __LANG__ = "en_US.utf8" #default + __FR__={ "This script requires the Image, ImageDraw and ImageFont libraries": "Ce script a besoin de Image, ImageDraw et ImageFont python librairies", diff --git a/src/salomeTools.py b/src/salomeTools.py index ef3857e..1ad0b02 100755 --- a/src/salomeTools.py +++ b/src/salomeTools.py @@ -65,7 +65,10 @@ import commands.config as CONFIG # load resources for internationalization gettext.install("salomeTools", os.path.join(srcdir, "i18n")) -_LANG = os.environ["LANG"] # original locale +try: + _LANG = os.environ["LANG"] # original locale +except: + _LANG = "en_US.utf8" #default # The possible hooks : # pre is for hooks to be executed before commands