[Tux4kids-commits] r1545 - in tuxtype/trunk: . data/themes/french	data/themes/french/scripts data/themes/french/words src
    David Bruce 
    dbruce-guest at alioth.debian.org
       
    Sun Sep 20 19:39:50 UTC 2009
    
    
  
Author: dbruce-guest
Date: 2009-09-20 19:39:50 +0000 (Sun, 20 Sep 2009)
New Revision: 1545
Added:
   tuxtype/trunk/data/themes/french/scripts/
   tuxtype/trunk/data/themes/french/scripts/Makefile.am
   tuxtype/trunk/data/themes/french/scripts/les_jours_de_la_semaine.xml
   tuxtype/trunk/data/themes/french/scripts/les_mois_de_l_annee.xml
   tuxtype/trunk/data/themes/french/words/months.txt
   tuxtype/trunk/data/themes/french/words/weekdays.txt
Modified:
   tuxtype/trunk/configure.ac
   tuxtype/trunk/data/themes/french/Makefile.am
   tuxtype/trunk/data/themes/french/words/Makefile.am
   tuxtype/trunk/src/main.c
   tuxtype/trunk/src/scripting.c
Log:
New lessons for weekdays and months in French.
Fix of path error for theme-specific xml lesson scripts.
Modified: tuxtype/trunk/configure.ac
===================================================================
--- tuxtype/trunk/configure.ac	2009-09-20 18:35:43 UTC (rev 1544)
+++ tuxtype/trunk/configure.ac	2009-09-20 19:39:50 UTC (rev 1545)
@@ -303,6 +303,7 @@
 data/themes/euskara/words/Makefile
 data/themes/french/Makefile
 data/themes/french/words/Makefile
+data/themes/french/scripts/Makefile
 data/themes/greek/Makefile
 data/themes/greek/words/Makefile
 data/themes/gujarati/Makefile
Modified: tuxtype/trunk/data/themes/french/Makefile.am
===================================================================
--- tuxtype/trunk/data/themes/french/Makefile.am	2009-09-20 18:35:43 UTC (rev 1544)
+++ tuxtype/trunk/data/themes/french/Makefile.am	2009-09-20 19:39:50 UTC (rev 1545)
@@ -1,7 +1,7 @@
 ## Makefile.am for tuxtype - data/themes/french:
 ## Process with Automake to create Makefile.in
 
-SUBDIRS = words
+SUBDIRS = scripts words
 
 themes_frenchdir = $(pkgdatadir)/themes/french
 
Added: tuxtype/trunk/data/themes/french/scripts/Makefile.am
===================================================================
--- tuxtype/trunk/data/themes/french/scripts/Makefile.am	                        (rev 0)
+++ tuxtype/trunk/data/themes/french/scripts/Makefile.am	2009-09-20 19:39:50 UTC (rev 1545)
@@ -0,0 +1,7 @@
+## Makefile.am for tuxtype - data/themes/french/scripts:
+## Process with Automake to create Makefile.in
+
+themes_french_scriptsdir = $(pkgdatadir)/themes/french/scripts
+
+dist_themes_french_scripts_DATA = les_jours_de_la_semaine.xml \
+	les_mois_de_l_annee.xml
Added: tuxtype/trunk/data/themes/french/scripts/les_jours_de_la_semaine.xml
===================================================================
--- tuxtype/trunk/data/themes/french/scripts/les_jours_de_la_semaine.xml	                        (rev 0)
+++ tuxtype/trunk/data/themes/french/scripts/les_jours_de_la_semaine.xml	2009-09-20 19:39:50 UTC (rev 1545)
@@ -0,0 +1,29 @@
+<script title="Test Lesson" bgcolor="#3f4f1f">
+       <page title="Introduction to Example Lesson">
+	       <text align="center">Les jours de la semaine</text>
+
+       <text align="center" y="300"> PRESS SPACE TO START THE LESSON!</text>
+      <waitforinput/>
+       </page>
+       <page title="The a Key" bgcolor="#3f7f3f">
+       <img src="/keyboard/keyboard-us.png" x="45" y="220"/>
+       <text align="center">Les jours de la semaine</text>
+       <text align="center">To start practicing hit the p key</text>
+       <text color="#000000" x="100" y="273">A</text>
+       <text color="#000000" x="130" y="273">S</text>
+      <waitforchar/>
+      <prac>Lundi Mardi Mercredi Jeudi Vendredi Samedi Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi Dimanche</prac>
+      </page>
+      <!--HACK: there is some undesired behavior in scripting.c, this fixes it for now-->
+      <page>
+      </page>
+      <page>
+       <img src="keyboard/space.png" x="200" y="160"/>
+       <img src="keyboard/larrow.png" x="460" y="18"/>
+       <img src="keyboard/esc.png" x="515" y="50"/>
+       <text align="center">Great Job!</text>
+       <text align="left"></text>
+       <text align="center">To go back to the main menu</text>
+       <text align="center">Press Space</text>
+       <waitforinput/>
+     </page>    
Added: tuxtype/trunk/data/themes/french/scripts/les_mois_de_l_annee.xml
===================================================================
--- tuxtype/trunk/data/themes/french/scripts/les_mois_de_l_annee.xml	                        (rev 0)
+++ tuxtype/trunk/data/themes/french/scripts/les_mois_de_l_annee.xml	2009-09-20 19:39:50 UTC (rev 1545)
@@ -0,0 +1,30 @@
+<script title="Test Lesson" bgcolor="#3f4f1f">
+	<page title="Introduction to Example Lesson">
+		<text align="center">Les mois de l'année</text>
+		<text align="center"> </text>
+		<text align="center"> </text>
+		<text align="center" y="300"> PRESS SPACE TO START THE LESSON!</text>
+		<waitforinput/>
+	</page>
+	<page title="The a Key" bgcolor="#3f7f3f">
+		<img src="/keyboard/keyboard-us.png" x="45" y="220"/>
+		<text align="center">Les mois de l'année</text>
+		<text align="center">To start practicing hit the p key</text>
+		<text color="#000000" x="100" y="273">A</text>
+		<text color="#000000" x="130" y="273">S</text>
+		<waitforchar/>
+		<prac>janvier février mars avril mai juin juillet août septembre octobre novembre décembre janvier février mars avril mai juin juillet août septembre octobre novembre décembre janvier février mars avril mai juin juillet août septembre octobre novembre décembre</prac>
+	</page>
+	<!--HACK: there is some undesired behavior in scripting.c, this fixes it for now-->
+	<page>
+	</page>
+	<page>
+		<img src="keyboard/space.png" x="200" y="160"/>
+		<img src="keyboard/larrow.png" x="460" y="18"/>
+		<img src="keyboard/esc.png" x="515" y="50"/>
+		<text align="center">Great Job!</text>
+		<text align="left"></text>
+		<text align="center">To go back to the main menu</text>
+		<text align="center">Press Space</text>
+		<waitforinput/>
+	</page>    
Modified: tuxtype/trunk/data/themes/french/words/Makefile.am
===================================================================
--- tuxtype/trunk/data/themes/french/words/Makefile.am	2009-09-20 18:35:43 UTC (rev 1544)
+++ tuxtype/trunk/data/themes/french/words/Makefile.am	2009-09-20 19:39:50 UTC (rev 1545)
@@ -4,7 +4,9 @@
 themes_french_wordsdir = $(pkgdatadir)/themes/french/words
 
 dist_themes_french_words_DATA = fingers.txt \
