gcompris r3246 - in branches/GCOMPRIS_8_3: . boards/sounds src/boards src/boards/python src/boards/python/admin



Author: bcoudoin
Date: Thu Feb 14 00:54:42 2008
New Revision: 3246
URL: http://svn.gnome.org/viewvc/gcompris?rev=3246&view=rev

Log:
	boards/sounds/<locale>: removed to point to the new common
	svn version instead. Now make update-voices is used to put
	them in the current working directory. It must be updated
	before a make dist.

	Merge of trunk 3242
	Windows issue. Translation was broken in all python modules.
	Now use the gcompris gettext instead of the python one.

	Merged from GCompris trunk 3238:
	* src/boards/python/mosaic.py: fixed a major bug. this activity was making GCompris
	  crash one you clicked on the grey target button.



Modified:
   branches/GCOMPRIS_8_3/ChangeLog
   branches/GCOMPRIS_8_3/Makefile.am
   branches/GCOMPRIS_8_3/boards/sounds/HOWTO_ENCODE
   branches/GCOMPRIS_8_3/src/boards/canvas.c
   branches/GCOMPRIS_8_3/src/boards/python/admin/board_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/class_edit.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/class_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/group_edit.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/group_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/group_user_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/log_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module_boards.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module_groups.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module_profiles.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module_reports.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/module_users.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/profile_edit.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/profile_group_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/profile_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/user_edit.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/user_list.py
   branches/GCOMPRIS_8_3/src/boards/python/admin/wordlist.py
   branches/GCOMPRIS_8_3/src/boards/python/administration.py
   branches/GCOMPRIS_8_3/src/boards/python/anim.py
   branches/GCOMPRIS_8_3/src/boards/python/ballcatch.py
   branches/GCOMPRIS_8_3/src/boards/python/chat.py
   branches/GCOMPRIS_8_3/src/boards/python/connect4.py
   branches/GCOMPRIS_8_3/src/boards/python/followline.py
   branches/GCOMPRIS_8_3/src/boards/python/gnumch.py
   branches/GCOMPRIS_8_3/src/boards/python/login.py
   branches/GCOMPRIS_8_3/src/boards/python/mosaic.py
   branches/GCOMPRIS_8_3/src/boards/python/redraw.py
   branches/GCOMPRIS_8_3/src/boards/python/searace.py
   branches/GCOMPRIS_8_3/src/boards/python/sudoku.py
   branches/GCOMPRIS_8_3/src/boards/python/tuxpaint.py
   branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_image_match.py
   branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_missing_match.py
   branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_pattern_admin.py
   branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_template_match.py

Modified: branches/GCOMPRIS_8_3/Makefile.am
==============================================================================
--- branches/GCOMPRIS_8_3/Makefile.am	(original)
+++ branches/GCOMPRIS_8_3/Makefile.am	Thu Feb 14 00:54:42 2008
@@ -81,6 +81,16 @@
 	rm -f intltool-extract intltool-merge intltool-update
 	-rm -fr $(BUNDLE_APPDIR)
 
+update-voices:
+	@if test -d $(PACKAGE_DATA_DIR)/voices; then \
+	  svn up $(PACKAGE_DATA_DIR)/voices; \
+	else \
+	  mkdir $(PACKAGE_DATA_DIR)/voices; \
+	  svn co http://svn.gnome.org/svn/gcompris/voices $(PACKAGE_DATA_DIR)/voices; \
+	fi
+	mv $(PACKAGE_DATA_DIR)/voices/* $(PACKAGE_DATA_DIR)/sounds
+	rm -rf $(PACKAGE_DATA_DIR)/voices
+
 # Creates separates distribution files for the sounds by locale
 dist-sounds:
 	./create_dist_sounds en @ALL_LINGUAS@

Modified: branches/GCOMPRIS_8_3/boards/sounds/HOWTO_ENCODE
==============================================================================
--- branches/GCOMPRIS_8_3/boards/sounds/HOWTO_ENCODE	(original)
+++ branches/GCOMPRIS_8_3/boards/sounds/HOWTO_ENCODE	Thu Feb 14 00:54:42 2008
@@ -1,13 +1,13 @@
 
-This document describes howto create a localized version of the sounds.
+This document describes howto create a localized version of the voices.
 
-1) Create your sounds directory
+1) Create your voices directory
    ----------------------------
-First copy the english sounds as a template in a new directory with you locale name (e.g. my)
-cd boards/sounds
+First copy the english voices as a template in a new directory with you locale name (e.g. my)
+cd boards/voices
 cp -r en my
 
-Provide here voice translation in boards/sounds/my for each english sounds.
+Provide here voice translation in boards/voices/my for each english voice.
 
 2) Recording / Encoding
    --------------------
@@ -24,34 +24,31 @@
 	You may such script if the sound is too low :
 	#!/bin/sh
 	for i; do
-			sox $i modif/$i vol 5.0 amplitude 0.05
+	  sox $i modif/$i vol 5.0 amplitude 0.05
 	done
-- Transforming stereo to mono if needed
-        sox y.wav -c 1 y2.wav
 
-- Transforming to 44100 Hz if needed
-        sox y.ogg -r 44100 y2.ogg
+- In the directory where WAV files are run do:
+        oggenc -q0 --downmix -a "(name of author) -d "date of recording" \
+               -c "copyright=Copyright 2002 (name of author). This file is distributed under the terms of the GNU General Public License, either version 2 or ( at your option) any later version. See the file COPYING for details." \
+               *.wav
 
-- In the directory where WAV files are run i
-        oggenc -c "Copyright 2002 (name of author). This file is distributed under the terms of the GNU General Public License, either version 2 or ( at your option) any later version. See the file COPYING for details." *.wav
-	if ogginfo doesn't show you the comment, replace the -c to -a to store
-	the copyright in the author field
+	ogginfo should display the comment.
 
 - Copy OGG files in the corresponding directory
 
 - Normalize them so that the all have the same volume level (replace ll by your locale)
-        cd boards/sounds/
+        cd boards/voices/
         normalize-ogg ll/*/*.ogg
 
 3) Shipping
    --------
