First step at activities localization.

This commit is contained in:
Tomeu Vizoso
2007-03-23 10:35:48 +01:00
parent 04654a7eef
commit c820ca1aa6
2 changed files with 13 additions and 1 deletions
+2 -1
View File
@@ -8,4 +8,5 @@ sugar_PYTHON = \
activityservice.py \
bundle.py \
bundlebuilder.py \
bundleregistry.py
bundleregistry.py \
locale.py
+11
View 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