From 727ea38d0bc494840a0a1d8eb464b7e0e6cb73ba Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Mon, 11 Jan 2010 17:09:28 +0000 Subject: move ~/.i18n parsing from sugar-emulator to sugar (#1441) The control panel stores locale settings in ~/.i18n, but currently this file is only read by Fedora scripts and sugar-emulator. Parsing it in sugar will make language selection work in "native" sessions on all distros. Signed-off-by: Sascha Silbe --- (limited to 'src/jarabe') 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""" -- cgit v0.9.1