-Once done, the easiest way is to tar all this files and send them to the gcompris maitainer.
-cd boards/sounds
-tar -cvzf sounds_my.tgz my
+Once done, the easiest way is to tar all this files and send them to the gcompris maintainer.
+cd boards/voices
+tar -cvzf voices_my.tgz my
 
 4) Integration
    -----------
-Nothing has to be done, just run 'make install' at GCompris to level. The sounds
+Nothing has to be done, just run 'make install' at GCompris to level. The voices
 will be installed in the proper directory and GCompris will play them.
 Run gcompris in your locale and you should ear your voices.
 

Modified: branches/GCOMPRIS_8_3/src/boards/canvas.c
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/canvas.c	(original)
+++ branches/GCOMPRIS_8_3/src/boards/canvas.c	Thu Feb 14 00:54:42 2008
@@ -7,7 +7,6 @@
 typedef int Py_ssize_t;
 #endif
 
-#line 4 "canvas.override"
 #include <Python.h>
 
 #define NO_IMPORT_PYGOBJECT
@@ -66,7 +65,6 @@
 
 #endif
 
-#line 67 "canvas.c"
 
 
 /* ---------- types from other modules ---------- */
@@ -158,7 +156,6 @@
 
 /* ----------- GnomeCanvas ----------- */
 
-#line 262 "canvas.override"
 static int
 _wrap_gnome_canvas_new(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -181,7 +178,6 @@
     pygobject_register_wrapper((PyObject *)self);
     return 0;
 }
-#line 182 "canvas.c"
 
 
 static PyObject *
@@ -220,7 +216,6 @@
     return Py_None;
 }
 
-#line 237 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_get_scroll_region(PyGObject *self, PyObject *args)
 {
@@ -231,7 +226,6 @@
 
     return Py_BuildValue("(dddd)", x1, y1, x2, y2);
 }
-#line 232 "canvas.c"
 
 
 static PyObject *
@@ -270,7 +264,6 @@
     return Py_None;
 }
 
-#line 249 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_get_scroll_offsets(PyGObject *self, PyObject *args)
 {
@@ -280,7 +273,6 @@
 
     return Py_BuildValue("(ii)", cx, cy);
 }
-#line 281 "canvas.c"
 
 
 static PyObject *
@@ -305,7 +297,6 @@
     return pygobject_new((GObject *)ret);
 }
 
-#line 440 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_w2c_affine(PyGObject *self, PyObject *args) {
     PyObject *py_affine;
@@ -320,10 +311,8 @@
 
     return gnomecanvasaffine_from_value(affine);
 }
-#line 321 "canvas.c"
 
 
-#line 286 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_w2c(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -338,10 +327,8 @@
 
     return Py_BuildValue("(ii)", cx, cy);
 }
-#line 339 "canvas.c"
 
 
-#line 302 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_w2c_d(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -356,10 +343,8 @@
 
     return Py_BuildValue("(dd)", cx, cy);
 }
-#line 357 "canvas.c"
 
 
-#line 318 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_c2w(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -374,10 +359,8 @@
 
     return Py_BuildValue("(dd)", wx, wy);
 }
-#line 375 "canvas.c"
 
 
-#line 334 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_window_to_world(PyGObject *self, PyObject *args,
 				   PyObject *kwargs)
@@ -394,10 +377,8 @@
 
     return Py_BuildValue("(dd)", worldx, worldy);
 }
-#line 395 "canvas.c"
 
 
-#line 352 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_world_to_window(PyGObject *self, PyObject *args,
 				   PyObject *kwargs)
@@ -414,7 +395,6 @@
 
     return Py_BuildValue("(dd)", winx, winy);
 }
-#line 415 "canvas.c"
 
 
 static PyObject *
@@ -549,7 +529,6 @@
 
 /* ----------- GnomeCanvasItem ----------- */
 
-#line 140 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_set (PyGObject *self, PyObject *args,
 			     PyObject *kwargs)
@@ -603,7 +582,6 @@
     Py_INCREF(Py_None);
     return Py_None;
 }
-#line 604 "canvas.c"
 
 
 static PyObject *
@@ -619,7 +597,6 @@
     return Py_None;
 }
 
-#line 389 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_affine_relative(PyGObject *self, PyObject *args) {
     PyObject *py_affine;
@@ -637,10 +614,8 @@
     Py_INCREF(Py_None);
     return Py_None;
 }
-#line 638 "canvas.c"
 
 
-#line 370 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_affine_absolute(PyGObject *self, PyObject *args) {
     PyObject *py_affine;
@@ -658,7 +633,6 @@
     Py_INCREF(Py_None);
     return Py_None;
 }
-#line 659 "canvas.c"
 
 
 static PyObject *
@@ -719,7 +693,6 @@
     return Py_None;
 }
 
-#line 195 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_w2i(PyGObject *self, PyObject *args,
 			    PyObject *kwargs)
@@ -733,10 +706,8 @@
 
     return Py_BuildValue("(dd)", x, y);
 }
