diff options
-rw-r--r-- | bin/sugar.in | 5 | ||||
-rw-r--r-- | src/jarabe/util/emulator.py | 21 |
2 files changed, 4 insertions, 22 deletions
diff --git a/bin/sugar.in b/bin/sugar.in index fea79a9..55a085e 100644 --- a/bin/sugar.in +++ b/bin/sugar.in @@ -45,7 +45,10 @@ if ! test -f "$GTK2_RC_FILES"; then exit 1 fi -# Source debug definitions +# Source language settings and debug definitions +if [ -f ~/.i18n ]; then + . ~/.i18n +fi if [ -f ~/.sugar/debug ]; then . ~/.sugar/debug fi diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py index ebfbe9d..b6e161f 100644 --- a/src/jarabe/util/emulator.py +++ b/src/jarabe/util/emulator.py @@ -106,27 +106,6 @@ def _setup_env(): os.environ['STREAM_ENGINE_LOGFILE'] = os.path.join( env.get_profile_path(), 'logs', 'telepathy-stream-engine.log') - path = os.path.join(os.environ.get("HOME"), '.i18n') - if os.path.exists(path): - fd = open(path, "r") - lines = fd.readlines() - fd.close() - - language_env_variable = None - lang_env_variable = None - - for line in lines: - if line.startswith("LANGUAGE="): - lang = line[9:].replace('"', '') - language_env_variable = lang.strip() - elif line.startswith("LANG="): - lang_env_variable = line[5:].replace('"', '') - - # There might be cases where .i18n may not contain a LANGUAGE field - if language_env_variable is not None: - os.environ['LANGUAGE'] = language_env_variable - if lang_env_variable is not None: - os.environ['LANG'] = lang_env_variable def main(): """Script-level operations""" |