1) Added new attribute 'designer' to track, which is displayed if no

description is given (this simplified work for translators).
2) Changed the .track files to use designer instead of description
   (if applicable).
3) Updated .pot file
4) Minor clenaup in lisp parser.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1850 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-05-11 05:11:57 +00:00
parent 89617347fe
commit e295434afb
5 changed files with 936 additions and 937 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-05-11 00:46+1000\n" "POT-Creation-Date: 2008-05-11 14:54+1000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,17 +21,13 @@ msgstr ""
msgid "%dx%d Blacklisted" msgid "%dx%d Blacklisted"
msgstr "" msgstr ""
#: src/world.cpp:622 #: src/modified/world.cpp:624 src/world.cpp:622
#, c-format #, c-format
msgid "" msgid ""
"'%s' has\n" "'%s' has\n"
"been eliminated." "been eliminated."
msgstr "" msgstr ""
#: src/main.cpp:132
msgid "--keyboard-debug"
msgstr ""
#: src/gui/player_controls.cpp:64 #: src/gui/player_controls.cpp:64
msgid "Accelerate" msgid "Accelerate"
msgstr "" msgstr ""
@ -52,7 +48,7 @@ msgstr ""
msgid "Amazonian Journey" msgid "Amazonian Journey"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:106 #: src/gui/help_page_two.cpp:108
msgid "Anvil - slows down greatly the kart in the first position" msgid "Anvil - slows down greatly the kart in the first position"
msgstr "" msgstr ""
@ -88,6 +84,10 @@ msgstr ""
msgid "Back to the main menu" msgid "Back to the main menu"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:122
msgid "Back to the menu"
msgstr ""
#: src/gui/player_controls.cpp:65 #: src/gui/player_controls.cpp:65
msgid "Brake" msgid "Brake"
msgstr "" msgstr ""
@ -108,11 +108,11 @@ msgstr ""
msgid "Choose a Grand Prix" msgid "Choose a Grand Prix"
msgstr "" msgstr ""
#: src/gui/game_mode.cpp:44 #: src/gui/game_mode.cpp:45
msgid "Choose a Race Mode" msgid "Choose a Race Mode"
msgstr "" msgstr ""
#: src/gui/track_sel.cpp:46 #: src/gui/track_sel.cpp:49
msgid "Choose a track" msgid "Choose a track"
msgstr "" msgstr ""
@ -176,8 +176,8 @@ msgstr ""
msgid "Confirm Resolution Within 5 Seconds" msgid "Confirm Resolution Within 5 Seconds"
msgstr "" msgstr ""
#: src/gui/grand_prix_ending.cpp:144 src/gui/leader_result.cpp:148 #: src/gui/feature_unlocked.cpp:47 src/gui/grand_prix_ending.cpp:144
#: src/gui/feature_unlocked.cpp:47 src/gui/race_results_gui.cpp:135 #: src/gui/leader_result.cpp:148 src/gui/race_results_gui.cpp:135
msgid "Continue" msgid "Continue"
msgstr "" msgstr ""
@ -185,28 +185,12 @@ msgstr ""
msgid "Continue Grand Prix" msgid "Continue Grand Prix"
msgstr "" msgstr ""
#: data/tracks/littlevolcano/littlevolcano.track:5
#: data/tracks/race/race.track:5 data/tracks/startrack/startrack.track:6
#: data/tracks/subseatrack/subseatrack.track:5
#: data/tracks/volcano/volcano.track:5
msgid "Created by Ingo Ruhnke"
msgstr ""
#: data/tracks/beach/beach.track:5 data/tracks/lighthouse/lighthouse.track:5 #: data/tracks/beach/beach.track:5 data/tracks/lighthouse/lighthouse.track:5
msgid "" msgid ""
"Created by Ingo Ruhnke,\n" "Created by Ingo Ruhnke,\n"
"modified by M. Gagnon" "modified by M. Gagnon"
msgstr "" msgstr ""
#: data/tracks/islandtrack/islandtrack.track:5
msgid "Created by Johannes Sjolund"
msgstr ""
#: data/tracks/olivermath/olivermath.track:5
#: data/tracks/tuxtrack/tuxtrack.track:5
msgid "Created by Oliver & Steve Baker"
msgstr ""
#: data/tracks/fortmagma/fortmagma.track:5 #: data/tracks/fortmagma/fortmagma.track:5
msgid "" msgid ""
"Created by Oliver & Steve Baker\n" "Created by Oliver & Steve Baker\n"
@ -225,10 +209,6 @@ msgid ""
"modified by M. Gagnon" "modified by M. Gagnon"
msgstr "" msgstr ""
#: data/tracks/canyon/canyon.track:5 data/tracks/city/city.track:5
msgid "Created by Thomas Oppl"
msgstr ""
#: src/gui/main_menu.cpp:63 #: src/gui/main_menu.cpp:63
msgid "Credits" msgid "Credits"
msgstr "" msgstr ""
@ -312,7 +292,7 @@ msgstr ""
msgid "First grand prix, easy to get started" msgid "First grand prix, easy to get started"
msgstr "" msgstr ""
#: src/gui/game_mode.cpp:73 #: src/gui/game_mode.cpp:74
msgid "Follow the Leader" msgid "Follow the Leader"
msgstr "" msgstr ""
@ -343,15 +323,22 @@ msgstr ""
msgid "Fullscreen mode" msgid "Fullscreen mode"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:82 #: src/gui/help_page_two.cpp:84
msgid "Fuzzy blob/Spark - very slow, but bounces from walls" msgid "Fuzzy blob/Spark - very slow, but bounces from walls"
msgstr "" msgstr ""
#: src/gui/credits_menu.cpp:76 src/gui/help_page_two.cpp:116 #: src/gui/game_mode.cpp:79
#: src/gui/help_page_one.cpp:148 src/gui/challenges_menu.cpp:51 msgid "Game mode help"
msgstr ""
#: src/gui/challenges_menu.cpp:51 src/gui/credits_menu.cpp:76
msgid "Go back to the main menu" msgid "Go back to the main menu"
msgstr "" msgstr ""
#: src/gui/help_page_one.cpp:148
msgid "Go back to the menu"
msgstr ""
#: src/gui/race_gui.cpp:932 #: src/gui/race_gui.cpp:932
msgid "Go!" msgid "Go!"
msgstr "" msgstr ""
@ -360,7 +347,7 @@ msgstr ""
msgid "Grab blue boxes and coins" msgid "Grab blue boxes and coins"
msgstr "" msgstr ""
#: src/gui/game_mode.cpp:54 #: src/gui/game_mode.cpp:55
msgid "Grand Prix" msgid "Grand Prix"
msgstr "" msgstr ""
@ -372,7 +359,7 @@ msgstr ""
msgid "Highscores" msgid "Highscores"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:74 #: src/gui/help_page_two.cpp:76
msgid "Homing missile - follows rivals, but is slower than the missile" msgid "Homing missile - follows rivals, but is slower than the missile"
msgstr "" msgstr ""
@ -385,7 +372,7 @@ msgstr ""
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
#: src/kart.cpp:628 #: src/kart.cpp:628 src/modified/kart.cpp:627
msgid "Invalid short-cut!!" msgid "Invalid short-cut!!"
msgstr "" msgstr ""
@ -426,7 +413,7 @@ msgstr ""
msgid "Look back" msgid "Look back"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:66 #: src/gui/help_page_two.cpp:68
msgid "Missile - fast stopper in a straight line" msgid "Missile - fast stopper in a straight line"
msgstr "" msgstr ""
@ -470,7 +457,7 @@ msgid ""
"now available" "now available"
msgstr "" msgstr ""
#: src/kart.cpp:400 #: src/kart.cpp:400 src/modified/kart.cpp:399
msgid "New fastest lap" msgid "New fastest lap"
msgstr "" msgstr ""
@ -518,15 +505,15 @@ msgid ""
"now available" "now available"
msgstr "" msgstr ""
#: src/gui/help_page_one.cpp:144 #: src/gui/help_page_one.cpp:144 src/gui/help_page_two.cpp:118
msgid "Next screen" msgid "Next help screen"
msgstr "" msgstr ""
#: src/gui/grand_prix_select.cpp:71 src/gui/grand_prix_select.cpp:76 #: src/gui/grand_prix_select.cpp:71 src/gui/grand_prix_select.cpp:76
msgid "No Grand Prix selected" msgid "No Grand Prix selected"
msgstr "" msgstr ""
#: src/gui/track_sel.cpp:83 #: src/gui/track_sel.cpp:86
msgid "No track selected" msgid "No track selected"
msgstr "" msgstr ""
@ -554,11 +541,11 @@ msgstr ""
msgid "On the Beach" msgid "On the Beach"
msgstr "" msgstr ""
#: src/gui/options.cpp:40 src/gui/main_menu.cpp:55 src/gui/race_menu.cpp:50 #: src/gui/main_menu.cpp:55 src/gui/options.cpp:40 src/gui/race_menu.cpp:50
msgid "Options" msgid "Options"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:98 #: src/gui/help_page_two.cpp:100
msgid "Parachute - slows down all karts in a better position!" msgid "Parachute - slows down all karts in a better position!"
msgstr "" msgstr ""
@ -611,11 +598,11 @@ msgstr ""
msgid "Press <ESC> to Cancel" msgid "Press <ESC> to Cancel"
msgstr "" msgstr ""
#: src/gui/config_controls.cpp:52 src/gui/config_display.cpp:101
#: src/gui/config_sound.cpp:63 src/gui/game_mode.cpp:84
#: src/gui/grand_prix_select.cpp:87 src/gui/num_players.cpp:45
#: src/gui/options.cpp:57 src/gui/player_controls.cpp:112 #: src/gui/options.cpp:57 src/gui/player_controls.cpp:112
#: src/gui/race_options.cpp:121 src/gui/config_display.cpp:101 #: src/gui/race_options.cpp:121
#: src/gui/game_mode.cpp:78 src/gui/config_sound.cpp:63
#: src/gui/config_controls.cpp:52 src/gui/grand_prix_select.cpp:87
#: src/gui/num_players.cpp:45
msgid "Press <ESC> to go back" msgid "Press <ESC> to go back"
msgstr "" msgstr ""
@ -623,11 +610,11 @@ msgstr ""
msgid "Press key" msgid "Press key"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:112 #: src/gui/help_page_two.cpp:114
msgid "Previous screen" msgid "Previous screen"
msgstr "" msgstr ""
#: src/gui/game_mode.cpp:57 #: src/gui/game_mode.cpp:58
msgid "Quick Race" msgid "Quick Race"
msgstr "" msgstr ""
@ -749,11 +736,11 @@ msgstr ""
msgid "Three Players" msgid "Three Players"
msgstr "" msgstr ""
#: src/gui/game_mode.cpp:61 #: src/gui/game_mode.cpp:62
msgid "Time Trial" msgid "Time Trial"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:59 #: src/gui/help_page_two.cpp:61
msgid "To help you win, there are certain collectables you can grab:" msgid "To help you win, there are certain collectables you can grab:"
msgstr "" msgstr ""
@ -859,28 +846,24 @@ msgstr ""
msgid "Window mode" msgid "Window mode"
msgstr "" msgstr ""
#: src/world.cpp:538 #: src/modified/world.cpp:540 src/world.cpp:538
msgid "You finished" msgid "You finished"
msgstr "" msgstr ""
#: src/world.cpp:617 #: src/modified/world.cpp:619 src/world.cpp:617
msgid "" msgid ""
"You have been\n" "You have been\n"
"eliminated!" "eliminated!"
msgstr "" msgstr ""
#: src/world.cpp:537 #: src/modified/world.cpp:539 src/world.cpp:537
msgid "You won" msgid "You won"
msgstr "" msgstr ""
#: src/gui/help_page_two.cpp:90 #: src/gui/help_page_two.cpp:92
msgid "Zipper - speed boost" msgid "Zipper - speed boost"
msgstr "" msgstr ""
#: data/tracks/jungle/jungle.track:5
msgid "by M. Gagnon"
msgstr ""
#: src/user_config.cpp:836 #: src/user_config.cpp:836
#, c-format #, c-format
msgid "joy %d axis %d %c" msgid "joy %d axis %d %c"
@ -911,6 +894,6 @@ msgstr ""
msgid "not set" msgid "not set"
msgstr "" msgstr ""
#: src/world.cpp:540 #: src/modified/world.cpp:542 src/world.cpp:540
msgid "the race!" msgid "the race!"
msgstr "" msgstr ""

