My brain is dead, it really is. Actually setup gettext on the server...
This commit is contained in:
parent
dd6b0c0b7e
commit
e25c95ebaf
@ -20,7 +20,6 @@ import logging
|
|||||||
import dbus
|
import dbus
|
||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
import gettext
|
|
||||||
|
|
||||||
from sugar.presence import PresenceService
|
from sugar.presence import PresenceService
|
||||||
from sugar.activity import bundleregistry
|
from sugar.activity import bundleregistry
|
||||||
@ -70,9 +69,6 @@ class ActivityCreationHandler(gobject.GObject):
|
|||||||
registry = bundleregistry.get_registry()
|
registry = bundleregistry.get_registry()
|
||||||
bundle = registry.get_bundle(service_name)
|
bundle = registry.get_bundle(service_name)
|
||||||
|
|
||||||
gettext.bindtextdomain(self._service_name, bundle.get_locale_path())
|
|
||||||
gettext.textdomain(self._service_name)
|
|
||||||
|
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
proxy_obj = bus.get_object(service_name, bundle.get_object_path(), follow_name_owner_changes=True)
|
proxy_obj = bus.get_object(service_name, bundle.get_object_path(), follow_name_owner_changes=True)
|
||||||
factory = dbus.Interface(proxy_obj, "com.redhat.Sugar.ActivityFactory")
|
factory = dbus.Interface(proxy_obj, "com.redhat.Sugar.ActivityFactory")
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
import gettext
|
||||||
|
|
||||||
import gobject
|
import gobject
|
||||||
import gtk
|
import gtk
|
||||||
@ -93,6 +94,10 @@ def run(bundle_path):
|
|||||||
|
|
||||||
logger.start(bundle.get_name())
|
logger.start(bundle.get_name())
|
||||||
|
|
||||||
|
gettext.bindtextdomain(bundle.get_service_name(),
|
||||||
|
bundle.get_locale_path())
|
||||||
|
gettext.textdomain(bundle.get_service_name())
|
||||||
|
|
||||||
os.environ['SUGAR_BUNDLE_PATH'] = bundle_path
|
os.environ['SUGAR_BUNDLE_PATH'] = bundle_path
|
||||||
os.environ['SUGAR_BUNDLE_SERVICE_NAME'] = bundle.get_service_name()
|
os.environ['SUGAR_BUNDLE_SERVICE_NAME'] = bundle.get_service_name()
|
||||||
os.environ['SUGAR_BUNDLE_DEFAULT_TYPE'] = bundle.get_default_type()
|
os.environ['SUGAR_BUNDLE_DEFAULT_TYPE'] = bundle.get_default_type()
|
||||||
|
Loading…
Reference in New Issue
Block a user