+  months.txt \
   names.txt \
+  weekdays.txt \
   words1.txt \
   words2.txt \
   words3.txt \
Added: tuxtype/trunk/data/themes/french/words/months.txt
===================================================================
--- tuxtype/trunk/data/themes/french/words/months.txt	                        (rev 0)
+++ tuxtype/trunk/data/themes/french/words/months.txt	2009-09-20 19:39:50 UTC (rev 1545)
@@ -0,0 +1,13 @@
+Les mois de l'année
+JANVIER
+FEVRIER
+MARS
+AVRIL
+MAI
+JUIN
+JUILLET
+AOUT
+SEPTEMBRE
+OCTOBRE
+NOVEMBRE
+DECEMBRE
Added: tuxtype/trunk/data/themes/french/words/weekdays.txt
===================================================================
--- tuxtype/trunk/data/themes/french/words/weekdays.txt	                        (rev 0)
+++ tuxtype/trunk/data/themes/french/words/weekdays.txt	2009-09-20 19:39:50 UTC (rev 1545)
@@ -0,0 +1,8 @@
+Les  jours de la semaine
+LUNDI
+MARDI
+MERCREDI
+JEUDI
+VENDREDI
+SAMEDI
+DIMANCHI
\ No newline at end of file
Modified: tuxtype/trunk/src/main.c
===================================================================
--- tuxtype/trunk/src/main.c	2009-09-20 18:35:43 UTC (rev 1544)
+++ tuxtype/trunk/src/main.c	2009-09-20 19:39:50 UTC (rev 1545)
@@ -134,7 +134,7 @@
     s3 = bind_textdomain_codeset(PACKAGE, "UTF-8");
     s4 = textdomain(PACKAGE);
 
-    DEBUGCODE
+//    DEBUGCODE
     {
       fprintf(stderr, "PACKAGE = %s\n", PACKAGE);
       fprintf(stderr, "TUXLOCALE = %s\n", TUXLOCALE);
Modified: tuxtype/trunk/src/scripting.c
===================================================================
--- tuxtype/trunk/src/scripting.c	2009-09-20 18:35:43 UTC (rev 1544)
+++ tuxtype/trunk/src/scripting.c	2009-09-20 19:39:50 UTC (rev 1545)
@@ -298,7 +298,10 @@
             if (inRect(titleRects[i], event.button.x, event.button.y))
             {
               loc = loc - (loc % 8) + i;
-              sprintf(fn, "%s/scripts/%s", settings.default_data_path, script_filenames[loc]);
+              if(settings.use_english)
+                sprintf(fn, "%s/scripts/%s", settings.default_data_path, script_filenames[loc]);
+              else
+                sprintf(fn, "%s/scripts/%s", settings.theme_data_path, script_filenames[loc]);
               stop = 1;
               break; 
             }
@@ -315,8 +318,10 @@
 
           if (event.key.keysym.sym == SDLK_RETURN)
           {
-            sprintf(fn, "%s/scripts/%s", settings.default_data_path, script_filenames[loc]);
-            stop = 1;
+            if(settings.use_english)
+              sprintf(fn, "%s/scripts/%s", settings.default_data_path, script_filenames[loc]);
+            else
+              sprintf(fn, "%s/scripts/%s", settings.theme_data_path, script_filenames[loc]);            stop = 1;
             break;
           }
 
@@ -591,7 +596,7 @@
         /* -- if we reached the end of the file and saw no close to the comment, generate a warning -- */
         if ( !found && fscanf_result == EOF )
         {
-            fprintf(stderr, "XML Warning: End of file reached looking for the end of a comment.\n", fn);
+            fprintf(stderr, "XML Warning: End of file reached looking for the end of a comment.\n");
             break;
         }
 
    
    
More information about the Tux4kids-commits
mailing list