-#line 734 "canvas.c"
 
 
-#line 210 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_i2w(PyGObject *self, PyObject *args,
 			    PyObject *kwargs)
@@ -750,10 +721,8 @@
 
     return Py_BuildValue("(dd)", x, y);
 }
-#line 751 "canvas.c"
 
 
-#line 424 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_i2w_affine(PyGObject *self, PyObject *args) {
     PyObject *py_affine;
@@ -768,10 +737,8 @@
 
     return gnomecanvasaffine_from_value(affine);
 }
-#line 769 "canvas.c"
 
 
-#line 408 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_i2c_affine(PyGObject *self, PyObject *args) {
     PyObject *py_affine;
@@ -786,7 +753,6 @@
 
     return gnomecanvasaffine_from_value(affine);
 }
-#line 787 "canvas.c"
 
 
 static PyObject *
@@ -802,7 +768,6 @@
     return Py_None;
 }
 
-#line 581 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_grab(PyGObject *self, PyObject *args,
 			     PyObject *kwargs)
@@ -841,7 +806,6 @@
 
     return PyInt_FromLong(retval);
 }
-#line 842 "canvas.c"
 
 
 static PyObject *
@@ -852,7 +816,6 @@
     return Py_None;
 }
 
-#line 225 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_get_bounds(PyGObject *self, PyObject *args)
 {
@@ -863,7 +826,6 @@
 
     return Py_BuildValue("(dddd)", x1, y1, x2, y2);
 }
-#line 864 "canvas.c"
 
 
 static PyMethodDef _PyGnomeCanvasItem_methods[] = {
@@ -937,7 +899,6 @@
 
 /* ----------- GnomeCanvasGroup ----------- */
 
-#line 73 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_item_new (PyGObject *self, PyObject *args,
 			     PyObject *kwargs)
@@ -1003,7 +964,6 @@
 
     return pygobject_new ((GObject *)item);
 }
-#line 1004 "canvas.c"
 
 
 static PyMethodDef _PyGnomeCanvasGroup_methods[] = {
@@ -1011,7 +971,6 @@
     { NULL, NULL, 0 }
 };
 
-#line 456 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_group__get_item_list(PyGObject *self, void *closure)
 {
@@ -1028,7 +987,6 @@
     return list;
 }
 
-#line 1029 "canvas.c"
 
 
 static PyGetSetDef gnome_canvas_group_getsets[] = {
@@ -1526,7 +1484,6 @@
 
 /* ----------- GnomeCanvasBpath ----------- */
 
-#line 560 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_bpath_set_bpath(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -1546,7 +1503,6 @@
     Py_INCREF(Py_None);
     return Py_None;
 }
-#line 1547 "canvas.c"
 
 
 static PyMethodDef _PyGnomeCanvasBpath_methods[] = {
@@ -1701,7 +1657,6 @@
 
 /* ----------- functions ----------- */
 
-#line 474 "canvas.override"
 static PyObject *
 _wrap_gnome_canvas_path_def_new(PyObject *self, PyObject *args)
 {
@@ -1786,7 +1741,6 @@
     return pyg_boxed_new(GNOME_TYPE_CANVAS_PATH_DEF, path, TRUE, TRUE);
 }
 
-#line 1787 "canvas.c"
 
 
 PyMethodDef pycanvas_functions[] = {
@@ -1836,7 +1790,6 @@
     }
 
 
-#line 1837 "canvas.c"
     pyg_register_boxed(d, "CanvasPathDef", GNOME_TYPE_CANVAS_PATH_DEF, &PyGnomeCanvasPathDef_Type);
     pygobject_register_class(d, "GnomeCanvas", GNOME_TYPE_CANVAS, &PyGnomeCanvas_Type, Py_BuildValue("(O)", &PyGtkLayout_Type));
     pygobject_register_class(d, "GnomeCanvasItem", GNOME_TYPE_CANVAS_ITEM, &PyGnomeCanvasItem_Type, Py_BuildValue("(O)", &PyGtkObject_Type));

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/board_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/board_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/board_list.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 #from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/class_edit.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/class_edit.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/class_edit.py	Thu Feb 14 00:54:42 2008
@@ -1,26 +1,27 @@
 #  gcompris - class_edit.py
-# 
+#
 # Copyright (C) 2005 Bruno Coudoin and Yves Combe
-# 
+#
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
 #   the Free Software Foundation; either version 2 of the License, or
 #   (at your option) any later version.
-# 
+#
 #   This program is distributed in the hope that it will be useful,
 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #   GNU General Public License for more details.
-# 
+#
 #   You should have received a copy of the GNU General Public License
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-# 
+#
 
 
 import gtk
 import gobject
-from gettext import gettext as _
+import gcompris
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite
@@ -52,11 +53,11 @@
         self.class_id = class_id
         self.class_name = class_name
         self.teacher_name = teacher_name
-        
+
         # A pointer to the user_list class
         # Will be called to refresh the list when edit is done
         self.list_class = list_class
-        
+
         self.set_title(_("Editing a Class"))
         self.set_border_width(8)
         self.set_default_size(320, 350)
@@ -67,12 +68,12 @@
         else:
             frame = gtk.Frame(_("Editing a new class"))
             self.new_class = True
-            
+
         # Connect the "destroy" event to close
         # FIXME: This makes the close code beeing called twice
         #        because the close destroy also call close again.
         frame.connect("destroy", self.close)
-        
+
         self.add(frame)
 
         # Main VBOX
@@ -86,7 +87,7 @@
         table.set_row_spacings(0)
         table.set_col_spacings(20)
         vbox.pack_start(table, True, True, 0)
-        
+
         label = gtk.Label(_('Class:'))
         label.set_alignment(0, 0)
         table.attach(label, 0, 1, 0, 1, xoptions=gtk.SHRINK,
@@ -98,7 +99,7 @@
                      xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
 
         # FIXME: How to remove the default selection
-        
+
         # Label and Entry for the teacher name
         label = gtk.Label(_('Teacher:'))
         label.set_alignment(0, 0)
@@ -136,7 +137,7 @@
         treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
 
         sw.add(treeview)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview)
 
@@ -174,7 +175,7 @@
         treeview2.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
 
         sw2.add(treeview2)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview2)
 
