widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #02681
[Merge] lp:~widelands-dev/widelands/bug-978175 into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-978175 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #978175 in widelands: "localization not yet loaded in command line"
https://bugs.launchpad.net/widelands/+bug/978175
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-978175/+merge/234790
widelands --help now shows the localized version of the messages.
Created a separate textdomain for them that will be low priority, so translators can decide if they wish to translate this or not.
NOTE: We need to run the following command for all languages in order not to lose existing translations:
msgmerge -o po/widelands_console/<LANGUAGE>.po po/widelands/<LANGUAGE>.po po/widelands_console/widelands_console.pot
--
https://code.launchpad.net/~widelands-dev/widelands/bug-978175/+merge/234790
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-978175 into lp:widelands.
=== added directory 'po/widelands_console'
=== added file 'po/widelands_console/widelands_console.pot'
--- po/widelands_console/widelands_console.pot 1970-01-01 00:00:00 +0000
+++ po/widelands_console/widelands_console.pot 2014-09-16 10:01:33 +0000
@@ -0,0 +1,217 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Widelands Development Team
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: widelands-public@xxxxxxxxxxxxxxxxxxxxx\n"
+"POT-Creation-Date: 2014-09-16 10:52+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@xxxxxx>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. * TRANSLATORS: %s = version information
+#: ../../src/wlapplication_messages.cc:40
+#, c-format
+msgid "This is Widelands Build %s"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:43
+msgid "Usage: widelands <option0>=<value0> ... <optionN>=<valueN>"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:44
+msgid "Options:"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:46
+msgid " --<config-entry-name>=value overwrites any config file setting"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:47
+msgid ""
+" --logfile=FILENAME Log output to file FILENAME instead of \n"
+" terminal output"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:49
+msgid ""
+" --datadir=DIRNAME Use specified directory for the widelands\n"
+" data files"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:51
+msgid ""
+" --homedir=DIRNAME Use specified directory for widelands config\n"
+" files, savegames and replays"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:54
+msgid " Default is ~/.widelands"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:57
+msgid ""
+" --coredump=[yes|no] Generates a core dump on segfaults instead\n"
+" of using the SDL"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:59
+msgid ""
+" --language=[de_DE|sv_SE|...]\n"
+" The locale to use."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:61
+msgid " --localedir=DIRNAME Use DIRNAME as location for the locale"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:62
+msgid ""
+" --remove_syncstreams=[true|false]\n"
+" Remove syncstream files on startup"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:64
+msgid ""
+" --remove_replays=[...]\n"
+" Remove replays after this number of days.\n"
+" If this is 0, replays are not deleted."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:68
+msgid "Sound options:"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:69
+msgid " --nosound Starts the game with sound disabled."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:70
+msgid " --disable_fx Disable sound effects."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:71
+msgid " --disable_music Disable music."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:72
+msgid " --nozip Do not save files as binary zip archives."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:73
+msgid ""
+" --editor Directly starts the Widelands editor.\n"
+" You can add a =FILENAME to directly load\n"
+" the map FILENAME in editor."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:76
+msgid ""
+" --scenario=FILENAME Directly starts the map FILENAME as scenario\n"
+" map."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:78
+msgid " --loadgame=FILENAME Directly loads the savegame FILENAME."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:79
+msgid ""
+" --script=FILENAME Run the given Lua script after initialization.\n"
+" Only valid with --scenario, --loadgame, or --editor."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:81
+msgid " --dedicated=FILENAME Starts a dedicated server with FILENAME as map"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:82
+msgid ""
+" --auto_roadbuild_mode=[yes|no]\n"
+" Whether to enter roadbuilding mode\n"
+" automatically after placing a flag that is\n"
+" not connected to a road."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:86
+msgid "Graphic options:"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:87
+msgid ""
+" --fullscreen=[yes|no]\n"
+" Whether to use the whole display for the\n"
+" game screen."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:90
+msgid " --xres=[...] Width of the window in pixel."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:91
+msgid " --yres=[...] Height of the window in pixel."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:92
+msgid " --opengl=[0|1] Enables OpenGL rendering"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:93
+msgid "Options for the internal window manager:"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:94
+msgid ""
+" --border_snap_distance=[0 ...]\n"
+" Move a window to the edge of the screen\n"
+" when the edge of the window comes within\n"
+" this distance from the edge of the screen."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:98
+msgid ""
+" --dock_windows_to_edges=[yes|no]\n"
+" Eliminate a window's border towards the\n"
+" edge of the screen when the edge of the\n"
+" window is next to the edge of the screen."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:102
+msgid ""
+" --panel_snap_distance=[0 ...]\n"
+" Move a window to the edge of the panel when\n"
+" the edge of the window comes within this\n"
+" distance from the edge of the panel."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:106
+msgid ""
+" --snap_windows_only_when_overlapping=[yes|no]\n"
+" Only move a window to the edge of a panel\n"
+" if the window is overlapping with the\n"
+" panel."
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:111
+msgid " --verbose Enable verbose debug messages"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:113
+msgid " --help Show this help"
+msgstr ""
+
+#: ../../src/wlapplication_messages.cc:115
+msgid ""
+"Bug reports? Suggestions? Check out the project website:\n"
+" https://launchpad.net/widelands\n"
+"\n"
+"Hope you enjoy this game!"
+msgstr ""
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2014-07-26 16:37:37 +0000
+++ src/CMakeLists.txt 2014-09-16 10:01:33 +0000
@@ -90,6 +90,8 @@
SRCS
wlapplication.cc
wlapplication.h
+ wlapplication_messages.cc
+ wlapplication_messages.h
USES_SDL
DEPENDS
base_exceptions
=== modified file 'src/main.cc'
--- src/main.cc 2014-07-22 09:54:49 +0000
+++ src/main.cc 2014-09-16 10:01:33 +0000
@@ -33,6 +33,7 @@
#include "build_info.h"
#include "config.h"
#include "wlapplication.h"
+#include "wlapplication_messages.h"
using std::cout;
using std::cerr;
@@ -109,7 +110,7 @@
} catch (const Parameter_error & e) {
// handle wrong commandline parameters
cerr<<endl<<e.what()<<endl<<endl;
- WLApplication::show_usage();
+ WLApplicationMessages::show_usage(build_id().c_str(), build_type().c_str());
delete g_app;
return 0;
=== modified file 'src/ui_fsmenu/launch_mpg.cc'
--- src/ui_fsmenu/launch_mpg.cc 2014-07-14 10:45:44 +0000
+++ src/ui_fsmenu/launch_mpg.cc 2014-09-16 10:01:33 +0000
@@ -633,7 +633,7 @@
char const * const name = m_settings->settings().mapfilename.c_str();
std::unique_ptr<Widelands::Map_Loader> ml = map.get_correct_loader(name);
if (!ml) {
- throw warning(_("There was an error!"), _("The map file seems to be invalid!"));
+ throw warning("There was an error!", "The map file seems to be invalid!");
}
map.set_filename(name);
=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc 2014-08-26 19:40:13 +0000
+++ src/wlapplication.cc 2014-09-16 10:01:33 +0000
@@ -86,6 +86,7 @@
#include "ui_fsmenu/netsetup_lan.h"
#include "ui_fsmenu/options.h"
#include "ui_fsmenu/singleplayer.h"
+#include "wlapplication_messages.h"
#include "wui/game_tips.h"
#include "wui/interactive_player.h"
#include "wui/interactive_spectator.h"
@@ -93,17 +94,14 @@
#define MINIMUM_DISK_SPACE 250000000lu
#define SCREENSHOT_DIR "screenshots"
-//Always specifying namespaces is good, but let's not go too far ;-)
-using std::endl;
-
namespace {
/**
* Shut the hardware down: stop graphics mode, stop sound handler
*/
void terminate(int) {
- log(_("Waited 5 seconds to close audio. There are some problems here, so killing Widelands."
- " Update your sound driver and/or SDL to fix this problem\n"));
+ log("Waited 5 seconds to close audio. There are some problems here, so killing Widelands."
+ " Update your sound driver and/or SDL to fix this problem\n");
#ifndef _WIN32
raise(SIGKILL);
#endif
@@ -408,7 +406,7 @@
uint32_t maxcl = s.get_natural("maxclients", 8);
for (;;) { // endless loop
if (!InternetGaming::ref().login(name, pwd, registered, meta, port)) {
- dedicatedlog(_("ERROR: Could not connect to metaserver (reason above)!\n"));
+ dedicatedlog("ERROR: Could not connect to metaserver (reason above)!\n");
return;
}
std::string realservername(server);
@@ -436,8 +434,8 @@
std::unique_ptr<Widelands::Map_Loader> ml = map.get_correct_loader(m_filename);
if (!ml) {
throw warning
- (_("Unsupported format"),
- _("Widelands could not load the file \"%s\". The file format seems to be incompatible."),
+ ("Unsupported format",
+ "Widelands could not load the file \"%s\". The file format seems to be incompatible.",
m_filename.c_str());
}
ml->preload_map(true);
@@ -834,7 +832,7 @@
std::unique_ptr<char []> buffer(new char[buffersize]);
int32_t check = _NSGetExecutablePath(buffer.get(), &buffersize);
if (check != 0) {
- throw wexception (_("could not find the path of the main executable"));
+ throw wexception ("could not find the path of the main executable");
}
executabledir = std::string(buffer.get());
executabledir.resize(executabledir.rfind('/') + 1);
@@ -843,7 +841,7 @@
char buffer[PATH_MAX];
size_t size = readlink("/proc/self/exe", buffer, PATH_MAX);
if (size <= 0) {
- throw wexception (_("could not find the path of the main executable"));
+ throw wexception ("could not find the path of the main executable");
}
executabledir = std::string(buffer, size);
executabledir.resize(executabledir.rfind('/') + 1);
@@ -964,7 +962,7 @@
<<
"WARNING: Hardware shutting down although graphics system is still "
"alive!"
- << endl;
+ << std::endl;
init_graphics(0, 0, false, false);
SDL_QuitSubSystem
@@ -1034,6 +1032,7 @@
void WLApplication::handle_commandline_parameters()
{
if (m_commandline.count("help") || m_commandline.count("version")) {
+ init_language();
throw Parameter_error(); //no message on purpose
}
if (m_commandline.count("logfile")) {
@@ -1163,91 +1162,6 @@
}
}
-/**
- * Print usage information
- */
-void WLApplication::show_usage()
-{
- i18n::Textdomain textdomain("widelands"); // uses system standard language
-
- wout << _("This is Widelands-") << build_id() << '(' << build_type();
- wout << ")\n\n";
- wout << _("Usage: widelands <option0>=<value0> ... <optionN>=<valueN>") << "\n\n";
- wout << _("Options:") << "\n\n";
- wout
- << _(" --<config-entry-name>=value overwrites any config file setting") << "\n\n"
- << _(" --logfile=FILENAME Log output to file FILENAME instead of \n"
- " terminal output") << "\n"
- << _(" --datadir=DIRNAME Use specified directory for the widelands\n"
- " data files") << "\n"
- << _(" --homedir=DIRNAME Use specified directory for widelands config\n"
- " files, savegames and replays") << "\n"
-#ifdef __linux__
- << _(" Default is ~/.widelands") << "\n"
-#endif
- << "\n"
- << _(" --coredump=[yes|no] Generates a core dump on segfaults instead\n"
- " of using the SDL") << "\n"
- << _(" --language=[de_DE|sv_SE|...]\n"
- " The locale to use.") << "\n"
- << _(" --localedir=DIRNAME Use DIRNAME as location for the locale") << "\n"
- << _(" --remove_syncstreams=[true|false]\n"
- " Remove syncstream files on startup") << "\n"
- << _(" --remove_replays=[...]\n"
- " Remove replays after this number of days.\n"
- " If this is 0, replays are not deleted.") << "\n\n"
-
- << _("Sound options:") << "\n"
- << _(" --nosound Starts the game with sound disabled.") << "\n"
- << _(" --disable_fx Disable sound effects.") << "\n"
- << _(" --disable_music Disable music.") << "\n\n"
- << _(" --nozip Do not save files as binary zip archives.") << "\n\n"
- << _(" --editor Directly starts the Widelands editor.\n"
- " You can add a =FILENAME to directly load\n"
- " the map FILENAME in editor.") << "\n"
- << _(" --scenario=FILENAME Directly starts the map FILENAME as scenario\n"
- " map.") << "\n"
- << _(" --loadgame=FILENAME Directly loads the savegame FILENAME.") << "\n"
- << _(" --script=FILENAME Run the given Lua script after initialization.\n"
- " Only valid with --scenario, --loadgame, or --editor.") << "\n"
- << _(" --dedicated=FILENAME Starts a dedicated server with FILENAME as map") << "\n"
- << _(" --auto_roadbuild_mode=[yes|no]\n"
- " Whether to enter roadbuilding mode\n"
- " automatically after placing a flag that is\n"
- " not connected to a road.") << "\n\n"
- << _("Graphic options:") << "\n"
- << _(" --fullscreen=[yes|no]\n"
- " Whether to use the whole display for the\n"
- " game screen.") << "\n"
- << _(" --xres=[...] Width of the window in pixel.") << "\n"
- << _(" --yres=[...] Height of the window in pixel.") << "\n"
- << _(" --opengl=[0|1] Enables OpenGL rendering") << "\n\n"
- << _("Options for the internal window manager:") << "\n"
- << _(" --border_snap_distance=[0 ...]\n"
- " Move a window to the edge of the screen\n"
- " when the edge of the window comes within\n"
- " this distance from the edge of the screen.") << "\n"
- << _(" --dock_windows_to_edges=[yes|no]\n"
- " Eliminate a window's border towards the\n"
- " edge of the screen when the edge of the\n"
- " window is next to the edge of the screen.") << "\n"
- << _(" --panel_snap_distance=[0 ...]\n"
- " Move a window to the edge of the panel when\n"
- " the edge of the window comes within this\n"
- " distance from the edge of the panel.") << "\n"
- << _(" --snap_windows_only_when_overlapping=[yes|no]\n"
- " Only move a window to the edge of a panel\n"
- " if the window is overlapping with the\n"
- " panel.") << "\n\n";
- wout
- << _(" --verbose Enable verbose debug messages") << "\n" << endl;
- wout
- << _(" --help Show this help") << "\n" << endl;
- wout
- << _("Bug reports? Suggestions? Check out the project website:\n"
- " https://launchpad.net/widelands\n\n"
- "Hope you enjoy this game!") << "\n\n";
-}
/**
* Run the main menu
@@ -1259,7 +1173,7 @@
if (g_gr->check_fallback_settings_in_effect())
{
- messagetitle = _("Fallback settings in effect");
+ messagetitle = "Fallback settings in effect";
message = _
("Your video settings could not be enabled, and fallback settings are in effect. "
"Please check the graphics options!");
@@ -1294,7 +1208,7 @@
try {
game.run_splayer_scenario_direct("campaigns/tutorial01.wmf", "");
} catch (const std::exception & e) {
- log("Fata exception: %s\n", e.what());
+ log("Fatal exception: %s\n", e.what());
emergency_save(game);
throw;
}
@@ -1332,15 +1246,15 @@
return;
}
} catch (const warning & e) {
- messagetitle = (boost::format(_("Warning: %s")) % e.title()).str();
+ messagetitle = (boost::format("Warning: %s") % e.title()).str();
message = e.what();
} catch (const Widelands::game_data_error & e) {
- messagetitle = _("Game data error");
+ messagetitle = "Game data error";
message = e.what();
}
#ifdef NDEBUG
catch (const std::exception & e) {
- messagetitle = _("Unexpected error during the game");
+ messagetitle = "Unexpected error during the game";
message = e.what();
message +=
@@ -1464,7 +1378,7 @@
if (!host_address)
throw warning
("Invalid Address", "%s",
- _("The address of the game server is invalid"));
+ "The address of the game server is invalid");
peer.host = addr;
peer.port = port;
@@ -1568,7 +1482,7 @@
game.init_newgame(&loaderUI, sp.settings());
game.run(&loaderUI, Widelands::Game::NewNonScenario, "", false);
} catch (const std::exception & e) {
- log("Fata exception: %s\n", e.what());
+ log("Fatal exception: %s\n", e.what());
emergency_save(game);
throw;
}
@@ -1599,7 +1513,7 @@
if (game.run_load_game(filename, ""))
return true;
} catch (const std::exception & e) {
- log("Fata exception: %s\n", e.what());
+ log("Fatal exception: %s\n", e.what());
emergency_save(game);
throw;
}
@@ -1642,7 +1556,7 @@
if (filename.size())
return game.run_splayer_scenario_direct(filename.c_str(), "");
} catch (const std::exception & e) {
- log("Fata exception: %s\n", e.what());
+ log("Fatal exception: %s\n", e.what());
emergency_save(game);
throw;
}
=== modified file 'src/wlapplication.h'
--- src/wlapplication.h 2014-07-26 20:31:46 +0000
+++ src/wlapplication.h 2014-09-16 10:01:33 +0000
@@ -183,8 +183,6 @@
bool campaign_game();
void replay();
- static void show_usage();
-
static void emergency_save(Widelands::Game &);
protected:
=== added file 'src/wlapplication_messages.cc'
--- src/wlapplication_messages.cc 1970-01-01 00:00:00 +0000
+++ src/wlapplication_messages.cc 2014-09-16 10:01:33 +0000
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2012 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "wlapplication_messages.h"
+
+#include <iostream>
+#include <map>
+
+#include <boost/format.hpp>
+
+#include "base/i18n.h"
+
+using std::endl;
+
+
+/**
+ * Print usage information
+ */
+void WLApplicationMessages::show_usage(const char * build_id, const char * build_type)
+{
+ i18n::Textdomain textdomain("widelands_console"); // uses system standard language
+
+ /** TRANSLATORS: %s = version information */
+ std::cout << (boost::format(_("This is Widelands Build %s"))
+ % (boost::format("%s(%s)")
+ % build_id % build_type).str()).str() << endl << endl;
+ std::cout << _("Usage: widelands <option0>=<value0> ... <optionN>=<valueN>") << endl << endl;
+ std::cout << _("Options:") << endl << endl;
+ std::cout
+ << _(" --<config-entry-name>=value overwrites any config file setting") << endl << endl
+ << _(" --logfile=FILENAME Log output to file FILENAME instead of \n"
+ " terminal output") << endl
+ << _(" --datadir=DIRNAME Use specified directory for the widelands\n"
+ " data files") << endl
+ << _(" --homedir=DIRNAME Use specified directory for widelands config\n"
+ " files, savegames and replays") << endl
+#ifdef __linux__
+ << _(" Default is ~/.widelands") << endl
+#endif
+ << endl
+ << _(" --coredump=[yes|no] Generates a core dump on segfaults instead\n"
+ " of using the SDL") << endl
+ << _(" --language=[de_DE|sv_SE|...]\n"
+ " The locale to use.") << endl
+ << _(" --localedir=DIRNAME Use DIRNAME as location for the locale") << endl
+ << _(" --remove_syncstreams=[true|false]\n"
+ " Remove syncstream files on startup") << endl
+ << _(" --remove_replays=[...]\n"
+ " Remove replays after this number of days.\n"
+ " If this is 0, replays are not deleted.") << endl << endl
+
+ << _("Sound options:") << endl
+ << _(" --nosound Starts the game with sound disabled.") << endl
+ << _(" --disable_fx Disable sound effects.") << endl
+ << _(" --disable_music Disable music.") << endl << endl
+ << _(" --nozip Do not save files as binary zip archives.") << endl << endl
+ << _(" --editor Directly starts the Widelands editor.\n"
+ " You can add a =FILENAME to directly load\n"
+ " the map FILENAME in editor.") << endl
+ << _(" --scenario=FILENAME Directly starts the map FILENAME as scenario\n"
+ " map.") << endl
+ << _(" --loadgame=FILENAME Directly loads the savegame FILENAME.") << endl
+ << _(" --script=FILENAME Run the given Lua script after initialization.\n"
+ " Only valid with --scenario, --loadgame, or --editor.") << endl
+ << _(" --dedicated=FILENAME Starts a dedicated server with FILENAME as map") << endl
+ << _(" --auto_roadbuild_mode=[yes|no]\n"
+ " Whether to enter roadbuilding mode\n"
+ " automatically after placing a flag that is\n"
+ " not connected to a road.") << endl << endl
+ << _("Graphic options:") << endl
+ << _(" --fullscreen=[yes|no]\n"
+ " Whether to use the whole display for the\n"
+ " game screen.") << endl
+ << _(" --xres=[...] Width of the window in pixel.") << endl
+ << _(" --yres=[...] Height of the window in pixel.") << endl
+ << _(" --opengl=[0|1] Enables OpenGL rendering") << endl << endl
+ << _("Options for the internal window manager:") << endl
+ << _(" --border_snap_distance=[0 ...]\n"
+ " Move a window to the edge of the screen\n"
+ " when the edge of the window comes within\n"
+ " this distance from the edge of the screen.") << endl
+ << _(" --dock_windows_to_edges=[yes|no]\n"
+ " Eliminate a window's border towards the\n"
+ " edge of the screen when the edge of the\n"
+ " window is next to the edge of the screen.") << endl
+ << _(" --panel_snap_distance=[0 ...]\n"
+ " Move a window to the edge of the panel when\n"
+ " the edge of the window comes within this\n"
+ " distance from the edge of the panel.") << endl
+ << _(" --snap_windows_only_when_overlapping=[yes|no]\n"
+ " Only move a window to the edge of a panel\n"
+ " if the window is overlapping with the\n"
+ " panel.") << endl << endl;
+ std::cout
+ << _(" --verbose Enable verbose debug messages") << endl << endl;
+ std::cout
+ << _(" --help Show this help") << endl << endl;
+ std::cout
+ << _("Bug reports? Suggestions? Check out the project website:\n"
+ " https://launchpad.net/widelands\n\n"
+ "Hope you enjoy this game!") << endl;
+}
=== added file 'src/wlapplication_messages.h'
--- src/wlapplication_messages.h 1970-01-01 00:00:00 +0000
+++ src/wlapplication_messages.h 2014-09-16 10:01:33 +0000
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2012 by the Widelands Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WL_WLAPPLICATION_MESSAGES_H
+#define WL_WLAPPLICATION_MESSAGES_H
+
+struct WLApplicationMessages {
+public:
+ static void show_usage(const char * build_id, const char * build_type);
+};
+
+#endif // end of include guard: WL_WLAPPLICATION_MESSAGES_H
=== modified file 'utils/buildcat.py'
--- utils/buildcat.py 2014-07-26 13:09:59 +0000
+++ utils/buildcat.py 2014-09-16 10:01:33 +0000
@@ -36,13 +36,17 @@
"../../txts/editor_readme",
"../../txts/tips/*.tip"] ),
( "widelands/widelands", [
- "../../src/*.cc",
+ "../../src/wlapplication.cc",
"../../src/*/*.cc",
"../../src/*/*/*.cc",
- "../../src/*.h",
+ "../../src/wlapplication.h",
"../../src/*/*.h",
"../../src/*/*/*.h",
] ),
+ ( "widelands_console/widelands_console", [
+ "../../src/wlapplication_messages.cc",
+ "../../src/wlapplication_messages.h",
+ ] ),
( "win_conditions/win_conditions", [
"../../scripting/win_conditions/*.lua",
"../../scripting/win_condition_texts.lua",
@@ -258,7 +262,7 @@
oldcwd = os.getcwd()
os.chdir(path)
potfile = os.path.basename(pot) + '.pot'
- if pot.endswith('widelands'):
+ if pot.startswith('widelands'):
# This catalogs can be built with xgettext
do_compile_src(potfile , srcfiles )
succ = True
@@ -272,7 +276,6 @@
else:
os.rmdir(path)
-
print("")
References