[gcompris] Added support for localized sound



commit b22276cf6e3a6a126983b5703c1db6de1f181726
Author: GunChleoc <fios foramnagaidhlig net>
Date:   Wed Feb 12 01:48:54 2014 +0100

    Added support for localized sound
    
    The 'yummy yummy' gnunch voice can now be translated in
    voices/$LOCALE/misc/eat.wav

 src/gnumch-equality-activity/gnumch.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gnumch-equality-activity/gnumch.py b/src/gnumch-equality-activity/gnumch.py
index f5546dd..900e1b2 100644
--- a/src/gnumch-equality-activity/gnumch.py
+++ b/src/gnumch-equality-activity/gnumch.py
@@ -31,6 +31,7 @@ import gtk
 import gtk.gdk
 import random
 import math
+
 from gcompris import gcompris_gettext as _
 
 class Number:
@@ -380,7 +381,10 @@ class Player(object):
             self.stop()
 
     def startMunching(self):
-        gcompris.sound.play_ogg("sounds/eat.wav")
+        eatfile = gcompris.utils.find_file_absolute("voices/$LOCALE/misc/eat.wav")
+        if(not eatfile):
+            gcompris.sound.play_ogg("sounds/eat.wav")
+
         self.anim.setState(2)
         self.munch_timer = game.timeout_add(game.munch_time, self.stopMunching)
         return False


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