@@ -185,7 +186,7 @@
         vbox.pack_start(gtk.HSeparator(), False, False, 0)
 
         bbox = gtk.HBox(homogeneous=False, spacing=8)
-        
+
         button = gtk.Button(stock='gtk-help')
         bbox.pack_start(button, expand=False, fill=False, padding=0)
 
@@ -198,7 +199,7 @@
         button.connect("clicked", self.close)
 
         vbox.pack_start(bbox, False, False, 0)
-        
+
         # Missing callbacks
         button_delete.connect("clicked", self.remove_user, treeview2)
 
@@ -290,7 +291,7 @@
 
             # Add in the the right view
             self.add_user_in_model(self.model_right, (user_id, user_firstname, user_lastname))
-            
+
             # Save the change in the base
             self.cur.execute('UPDATE users SET class_id=? WHERE user_id=?',
                              (self.class_id, user_id))
@@ -303,7 +304,7 @@
         model = treeview.get_model()
         treestore, paths = treeview.get_selection().get_selected_rows()
         paths.reverse()
-        
+
         for path in paths:
             iter = treestore.get_iter(path)
             path = model.get_path(iter)[0]
@@ -314,7 +315,7 @@
 
             # Add in the the left view
             self.add_user_in_model(self.model_left, (user_id, user_firstname, user_lastname))
-            
+
             # Save the change in the base (1 Is the 'Unselected user' class)
             self.cur.execute('UPDATE users SET class_id=? where user_id=?', (1, user_id))
             self.con.commit()
@@ -328,7 +329,7 @@
                                self.class_name,
                                self.teacher_name)
         self.destroy()
-        
+
     # Done, can quit this dialog with saving
     #
     def ok(self, button):
@@ -376,7 +377,7 @@
     # Make the necessary checks and create the class in the base
     #
     def create_class(self):
-                
+
         # Check the login do not exist already
         self.cur.execute('SELECT name FROM class WHERE name=?',
                          (self.entry_class.get_text(),))

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/class_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/class_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/class_list.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/group_edit.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/group_edit.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/group_edit.py	Thu Feb 14 00:54:42 2008
@@ -1,26 +1,27 @@
 #  gcompris - group_edit.py
-# 
+#
 # Copyright (C) 2005 Bruno Coudoin and Yves Combe
-# 
+#
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
 #   the Free Software Foundation; either version 2 of the License, or
 #   (at your option) any later version.
-# 
+#
 #   This program is distributed in the hope that it will be useful,
 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #   GNU General Public License for more details.
-# 
+#
 #   You should have received a copy of the GNU General Public License
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-# 
+#
 
 
 import gtk
 import gobject
-from gettext import gettext as _
+import gcompris
+from gcompris import gcompris_gettext as _
 
 import group_user_list
 
@@ -52,11 +53,11 @@
 
         self.group_id = group_id
         self.class_id = class_id
-        
+
         # A pointer to the group_user_list class
         # Will be called to refresh the list when edit is done
         self.group_user = group_user
-        
+
         self.set_title(_("Editing a Group"))
         self.set_border_width(8)
         self.set_default_size(320, 350)
@@ -74,7 +75,7 @@
 
 
         self.add(frame)
-        
+
         # Main VBOX
         vbox = gtk.VBox(False, 8)
         vbox.set_border_width(8)
@@ -86,7 +87,7 @@
         table.set_row_spacings(0)
         table.set_col_spacings(20)
         vbox.pack_start(table, True, True, 0)
-        
+
         label = gtk.Label(_('Group:'))
         label.set_alignment(0, 0)
         table.attach(label, 0, 1, 0, 1, xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
@@ -97,7 +98,7 @@
                      xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
 
         # FIXME: How to remove the selection
-        
+
         # Label and Entry for the first name
         label = gtk.Label(_('Description:'))
         label.set_alignment(0, 0)
@@ -134,9 +135,9 @@
         treeview.set_rules_hint(True)
         treeview.set_search_column(COLUMN_FIRSTNAME)
         treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
-        
+
         sw.add(treeview)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview)
 
@@ -177,7 +178,7 @@
         treeview2.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
 
         sw2.add(treeview2)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview2)
 
@@ -188,7 +189,7 @@
         vbox.pack_start(gtk.HSeparator(), False, False, 0)
 
         bbox = gtk.HBox(homogeneous=False, spacing=8)
-        
+
         button = gtk.Button(stock='gtk-help')
         bbox.pack_start(button, expand=False, fill=False, padding=0)
 
@@ -246,7 +247,7 @@
             self.cur.execute('SELECT * FROM list_users_in_groups WHERE group_id=? AND user_id=?',
                              (group_id, user[0]))
             user_is_already = self.cur.fetchall()
-            
+
             if(with and user_is_already):
                 self.add_user_in_model(model, user)
             elif(not with and not user_is_already):
@@ -258,7 +259,7 @@
     def __add_columns(self, treeview):
 
         model = treeview.get_model()
