fix translation
[neverball] / ball / st_goal.c
index 204fb41..3d61096 100644 (file)
@@ -27,7 +27,7 @@
 #include "st_save.h"
 #include "st_over.h"
 #include "st_done.h"
-#include "st_title.h"
+#include "st_start.h"
 #include "st_level.h"
 
 /*---------------------------------------------------------------------------*/
@@ -66,8 +66,10 @@ static int goal_action(int i)
             ;
         if (level_exit(NULL, 1))
             return goto_state(&st_level);
-        else
+        else if (level_mode() == MODE_CHALLENGE)
             return goto_state(&st_done);
+       else
+           return goto_state(&st_start);
 
     case GOAL_SAME:
         while (level_count())
@@ -75,7 +77,9 @@ static int goal_action(int i)
         if (level_exit(NULL, 0))
             return goto_state(&st_level);
         else
-            return goto_state(&st_done);
+            /* return goto_state(&st_done); */
+            /* This case can't occurs */
+           return 0;
 
     case GUI_CL:
         gui_keyboard_lock();
@@ -110,8 +114,8 @@ static int goal_action(int i)
 
 static int goal_enter(void)
 {
-    const char *s1 = "New Record";
-    const char *s2 = "GOAL";
+    const char *s1 = _("New Record");
+    const char *s2 = _("GOAL");
 
     int id, jd, kd;
 
@@ -130,30 +134,32 @@ static int goal_enter(void)
 
         gui_space(id);
 
-        if ((jd = gui_harray(id)))
-        {
-            if ((kd = gui_harray(jd)))
-            {
-                balls_id = gui_count(kd,  10, GUI_MED, GUI_RGT);
-                gui_label(kd, "Balls", GUI_SML, GUI_LFT, gui_wht, gui_wht);
-            }
-            if ((kd = gui_harray(jd)))
-            {
-                score_id = gui_count(kd, 100, GUI_MED, GUI_RGT);
-                gui_label(kd, "Score", GUI_SML, GUI_LFT, gui_wht, gui_wht);
-            }
-            if ((kd = gui_harray(jd)))
-            {
-                coins_id = gui_count(kd, 100, GUI_MED, GUI_RGT);
-                gui_label(kd, "Coins", GUI_SML, GUI_LFT, gui_wht, gui_wht);
-            }
-
-            gui_set_count(balls_id, curr_balls());
-            gui_set_count(score_id, curr_score());
-            gui_set_count(coins_id, curr_coins());
-        }
-
-        gui_space(id);
+       if (level_mode() == MODE_CHALLENGE)
+       {
+           if ((jd = gui_harray(id)))
+           {
+                if ((kd = gui_harray(jd)))
+                {
+                    balls_id = gui_count(kd,  10, GUI_MED, GUI_RGT);
+                   gui_label(kd, _("Balls"), GUI_SML, GUI_LFT, gui_wht, gui_wht);
+               }
+               if ((kd = gui_harray(jd)))
+               {
+                    score_id = gui_count(kd, 100, GUI_MED, GUI_RGT);
+                   gui_label(kd, _("Score"), GUI_SML, GUI_LFT, gui_wht, gui_wht);
+               }
+               if ((kd = gui_harray(jd)))
+               {
+                   coins_id = gui_count(kd, 100, GUI_MED, GUI_RGT);
+                   gui_label(kd, _("Coins"), GUI_SML, GUI_LFT, gui_wht, gui_wht);
+               }
+
+               gui_set_count(balls_id, curr_balls());
+               gui_set_count(score_id, curr_score());
+               gui_set_count(coins_id, curr_coins());
+           }
+           gui_space(id);
+       }
 
         if ((jd = gui_harray(id)))
         {
@@ -165,13 +171,15 @@ static int goal_enter(void)
 
         if ((jd = gui_harray(id)))
         {
-            gui_state(jd, "Save Replay", GUI_SML, GOAL_SAVE, 0);
-            gui_state(jd, "Retry Level", GUI_SML, GOAL_SAME, 0);
+            gui_state(jd, _("Save Replay"), GUI_SML, GOAL_SAVE, 0);
+           
+           if (level_mode() != MODE_CHALLENGE)
+                gui_state(jd, _("Retry Level"), GUI_SML, GOAL_SAME, 0);
 
             if (level_last())
-                gui_start(jd, "Finish",  GUI_SML, GOAL_NEXT, 0);
+                gui_start(jd, _("Finish"),  GUI_SML, GOAL_NEXT, 0);
             else
-                gui_start(jd, "Next Level", GUI_SML, GOAL_NEXT, 0);
+                gui_start(jd, _("Next Level"), GUI_SML, GOAL_NEXT, 0);
         }
 
         if (high) gui_keyboard(id);