Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning message associated to language on Linux #2489

Merged
merged 1 commit into from
Jun 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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