First step at activities localization.
This commit is contained in:
parent
04654a7eef
commit
c820ca1aa6
@ -8,4 +8,5 @@ sugar_PYTHON = \
|
||||
activityservice.py \
|
||||
bundle.py \
|
||||
bundlebuilder.py \
|
||||
bundleregistry.py
|
||||
bundleregistry.py \
|
||||
locale.py
|
||||
|
11
sugar/activity/locale.py
Normal file
11
sugar/activity/locale.py
Normal file
@ -0,0 +1,11 @@
|
||||
import gettext
|
||||
import os
|
||||
import logging
|
||||
|
||||
from sugar.activity import activity
|
||||
|
||||
activity_path = activity.get_bundle_path()
|
||||
service_name = os.environ['SUGAR_BUNDLE_SERVICE_NAME']
|
||||
gettext.bindtextdomain(service_name, os.path.join(activity_path, "locale"))
|
||||
gettext.textdomain(service_name)
|
||||
_ = gettext.gettext
|
Loading…
Reference in New Issue
Block a user