-        
+
         # columns for first name
         renderer = gtk.CellRendererText()
         renderer.set_data("column", COLUMN_FIRSTNAME)
@@ -287,15 +288,15 @@
     def add_user(self, button, treeview):
 
         model = treeview.get_model()
-        
+
         treestore, paths = treeview.get_selection().get_selected_rows()
-        
+
         paths.reverse()
-        
+
         for path in paths:
-            
+
             iter = treestore.get_iter(path)
-            
+
             path = model.get_path(iter)[0]
             user_id        = model.get_value(iter, COLUMN_USERID)
             user_firstname = model.get_value(iter, COLUMN_FIRSTNAME)
@@ -304,7 +305,7 @@
 
             # Add in the the right view
             self.add_user_in_model(self.model_right, (user_id, user_firstname, user_lastname))
-            
+
             # Save the change in the base
             self.cur.execute('INSERT OR REPLACE INTO list_users_in_groups (group_id, user_id) VALUES (?, ?)',
                              (self.group_id, user_id))
@@ -316,15 +317,15 @@
     def remove_user(self, button, treeview):
 
         model = treeview.get_model()
-        
+
         treestore, paths = treeview.get_selection().get_selected_rows()
-        
+
         paths.reverse()
-        
+
         for path in paths:
-            
+
             iter = treestore.get_iter(path)
-            
+
             path = model.get_path(iter)[0]
             user_id        = model.get_value(iter, COLUMN_USERID)
             user_firstname = model.get_value(iter, COLUMN_FIRSTNAME)
@@ -333,7 +334,7 @@
 
             # Add in the the left view
             self.add_user_in_model(self.model_left, (user_id, user_firstname, user_lastname))
-            
+
             # Save the change in the base
             self.cur.execute('delete from list_users_in_groups where group_id=? and user_id=?',
                              (self.group_id, user_id))
@@ -346,7 +347,7 @@
     def close(self, button):
         self.group_user.reload_group()
         self.destroy()
-        
+
     # Done, can quit this dialog with saving
     #
     def ok(self, button):

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/group_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/group_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/group_list.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/group_user_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/group_user_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/group_user_list.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 import constants
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/log_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/log_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/log_list.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,7 @@
 import gcompris.skin
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 class Module:
     """GCompris Administrative Module"""

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module_boards.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module_boards.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module_boards.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gcompris.admin
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 import sys;
 
 # Database

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module_groups.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module_groups.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module_groups.py	Thu Feb 14 00:54:42 2008
@@ -23,7 +23,7 @@
 import gcompris.skin
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module_profiles.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module_profiles.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module_profiles.py	Thu Feb 14 00:54:42 2008
@@ -23,7 +23,7 @@
 import gcompris.skin
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 import module
 import profile_list

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module_reports.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module_reports.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module_reports.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/module_users.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/module_users.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/module_users.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/profile_edit.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/profile_edit.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/profile_edit.py	Thu Feb 14 00:54:42 2008
@@ -1,26 +1,27 @@
 #  gcompris - profile_edit.py
-# 
+#
 # Copyright (C) 2005 Bruno Coudoin and Yves Combe
-# 
+#
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
 #   the Free Software Foundation; either version 2 of the License, or
 #   (at your option) any later version.
-# 
+#
 #   This program is distributed in the hope that it will be useful,
 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #   GNU General Public License for more details.
-# 
+#
 #   You should have received a copy of the GNU General Public License
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-# 
+#
 
 
 import gtk
 import gobject
-from gettext import gettext as _
+import gcompris
+from gcompris import gcompris_gettext as _
 
 import profile_group_list
 
@@ -55,7 +56,7 @@
         # A pointer to the profile_list_list class
         # Will be called to refresh the list when edit is done
         self.profile_list = profile_list
-        
+
         self.set_title(_("Editing a Profile"))
         self.set_border_width(8)
         self.set_default_size(320, 350)
@@ -71,7 +72,7 @@
 
 
         self.add(frame)
-        
+
         vbox = gtk.VBox(False, 8)
         vbox.set_border_width(8)
         frame.add(vbox)
@@ -82,7 +83,7 @@
         table.set_row_spacings(0)
         table.set_col_spacings(20)
         vbox.pack_start(table, True, True, 0)
-        
+
         label = gtk.Label(_('Profile:'))
         label.set_alignment(0, 0)
         table.attach(label, 0, 1, 0, 1, xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
@@ -93,7 +94,7 @@
                      xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
 
         # FIXME: How to remove the selection
-        
+
         # Label and Entry for the first name
         label = gtk.Label(_('Description:'))
         label.set_alignment(0, 0)
@@ -130,9 +131,9 @@
         treeview.set_rules_hint(True)
         treeview.set_search_column(COLUMN_GROUPNAME)
         treeview.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
-        
+
         sw.add(treeview)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview)
 
@@ -173,7 +174,7 @@
         treeview2.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
 
         sw2.add(treeview2)
-        
+
         # add columns to the tree view
         self.__add_columns(treeview2)
 
@@ -184,7 +185,7 @@
         vbox.pack_start(gtk.HSeparator(), False, False, 0)
 
         bbox = gtk.HBox(homogeneous=False, spacing=8)
-        
+
         button = gtk.Button(stock='gtk-help')
         bbox.pack_start(button, expand=False, fill=False, padding=0)
 
@@ -251,7 +252,7 @@
 
             # Insert the class name in the group
             group = (group[0], class_name, group[1], group[2])
-            
+
             if(with and group_is_already):
                 self.add_group_in_model(model, group)
             elif(not with and not group_is_already):
@@ -262,7 +263,7 @@
     def __add_columns(self, treeview):
 
         model = treeview.get_model()