View File

@ -28,6 +28,9 @@
#include "material_manager.hpp" #include "material_manager.hpp"
#include "unlock_manager.hpp" #include "unlock_manager.hpp"
#include "translation.hpp" #include "translation.hpp"
#if defined(WIN32) && !defined(__CYGWIN__)
# define snprintf _snprintf
#endif
enum WidgetTokens enum WidgetTokens
{ {
@ -100,9 +103,18 @@ void TrackSel::update(float dt)
SELECTED_TRACK < (int)track_manager->getTrackCount() ) SELECTED_TRACK < (int)track_manager->getTrackCount() )
{ {
const Track* TRACK = track_manager->getTrack( SELECTED_TRACK ); const Track* TRACK = track_manager->getTrack( SELECTED_TRACK );
const std::string& description = TRACK->getDescription();
widget_manager->setWgtText( WTOK_AUTHOR, TRACK->getDescription() ); if(description!="")
{
widget_manager->setWgtText( WTOK_AUTHOR, TRACK->getDescription() );
}
else
{
char designedby[MAX_MESSAGE_LENGTH];
snprintf(designedby, MAX_MESSAGE_LENGTH,
"Designed by %s", TRACK->getDesigner().c_str());
widget_manager->setWgtText( WTOK_AUTHOR, designedby );
}
const std::string& screenshot = TRACK->getScreenshotFile(); const std::string& screenshot = TRACK->getScreenshotFile();
const std::string& topview = TRACK->getTopviewFile(); const std::string& topview = TRACK->getTopviewFile();

View File

@ -104,24 +104,24 @@ namespace lisp
} }
case Lexer::TOKEN_TRANSLATION: case Lexer::TOKEN_TRANSLATION:
{ {
result = new Lisp(Lisp::TYPE_STRING); result = new Lisp(Lisp::TYPE_STRING);
m_token = m_lexer->getNextToken(); m_token = m_lexer->getNextToken();
Lisp* next=read(); Lisp* next=read();
if(next->getType()!=Lisp::TYPE_STRING) if(next->getType()!=Lisp::TYPE_STRING)
{ {
char msg[MAX_ERROR_MESSAGE_LENGTH]; char msg[MAX_ERROR_MESSAGE_LENGTH];
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
"Parse Error at line %d: No string inside translation.", "Parse Error at line %d: No string inside translation.",
m_lexer->getLineNumber()); m_lexer->getLineNumber());
throw std::runtime_error(msg); throw std::runtime_error(msg);
} }
const char* trans=_(next->m_v.m_string); const char* trans=_(next->m_v.m_string);
const size_t LEN = strlen(trans) + 1; const size_t LEN = strlen(trans) + 1;
result->m_v.m_string = new char[LEN]; result->m_v.m_string = new char[LEN];
memcpy(result->m_v.m_string, trans, LEN); memcpy(result->m_v.m_string, trans, LEN);
delete next; delete next;
break; break;
} }
case Lexer::TOKEN_OPEN_PAREN: case Lexer::TOKEN_OPEN_PAREN:
result = new Lisp(Lisp::TYPE_CONS); result = new Lisp(Lisp::TYPE_CONS);

