Author: remi
Date: 2009-06-23 12:57:36 +0200 (Tue, 23 Jun 2009)
New Revision: 4866

Added:
   software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/
   
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/default.pot
   software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/en.po
   software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/fr.po
Modified:
   
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
Log:
* added translation fixes for tts speaking of some words (skype, etc ...) in 
the menu.

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-06-23 10:17:57 UTC (rev 4865)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-06-23 10:57:36 UTC (rev 4866)
@@ -5,6 +5,8 @@
 
 import time
 
+from translation.Translation import Translation
+
 PGU_CONTEXT_LAYER_USER = 0
 PGU_CONTEXT_LAYER_SCHEDULER = 1
 
@@ -366,6 +368,7 @@
         self.__onDemandDictForThumbnailBarMutex = threading.Lock()
         self.__lastRunStopActionTime = time.time()
         self.__lastRunStopActionTimeMutex = threading.Lock()
+        self.__translations = Translation("tts_fixes")
 
     def insertOnDemand(self, ugc):
         """
@@ -391,8 +394,16 @@
             ugcTtsName = ugc.getDescription().getName()
             locutor = resourcePluginsServer.getPluginsContainer().getLocutor()
             pitch = resourcePluginsServer.getPluginsContainer().getPitch()
+            language = 
resourcePluginsServer.getPluginsContainer().getLanguage()
+            transDict = self.__translations.getTranslations(language)
+            splitedName = ugcTtsName.lower().split(" ")
+            fixedName = ""
+            for i, word in enumerate(splitedName):
+                if transDict.has_key(word):
+                    splitedName[i] = transDict[word]
+                fixedName += splitedName[i] + " "
             resourceTuxDriver.openMouth()
-            resourceTuxOSL.ttsSpeak(ugcTtsName, locutor, pitch)
+            resourceTuxOSL.ttsSpeak(fixedName, locutor, pitch)
             if not eventsHandler.waitCondition(ST_NAME_TTS_SOUND_STATE, ("ON",
                 None), 3.0):
                 return

Added: 
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/default.pot
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/default.pot
                           (rev 0)
+++ 
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/default.pot
   2009-06-23 10:57:36 UTC (rev 4866)
@@ -0,0 +1,14 @@
+msgid "skype"
+msgstr ""
+
+msgid "tux"
+msgstr ""
+
+msgid "tux_droid"
+msgstr ""
+
+msgid "twitter"
+msgstr ""
+
+msgid "facebook"
+msgstr ""

Added: 
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/en.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/en.po 
                        (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/en.po 
2009-06-23 10:57:36 UTC (rev 4866)
@@ -0,0 +1,14 @@
+msgid "skype"
+msgstr "skaipe"
+
+msgid "tux"
+msgstr "tux"
+
+msgid "tux_droid"
+msgstr "tux droid"
+
+msgid "twitter"
+msgstr "twitter"
+
+msgid "facebook"
+msgstr "facebook"

Added: 
software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/fr.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/fr.po 
                        (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/tts_fixes/fr.po 
2009-06-23 10:57:36 UTC (rev 4866)
@@ -0,0 +1,14 @@
+msgid "skype"
+msgstr "skaype"
+
+msgid "tux"
+msgstr "teukss"
+
+msgid "tux_droid"
+msgstr "teukss dro-ide"
+
+msgid "twitter"
+msgstr "twitteur"
+
+msgid "facebook"
+msgstr "faisse bouc"


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to