[gnome-games/gnome-2-30] Fix translations in non UTF-8 locale
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/gnome-2-30] Fix translations in non UTF-8 locale
- Date: Wed, 7 Apr 2010 13:40:52 +0000 (UTC)
commit 72187c581bd618832990c348188a00617f067e6b
Author: Robert Ancell <robert ancell gmail com>
Date: Wed Apr 7 23:40:40 2010 +1000
Fix translations in non UTF-8 locale
glchess/src/lib/defaults.py.in | 4 +++-
gnome-sudoku/src/lib/defaults.py.in | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/glchess/src/lib/defaults.py.in b/glchess/src/lib/defaults.py.in
index 2c0e15a..997ccdb 100644
--- a/glchess/src/lib/defaults.py.in
+++ b/glchess/src/lib/defaults.py.in
@@ -7,7 +7,8 @@
import os, os.path
import errno
-import gettext
+import locale
+import gettext
root_dir = os.path.dirname(__file__)
if not os.path.exists(os.path.join(root_dir, 'Makefile.am')):
@@ -42,6 +43,7 @@ else:
GGZ_CONFIG_FILE = os.path.join(GGZ_DIR, 'ggz-gtk.rc')
DOMAIN = 'gnome-games'
+locale.bind_textdomain_codeset(DOMAIN, "UTF-8") # See Bug 608425
gettext.bindtextdomain(DOMAIN, LOCALEDIR)
gettext.textdomain(DOMAIN)
from gettext import gettext as _
diff --git a/gnome-sudoku/src/lib/defaults.py.in b/gnome-sudoku/src/lib/defaults.py.in
index eb1d80b..3ee887c 100644
--- a/gnome-sudoku/src/lib/defaults.py.in
+++ b/gnome-sudoku/src/lib/defaults.py.in
@@ -7,6 +7,7 @@
import sys, os
import errno
+import locale
import gettext
root_dir = os.path.dirname(os.path.dirname(__file__))
@@ -29,6 +30,7 @@ else:
PUZZLE_DIR = BASE_DIR
DOMAIN = 'gnome-games'
+locale.bind_textdomain_codeset(DOMAIN, "UTF-8") # See Bug 608425
gettext.bindtextdomain(DOMAIN, LOCALEDIR)
gettext.textdomain(DOMAIN)
from gettext import gettext as _
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]