diff options
author | Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk> | 2011-02-14 23:17:00 (GMT) |
---|---|---|
committer | Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk> | 2011-02-14 23:17:00 (GMT) |
commit | d818453567bb23d19ef76a94369c5cae0dde9c2a (patch) | |
tree | e5f8fb2f3ea110a0218db9cbf7e7828e19187aa9 | |
parent | dea1a2451ba7d9097ec1d6a8c94a5c7f5da5402f (diff) |
Add localization support for GNOME version
-rw-r--r-- | TurtleArt/tawindow.py | 5 | ||||
-rwxr-xr-x | turtleart.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index dfaf3a8..c6fe877 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -147,7 +147,10 @@ class TurtleArtWindow(): self.mouse_x = 0 self.mouse_y = 0 - locale.setlocale(locale.LC_NUMERIC, '') + try: + locale.setlocale(locale.LC_NUMERIC, '') + except: + pass self.decimal_point = locale.localeconv()['decimal_point'] if self.decimal_point == '' or self.decimal_point is None: self.decimal_point = '.' diff --git a/turtleart.py b/turtleart.py index b7f4e5c..8c6ae70 100755 --- a/turtleart.py +++ b/turtleart.py @@ -43,7 +43,11 @@ except ImportError, e: argv = sys.argv[:] # Workaround for import behavior of gst in tagplay sys.argv[1:] = [] # Execution of import gst cannot see '--help' or '-h' -from gettext import gettext as _ +import gettext + +gettext.bindtextdomain('org.laptop.TurtleArtActivity', 'locale') +gettext.textdomain('org.laptop.TurtleArtActivity') +_ = gettext.gettext from TurtleArt.taconstants import OVERLAY_LAYER, DEFAULT_TURTLE_COLORS from TurtleArt.tautils import data_to_string, data_from_string, get_save_name |