-        
+
         # columns for class name
         renderer = gtk.CellRendererText()
         renderer.set_data("column", COLUMN_CLASSNAME)
@@ -299,15 +300,15 @@
     def add_group(self, button, treeview):
 
         model = treeview.get_model()
-        
+
         treestore, paths = treeview.get_selection().get_selected_rows()
-        
+
         paths.reverse()
-        
+
         for path in paths:
-            
+
             iter = treestore.get_iter(path)
-            
+
             path = model.get_path(iter)[0]
             group_id           = model.get_value(iter, COLUMN_GROUPID)
             class_name         = model.get_value(iter, COLUMN_CLASSNAME)
@@ -318,7 +319,7 @@
             # Add in the the right view
             self.add_group_in_model(self.model_right,
                                     (group_id, class_name, group_name, group_description))
-            
+
             # Save the change in the base
             self.cur.execute('INSERT OR REPLACE INTO list_groups_in_profiles ' +
                              '(profile_id, group_id) VALUES (?, ?)',
@@ -331,15 +332,15 @@
     def remove_group(self, button, treeview):
 
         model = treeview.get_model()
-        
+
         treestore, paths = treeview.get_selection().get_selected_rows()
-        
+
         paths.reverse()
-        
+
         for path in paths:
-            
+
             iter = treestore.get_iter(path)
-            
+
             path = model.get_path(iter)[0]
             group_id           = model.get_value(iter, COLUMN_GROUPID)
             class_name         = model.get_value(iter, COLUMN_CLASSNAME)
@@ -350,7 +351,7 @@
             # Add in the the left view
             self.add_group_in_model(self.model_left,
                                     (group_id, class_name, group_name, group_description))
-            
+
             # Save the change in the base
             self.cur.execute('DELETE FROM list_groups_in_profiles ' +
                              'WHERE profile_id=? AND group_id=?',
@@ -364,7 +365,7 @@
     def close(self, button):
         self.profile_list.reload_profile()
         self.destroy()
-        
+
     # Done, can quit this dialog with saving
     #
     def ok(self, button):

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/profile_group_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/profile_group_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/profile_group_list.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 import constants
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/profile_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/profile_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/profile_list.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/user_edit.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/user_edit.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/user_edit.py	Thu Feb 14 00:54:42 2008
@@ -1,26 +1,27 @@
 #  gcompris - user_edit.py
-# 
+#
 # Copyright (C) 2005 Bruno Coudoin
-# 
+#
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
 #   the Free Software Foundation; either version 2 of the License, or
 #   (at your option) any later version.
-# 
+#
 #   This program is distributed in the hope that it will be useful,
 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #   GNU General Public License for more details.
-# 
+#
 #   You should have received a copy of the GNU General Public License
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-# 
+#
 
 
 import gtk
 import gobject
-from gettext import gettext as _
+import gcompris
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite
@@ -42,11 +43,11 @@
 
         self.user_id  = user_id
         self.class_id = class_id
-        
+
         # A pointer to the user_list class
         # Will be called to refresh the list when edit is done
         self.list_user = list_user
-        
+
         self.set_title(_("Editing a User"))
         self.set_border_width(8)
         self.set_default_size(320, 250)
@@ -74,7 +75,7 @@
         table.set_row_spacings(0)
         table.set_col_spacings(20)
         vbox.pack_start(table, True, True, 0)
-        
+
         label = gtk.Label(_('Login:'))
         label.set_alignment(0, 0)
         table.attach(label, 0, 1, 0, 1, xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
@@ -84,7 +85,7 @@
         table.attach(self.entry_login, 1, 2, 0, 1, xoptions=gtk.SHRINK, yoptions=gtk.EXPAND)
 
         # FIXME: How to remove the selection
-        
+
         # Label and Entry for the first name
         label = gtk.Label(_('First name:'))
         label.set_alignment(0, 0)
@@ -117,7 +118,7 @@
         vbox.pack_start(gtk.HSeparator(), False, False, 0)
 
         bbox = gtk.HBox(homogeneous=False, spacing=8)
-        
+
         button = gtk.Button(stock='gtk-help')
         bbox.pack_start(button, expand=False, fill=False, padding=0)
 
@@ -130,7 +131,7 @@
         button.connect("clicked", self.close)
 
         vbox.pack_start(bbox, False, False, 0)
-        
+
         # Ready GO
         self.show_all()
 
@@ -144,7 +145,7 @@
     #
     def close(self, button):
         self.destroy()
-        
+
     # Done, can quit this dialog with saving
     #
     def ok(self, button):
@@ -197,4 +198,4 @@
         self.list_user.reload(self.class_id)
 
         self.destroy()
-        
+

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/user_list.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/user_list.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/user_list.py	Thu Feb 14 00:54:42 2008
@@ -23,7 +23,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # Database
 from pysqlite2 import dbapi2 as sqlite

Modified: branches/GCOMPRIS_8_3/src/boards/python/admin/wordlist.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/admin/wordlist.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/admin/wordlist.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,7 @@
 import gtk
 import gtk.gdk
 import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 import glob
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/administration.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/administration.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/administration.py	Thu Feb 14 00:54:42 2008
@@ -23,7 +23,7 @@
 import gcompris.skin
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # To add a panel, add a python module in the admin subdir
 # This module must have a start() and end() function

Modified: branches/GCOMPRIS_8_3/src/boards/python/anim.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/anim.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/anim.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,6 @@
 # in parameters of graphicals object between shots?
 
 
-from gettext import gettext as _
 # PythonTest Board module
 import gobject
 import gnomecanvas
@@ -34,6 +33,7 @@
 import gcompris.skin
 import gcompris.bonus
 import gcompris.sound
+from gcompris import gcompris_gettext as _
 import gtk
 import gtk.gdk
 import gtk.keysyms

Modified: branches/GCOMPRIS_8_3/src/boards/python/ballcatch.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/ballcatch.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/ballcatch.py	Thu Feb 14 00:54:42 2008
@@ -8,7 +8,7 @@
 import gcompris.sound
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # ----------------------------------------
 # Hit left shift and right shift together to send the ball straight

Modified: branches/GCOMPRIS_8_3/src/boards/python/chat.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/chat.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/chat.py	Thu Feb 14 00:54:42 2008
@@ -16,13 +16,13 @@
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
-from gettext import gettext as _
 import gnomecanvas
 import gcompris
 import gcompris.utils
 import gcompris.bonus
 import gcompris.skin
 import gcompris.sound
+from gcompris import gcompris_gettext as _
 import gtk
 import gtk.gdk
 import gobject

Modified: branches/GCOMPRIS_8_3/src/boards/python/connect4.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/connect4.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/connect4.py	Thu Feb 14 00:54:42 2008
@@ -32,7 +32,7 @@
 import gcompris.anim
 import gtk
 import gtk.gdk
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 from  connect4p import rules
 from  connect4p import human
@@ -76,7 +76,7 @@
             x=0.0,
             y=0.0
             )
-        
+
         pixmap = gcompris.utils.load_pixmap(gcompris.skin.image_to_skin("button_reload.png"))
         if(pixmap):
             gcompris.bar_set_repeat_icon(pixmap)
@@ -84,7 +84,7 @@
         else:
             board_bar = board_bar | gcompris.BAR_REPEAT
         gcompris.bar_set(board_bar)
-        
+
         selector = self.rootitem.add(
             gnomecanvas.CanvasPixbuf,
             pixbuf = gcompris.utils.load_pixmap("connect4/back.png"),
@@ -92,7 +92,7 @@
             y=0.0
             )
         selector.connect("event", self.columnItemEvent, 0)
-        
+
         if self.mode == 1:
             self.prof = self.rootitem.add(
                 gnomecanvas.CanvasPixbuf,
@@ -102,13 +102,13 @@
                 )
             self.prof.connect("event", self.profItemEvent, 0)
             self.prof.connect("event", gcompris.utils.item_event_focus)
-        
+
         self.timericon = gcompris.anim.CanvasItem( gcompris.anim.Animation("connect4/sablier.txt"),
             self.rootitem )
         self.timericon.gnomecanvas.hide()
 
         self.player_stone = None
-        
+
         for i in range(2):
             self.rootitem.add(gnomecanvas.CanvasPixbuf,
                 pixbuf = gcompris.utils.load_pixmap("connect4/stone_%d.png" % (i+1)),
@@ -121,9 +121,9 @@
             y=250,
             justification=gtk.JUSTIFY_CENTER,
             fill_color_rgba=0xFF0000FFL)
-        
+
         self.update_scores((0, 0))
-        
+
         self.newGame()
 
     def end(self):
@@ -159,7 +159,7 @@
         if scores: self.scores = list(scores)
         txt = str(self.scores[0]) + "\n\n" + str(self.scores[1])
         self.score_item.set(text=txt)
-        
+
     def stone_init(self):
         if self.player_stone:
             self.player_stone.destroy()
@@ -170,7 +170,7 @@
             y=-20 )
         self.update_stone2()
     def update_stone2(self):
-        self.player_stone.set_property("x", (gcompris.BOARD_WIDTH - self.boardSize) /2 + 
+        self.player_stone.set_property("x", (gcompris.BOARD_WIDTH - self.boardSize) /2 +
             self.keyb_column * self.boardSize / self.nbColumns)
 
     def key_press(self, keyval, commit_str, preedit_str):
@@ -232,7 +232,7 @@
         self.cur_player = 1
         self.stone_init()
         self.update_stone2()
-        
+
         self.timericon.gnomecanvas.hide()
         if self.mode == 1:
             self.prof.show()
@@ -240,7 +240,7 @@
     def columnItemEvent(self, widget, event, columns):
         if self.mode == 1 and self.cur_player == 2: # AI playing
             return False
-        if self.cur_player == 0 or self.timerAnim:  # Game over or Timer animate 
+        if self.cur_player == 0 or self.timerAnim:  # Game over or Timer animate
             return False
         if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
             column = int((event.x - (gcompris.BOARD_WIDTH-self.boardSize)/2.0) // self.stoneSize)
@@ -285,7 +285,7 @@
         if self.mode == 1:
             self.prof.hide()
         move = player.doMove(self.board, numPlayer, column)
-        
+
         if isinstance(move, int) and rules.isMoveLegal(self.board, move):
             self.board.move(move, numPlayer)
             self.drawBoard(self.board)
@@ -297,7 +297,7 @@
         x = self.board.last_move
         y = len(self.board.state[self.board.last_move])-1
         file = "connect4/stone_%d.png" % stone
-        
+
         self.stone = self.boardItem.add(
             gnomecanvas.CanvasPixbuf,
             pixbuf = gcompris.utils.load_pixmap(file),
@@ -334,17 +334,17 @@
         if player == 0:
             gcompris.bonus.display(gcompris.bonus.DRAW, gcompris.bonus.FLOWER)
             return
-   
+
         # Display the winner line
         self.scores[player-1] += 1
         self.update_scores()
-        
+
         points = ( self.winLine[0][0]*(self.boardSize/self.nbColumns)+self.stoneSize/2,
                 (self.boardSize/self.nbColumns)*(self.nbLines-1-self.winLine[0][1])+self.stoneSize/2,
                 self.winLine[1][0]*(self.boardSize/self.nbColumns)+self.stoneSize/2,
                 (self.boardSize/self.nbColumns)*(self.nbLines-1-self.winLine[1][1])+self.stoneSize/2
                 )
-        
+
         self.redLine = self.boardItem.add(
             gnomecanvas.CanvasLine,
             fill_color_rgba=0xFF0000FFL,

Modified: branches/GCOMPRIS_8_3/src/boards/python/followline.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/followline.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/followline.py	Thu Feb 14 00:54:42 2008
@@ -28,7 +28,7 @@
 import gtk.gdk
 import random
 import math
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 # ----------------------------------------
 #

Modified: branches/GCOMPRIS_8_3/src/boards/python/gnumch.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/gnumch.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/gnumch.py	Thu Feb 14 00:54:42 2008
@@ -34,7 +34,7 @@
 import gtk.gdk
 import random
 import math
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 class Number:
     def __init__(self, text, good):

Modified: branches/GCOMPRIS_8_3/src/boards/python/login.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/login.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/login.py	Thu Feb 14 00:54:42 2008
@@ -24,7 +24,7 @@
 import gtk
 import gtk.gdk
 import pango
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 import math
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/mosaic.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/mosaic.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/mosaic.py	Thu Feb 14 00:54:42 2008
@@ -291,8 +291,7 @@
                 y = orig_y + y * (self.palette_item_height + gap_y))
 
               if not colored:
-                item.connect("event", self.set_focus_item_event, (i,
-                                                                  item, palette))
+                item.connect("event", self.set_focus_item_event, (i, palette))
                 self.user_list.append((-1, -1))
               else:
                 self.target_list.append((color_index_x, color_index_y))
@@ -333,13 +332,13 @@
               y = coord_y)
 
             item.connect("event", gcompris.utils.item_event_focus)
-            item.connect("event", self.set_color_item_event, (item, palette_x, palette_y,
+            item.connect("event", self.set_color_item_event, (palette_x, palette_y,
                                                               coord_x, coord_y))
 
 
   # Event when a target square is selected
   def set_focus_item_event(self, item, event, data):
-    (index, box_item, palette)  = data
+    (index, palette)  = data
 
     if event.type == gtk.gdk.BUTTON_PRESS:
       # A color is selected
@@ -350,7 +349,7 @@
                                   self.current_index_y * self.palette_item_height,
                                   self.palette_item_width, self.palette_item_height)
 
-        box_item.set(pixbuf = image)
+        item.set(pixbuf = image)
 
         self.user_list[index] = (self.current_index_x,
                                  self.current_index_y)
@@ -366,7 +365,7 @@
 
     if event.type == gtk.gdk.BUTTON_PRESS:
       gcompris.sound.play_ogg("sounds/paint1.wav");
-      (box_item, color_index_x, color_index_y, coord_x, coord_y) = data
+      (color_index_x, color_index_y, coord_x, coord_y) = data
 
       self.current_index_x = color_index_x
       self.current_index_y = color_index_y

Modified: branches/GCOMPRIS_8_3/src/boards/python/redraw.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/redraw.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/redraw.py	Thu Feb 14 00:54:42 2008
@@ -18,7 +18,6 @@
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
-from gettext import gettext as _
 # PythonTest Board module
 import gnomecanvas
 import gcompris
@@ -30,6 +29,7 @@
 import gtk.gdk
 import copy
 import math
+from gcompris import gcompris_gettext as _
 
 class Gcompris_redraw:
   """The Re-drawing activity"""

Modified: branches/GCOMPRIS_8_3/src/boards/python/searace.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/searace.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/searace.py	Thu Feb 14 00:54:42 2008
@@ -28,7 +28,7 @@
 import random
 import math
 import time
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 class Boat:
   """The Boat Class"""

Modified: branches/GCOMPRIS_8_3/src/boards/python/sudoku.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/sudoku.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/sudoku.py	Thu Feb 14 00:54:42 2008
@@ -25,7 +25,7 @@
 import gtk
 import gtk.gdk
 import random
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 class Gcompris_sudoku:
   """Sudoku game"""

Modified: branches/GCOMPRIS_8_3/src/boards/python/tuxpaint.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/tuxpaint.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/tuxpaint.py	Thu Feb 14 00:54:42 2008
@@ -31,7 +31,7 @@
 import platform
 
 #import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 pid = None
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_image_match.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_image_match.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_image_match.py	Thu Feb 14 00:54:42 2008
@@ -45,7 +45,7 @@
 
 
 #import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 from writing_tutor_common import *
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_missing_match.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_missing_match.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_missing_match.py	Thu Feb 14 00:54:42 2008
@@ -46,7 +46,7 @@
 
 
 #import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 from  writing_tutor_common import *
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_pattern_admin.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_pattern_admin.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_pattern_admin.py	Thu Feb 14 00:54:42 2008
@@ -43,7 +43,7 @@
 import string
 
 
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 from  writing_tutor_common import *
 

Modified: branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_template_match.py
==============================================================================
--- branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_template_match.py	(original)
+++ branches/GCOMPRIS_8_3/src/boards/python/writing_tutor_template_match.py	Thu Feb 14 00:54:42 2008
@@ -47,7 +47,7 @@
 
 
 #import gobject
-from gettext import gettext as _
+from gcompris import gcompris_gettext as _
 
 from  writing_tutor_common import *
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]