Skip to content

Commit

Permalink
Merge pull request #2489 from goanpeca/language
Browse files Browse the repository at this point in the history
Remove warning message associated to language on Linux
  • Loading branch information
ccordoba12 committed Jun 17, 2015
2 parents ec137a0 + cd39593 commit b70e081
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions spyderlib/baseconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,14 @@ def get_translation(modname, dirname=None):
locale_path = get_module_data_path(dirname, relpath="locale",
attr_name='LOCALEPATH')

# fixup environment var LANG, LANGUAGE
# If LANG is defined in ubuntu, a warning message is displayed, so in unix
# systems we define the LANGUAGE variable.
language = load_lang_conf()
os.environ["LANG"] = language # Works on Windows
os.environ["LANGUAGE"] = language # Works on Linux

if os.name == 'nt':
os.environ["LANG"] = language # Works on Windows
else:
os.environ["LANGUAGE"] = language # Works on Linux

import gettext
try:
_trans = gettext.translation(modname, locale_path, codeset="utf-8")
Expand Down

0 comments on commit b70e081

Please sign in to comment.