Add a config module into the shell holding path informations.
Get rid of env.get_locale_path()
This commit is contained in:
parent
b3cc0bec55
commit
1c361ea5dd
@ -41,6 +41,7 @@ from shellservice import ShellService
|
||||
from hardware import hardwaremanager
|
||||
from intro import intro
|
||||
import logsmanager
|
||||
import config
|
||||
|
||||
def _start_matchbox():
|
||||
cmd = ['matchbox-window-manager']
|
||||
@ -68,8 +69,10 @@ def _save_session_info():
|
||||
f.close()
|
||||
|
||||
def _setup_translations():
|
||||
locale_path = os.path.join(config.prefix, 'share', 'locale')
|
||||
domain = 'sugar'
|
||||
gettext.bindtextdomain(domain, env.get_locale_path())
|
||||
|
||||
gettext.bindtextdomain(domain, locale_path)
|
||||
gettext.textdomain(domain)
|
||||
|
||||
def check_cm(bus_name):
|
||||
|
@ -39,7 +39,10 @@ AC_ARG_ENABLE(update-mimedb,
|
||||
enable_update_mimedb=yes)
|
||||
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
|
||||
|
||||
AC_CONFIG_FILES([bin/sugar], [chmod +x sugar])
|
||||
AC_CONFIG_FILES([
|
||||
bin/sugar
|
||||
shell/config.py
|
||||
], [chmod +x sugar])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
|
@ -77,9 +77,6 @@ def get_user_activities_path():
|
||||
def get_user_library_path():
|
||||
return os.path.expanduser('~/Library')
|
||||
|
||||
def get_locale_path(path=None):
|
||||
return get_prefix_path('share/locale', path)
|
||||
|
||||
def get_service_path(name):
|
||||
return _get_sugar_path('services', name)
|
||||
|
||||
|
@ -2,6 +2,7 @@ SUBDIRS = controlpanel hardware model view intro
|
||||
|
||||
sugardir = $(pkgdatadir)/shell
|
||||
sugar_PYTHON = \
|
||||
config.py \
|
||||
logsmanager.py \
|
||||
shellservice.py
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user