Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Dogra <lionaneesh@gmail.com>2012-12-01 14:38:02 (GMT)
committer Aneesh Dogra <lionaneesh@gmail.com>2012-12-01 14:38:02 (GMT)
commit2cee5c84a0c371381bb30bd874a008ea6931631a (patch)
treeb36ddd5a2ef73324c5707cd5fa51ee9a558d3b40
parent2c8362ee1a2238060415b8324f88081782863123 (diff)
Add internationalization (sugarize)
-rwxr-xr-xcommun.py1
-rwxr-xr-xcomposant_notes.py1
-rwxr-xr-xinitialisations.py24
-rwxr-xr-xmodele_data.py2
-rwxr-xr-xtest_modele.py1
5 files changed, 5 insertions, 24 deletions
diff --git a/commun.py b/commun.py
index e0e4e64..281c7e4 100755
--- a/commun.py
+++ b/commun.py
@@ -30,6 +30,7 @@ import gtk
import pango
import modele
+from gettext import gettext as _
#------------------------------------------------------------------------------
diff --git a/composant_notes.py b/composant_notes.py
index e87f679..1ea2b8d 100755
--- a/composant_notes.py
+++ b/composant_notes.py
@@ -29,6 +29,7 @@ from observable import *
from canvas_piano import *
import jouer_notes
+from gettext import gettext as _
#------------------------------------------------------------------------------
diff --git a/initialisations.py b/initialisations.py
index a1d6f12..3d36e84 100755
--- a/initialisations.py
+++ b/initialisations.py
@@ -39,27 +39,3 @@ try:
print "Execution du ramasse-miettes !"
except:
print "Erreur du ramasse-miettes !"
-
-#------------------------------------------------------------------------------
-
-try:
- import os, sys, time
- import locale, gettext
- if os.name == 'nt':
- lang = os.getenv('LANG')
- if lang is None:
- default_lang, default_enc = locale.getdefaultlocale()
- if default_lang:
- lang = default_lang
- if lang:
- os.environ['LANG'] = lang
- pathname = os.path.dirname(sys.argv[0])
- subdir = "/locale"
- localdir = os.path.abspath(pathname) + subdir
- domain = "messages"
- codeset = "utf-8"
- gettext.bind_textdomain_codeset(domain, codeset)
- gettext.install("messages", localdir)
- print "Internationalisation activee (%s) !" %(os.name)
-except:
- print "Erreur du module d'internationalisation !"
diff --git a/modele_data.py b/modele_data.py
index e6190b9..1d2ff3f 100755
--- a/modele_data.py
+++ b/modele_data.py
@@ -26,6 +26,8 @@
from ConfigParser import *
from modele import *
+from gettext import gettext as _
+
#------------------------------------------------------------------------------
# Classes des listes des gammes et des accords
#------------------------------------------------------------------------------
diff --git a/test_modele.py b/test_modele.py
index 5826249..9534579 100755
--- a/test_modele.py
+++ b/test_modele.py
@@ -30,6 +30,7 @@ import jouer_notes
from modele import *
from modele_data import *
+from gettext import gettext as _
#------------------------------------------------------------------------------