diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-03-23 14:05:42 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-03-23 14:05:42 (GMT) |
commit | a11809cccc5caba31a6fc572b5d561a167269af1 (patch) | |
tree | 9065e2a0c2b354262ff77706ec1a35cf086dce54 | |
parent | 81d216babd32aa30c37932f5c6d766be32c6adb1 (diff) |
Actually setup translations in the shell.
Fix the it translation to use utf8.
-rw-r--r-- | po/it.po | 2 | ||||
-rwxr-xr-x | shell/sugar-shell | 7 | ||||
-rw-r--r-- | sugar/env.py | 3 |
3 files changed, 11 insertions, 1 deletions
@@ -13,7 +13,7 @@ msgstr "" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../services/clipboard/typeregistry.py:29 diff --git a/shell/sugar-shell b/shell/sugar-shell index 753fd67..19bcbae 100755 --- a/shell/sugar-shell +++ b/shell/sugar-shell @@ -18,6 +18,7 @@ import sys import os from ConfigParser import ConfigParser +import gettext import pygtk pygtk.require('2.0') @@ -64,8 +65,14 @@ def _save_session_info(): f.close() +def _setup_translations(): + domain = 'sugar' + gettext.bindtextdomain(domain, env.get_locale_path()) + gettext.textdomain(domain) + _save_session_info() _start_matchbox() +_setup_translations() # Do initial setup if needed key = profile.get_pubkey() diff --git a/sugar/env.py b/sugar/env.py index ed4e72d..00539b5 100644 --- a/sugar/env.py +++ b/sugar/env.py @@ -58,6 +58,9 @@ def get_user_activities_path(): def get_bin_path(path=None): return _get_prefix_path('bin', path) +def get_locale_path(path=None): + return _get_prefix_path('share/locale', path) + def get_service_path(name): return _get_prefix_path('share/sugar/services', name) |