View File

@ -59,6 +59,7 @@ Track::Track( std::string filename_, float w, float h, bool stretch )
m_track_2d_height = h; m_track_2d_height = h;
m_do_stretch = stretch; m_do_stretch = stretch;
m_description = ""; m_description = "";
m_designer = "";
m_screenshot = ""; m_screenshot = "";
m_top_view = ""; m_top_view = "";
@ -816,6 +817,7 @@ void Track::loadTrack(std::string filename_)
LISP->get ("name", m_name); LISP->get ("name", m_name);
LISP->get ("description", m_description); LISP->get ("description", m_description);
LISP->get ("designer", m_designer);
std::vector<std::string> filenames; std::vector<std::string> filenames;
LISP->getVector("music", filenames); LISP->getVector("music", filenames);
getMusicInformation(filenames, m_music); getMusicInformation(filenames, m_music);

View File

@ -49,6 +49,7 @@ private:
std::vector<float> m_start_x, m_start_y, m_start_z, m_start_heading; std::vector<float> m_start_x, m_start_y, m_start_z, m_start_heading;
std::string m_herring_style; std::string m_herring_style;
std::string m_description; std::string m_description;
std::string m_designer;
std::string m_filename; std::string m_filename;
ssgBranch* m_model; ssgBranch* m_model;
TriangleMesh* m_track_mesh; TriangleMesh* m_track_mesh;
@ -186,6 +187,7 @@ public:
const float& getAICurveSpeedAdjustment() const {return m_AI_curve_speed_adjustment;} const float& getAICurveSpeedAdjustment() const {return m_AI_curve_speed_adjustment;}
const sgVec4& getSkyColor () const {return m_sky_color; } const sgVec4& getSkyColor () const {return m_sky_color; }
const std::string& getDescription () const {return m_description; } const std::string& getDescription () const {return m_description; }
const std::string& getDesigner () const {return m_designer; }
const std::string& getTopviewFile () const {return m_top_view; } const std::string& getTopviewFile () const {return m_top_view; }
const std::string& getScreenshotFile () const {return m_screenshot; } const std::string& getScreenshotFile () const {return m_screenshot; }
const std::vector<SGfloat>& getWidth () const {return m_path_width; } const std::vector<SGfloat>& getWidth () const {return m_path_width; }