[Tux4kids-commits] r774 - tuxmath/trunk/src

tholy-guest at alioth.debian.org tholy-guest at alioth.debian.org
Mon Dec 1 11:21:20 UTC 2008


Author: tholy-guest
Date: 2008-12-01 11:21:20 +0000 (Mon, 01 Dec 2008)
New Revision: 774

Modified:
   tuxmath/trunk/src/campaign.h
   tuxmath/trunk/src/credits.c
Log:
Include translation tags for campaign text.


Modified: tuxmath/trunk/src/campaign.h
===================================================================
--- tuxmath/trunk/src/campaign.h	2008-11-30 15:28:47 UTC (rev 773)
+++ tuxmath/trunk/src/campaign.h	2008-12-01 11:21:20 UTC (rev 774)
@@ -8,6 +8,7 @@
  */
  
 #include "SDL_extras.h"
+#include "tuxmath.h"
 
 
 #define TESTING_CAMPAIGN //allow ESC to skip missions instead of exiting
@@ -16,86 +17,86 @@
 #define NUM_ROUNDS 3
 
 
-static char* briefings[NUM_STAGES][100] = {
+static const char* briefings[NUM_STAGES][20] = {
   //cadet
   {
-    "-[Esc] to skip",
-    "Mission One: Careful Cadet",
+    N_("-[Esc] to skip"),
+    N_("Mission One: Careful Cadet"),
     "--------------------------",
-    "I'm so glad you've come!",
+    N_("I'm so glad you've come!"),
     "",
-    "The penguins need your help! Comets",
-    "are falling from the sky, and are melting",
-    "the penguins' igloos. To save their homes,",
-    "we need you to find the secret code that",
-    " will zap each comet.",
+    N_("The penguins need your help! Comets"),
+    N_("are falling from the sky, and are melting"),
+    N_("the penguins' igloos. To save their homes,"),
+    N_("we need you to find the secret code that"),
+    N_(" will zap each comet."),
     "",
-    "Do your best!",
+    N_("Do your best!"),
     NULL
   },
   //scout
   {
     "-[Esc] to skip",
-    "Mission Two: Smart Scout",
+    N_("Mission Two: Smart Scout"),
     "------------------------",
-    "Great job! Since you saved the penguins' homes,",
-    "we are promoting you to Scout. Scouts are good",
-    "for keeping an eye out for trouble...",
+    N_("Great job! Since you saved the penguins' homes,"),
+    N_("we are promoting you to Scout. Scouts are good"),
+    N_("for keeping an eye out for trouble..."),
     "",
-    "...like what's happening right now!",
-    "The TakeAways have come, and they're sending",
-    "new, trickier comets against the penguins!",
-    "But you can save them!",
+    N_("...like what's happening right now!"),
+    N_("The TakeAways have come, and they're sending"),
+    N_("new, trickier comets against the penguins!"),
+    N_("But you can save them!"),
     NULL
   },
   //ranger
   {
     "-[Esc] to skip",
-    "Mission Three: Royal Ranger",
+    N_("Mission Three: Royal Ranger"),
     "---------------------------",
-    "You've done it again! The Penguin Emperor has",
-    "chosen you to join his team of Rangers that",
-    "help protect the city.  We're sending you",
-    "there now...",
+    N_("You've done it again! The Penguin Emperor has"),
+    N_("chosen you to join his team of Rangers that"),
+    N_("help protect the city.  We're sending you"),
+    N_("there now..."),
     "",
-    "...oh no! Now the Emperor himself is under attack,",
-    "from new types of comets: these problems are",
-    "multiplying! To fight these, you need great",
-    "skill. We think you can do it. Join the",
-    "Rangers and help save the city!",
+    N_("...oh no! Now the Emperor himself is under attack,"),
+    N_("from new types of comets: these problems are"),
+    N_("multiplying! To fight these, you need great"),
+    N_("skill. We think you can do it. Join the"),
+    N_("Rangers and help save the city!"),
     NULL
   },
   //ace
   {
     "-[Esc] to skip",
-    "Mission Four: Imperial Ace",
+    N_("Mission Four: Imperial Ace"),
     "--------------------------",
-    "You did it! The Emperor wants to thank you",
-    "in person. We are taking you to his ice palace",
-    "for a great honor: you will become",
-    "the Imperial Ace!",
+    N_("You did it! The Emperor wants to thank you"),
+    N_("in person. We are taking you to his ice palace"),
+    N_("for a great honor: you will become"),
+    N_("the Imperial Ace!"),
     "",
-    "But right in the middle of the ceremony,",
-    "a new attack from the land of Division starts!",
-    "Now is no time for resting; the city",
-    "needs your help!",
+    N_("But right in the middle of the ceremony,"),
+    N_("a new attack from the land of Division starts!"),
+    N_("Now is no time for resting; the city"),
+    N_("needs your help!"),
     NULL
   },
   //commando
   {
     "-[Esc] to skip",
-    "Final Mission: Computing Commando",
+    N_("Final Mission: Computing Commando"),
     "---------------------------------",
-    "Penguin scientists have learned that all",
-    "these attacks are coming from a secret",
-    "base, and they need you to go fight",
-    "the final battle. They also give you",
-    "this clue: first do multiplication and",
-    "division, and then do addition and subtraction.",
-    "I hope that hint helps!",
+    N_("Penguin scientists have learned that all"),
+    N_("these attacks are coming from a secret"),
+    N_("base, and they need you to go fight"),
+    N_("the final battle. They also give you"),
+    N_("this clue: first do multiplication and"),
+    N_("division, and then do addition and subtraction."),
+    N_("I hope that hint helps!"),
     "",
-    "This is it! You can stop these attacks",
-    "forever, Commando!",
+    N_("This is it! You can stop these attacks"),
+    N_("forever, Commando!"),
     NULL
   },
 };

Modified: tuxmath/trunk/src/credits.c
===================================================================
--- tuxmath/trunk/src/credits.c	2008-11-30 15:28:47 UTC (rev 773)
+++ tuxmath/trunk/src/credits.c	2008-12-01 11:21:20 UTC (rev 774)
@@ -449,7 +449,7 @@
           dest.y = subscreen.y + (subscreen.h - scroll * speed);
           dest.w = 1;
           dest.h = 1;
-          draw_text(text[line], dest);
+          draw_text(gettext(text[line]), dest);
           
 
           if (scroll * speed >= TTF_FontHeight(default_font) )




More information about the Tux4kids-commits mailing list