← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1169445 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1169445 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1169445 in widelands: "Commandline options 1/0 <=> true/false on win32"
  https://bugs.launchpad.net/widelands/+bug/1169445

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1169445/+merge/238399

Removed the [0|1] restriction from the opengl commandline parameter and made the help strings consistent. Added optional localizeable commandline true/false values.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1169445/+merge/238399
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1169445 into lp:widelands.
=== modified file 'src/profile/profile.cc'
--- src/profile/profile.cc	2014-09-30 05:41:55 +0000
+++ src/profile/profile.cc	2014-10-15 08:26:04 +0000
@@ -36,21 +36,39 @@
 #include "logic/tribe.h"
 #include "logic/world/world.h"
 
-#define TRUE_WORDS 4
+#define TRUE_WORDS 7
 static char const * trueWords[TRUE_WORDS] =
 {
 	"true",
+	/** TRANSLATORS: A variant of the commandline parameter "true" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("true"),
 	"yes",
+	/** TRANSLATORS: A variant of the commandline parameter "true" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("yes"),
 	"on",
+	/** TRANSLATORS: A variant of the commandline parameter "true" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("on"),
 	"1"
 };
 
-#define FALSE_WORDS 4
+#define FALSE_WORDS 7
 static char const * falseWords[FALSE_WORDS] =
 {
 	"false",
+	/** TRANSLATORS: A variant of the commandline parameter "false" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("false"),
 	"no",
+	/** TRANSLATORS: A variant of the commandline parameter "false" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("no"),
 	"off",
+	/** TRANSLATORS: A variant of the commandline parameter "false" value */
+	/** TRANSLATORS: Needs to be consistent with the translations in widelands-console */
+	_("off"),
 	"0"
 };
 

=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc	2014-10-11 11:14:25 +0000
+++ src/wlapplication.cc	2014-10-15 08:26:04 +0000
@@ -970,17 +970,6 @@
 		m_commandline.erase("nozip");
 	}
 
-	if (m_commandline.count("opengl")) {
-		if (m_commandline["opengl"].compare("0") == 0) {
-			g_options.pull_section("global").create_val("opengl", "false");
-		} else if (m_commandline["opengl"].compare("1") == 0) {
-			g_options.pull_section("global").create_val("opengl", "true");
-		} else {
-			log ("Invalid option opengl=[0|1]\n");
-		}
-		m_commandline.erase("opengl");
-	}
-
 	if (m_commandline.count("datadir")) {
 		log ("Adding directory: %s\n", m_commandline["datadir"].c_str());
 		m_use_default_datadir = false;

=== modified file 'src/wlapplication_messages.cc'
--- src/wlapplication_messages.cc	2014-09-18 15:38:35 +0000
+++ src/wlapplication_messages.cc	2014-10-15 08:26:04 +0000
@@ -54,11 +54,16 @@
 		<< _("                      Default is ~/.widelands") << endl
 #endif
 		<< endl
-		<< _(" --coredump=[yes|no]  Generates a core dump on segfaults instead\n"
-			  "                      of using the SDL") << endl
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
+		<< _(" --coredump=[true|false]\n"
+			  "                      Generates a core dump on segfaults instead of\n"
+			  "                      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
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
 		<< _(" --remove_syncstreams=[true|false]\n"
 			  "                      Remove syncstream files on startup") << endl
 		<< _(" --remove_replays=[...]\n"
@@ -79,23 +84,32 @@
 		<< _(" --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"
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
+		<< _(" --auto_roadbuild_mode=[true|false]\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"
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
+		<< _(" --fullscreen=[true|false]\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
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
+		<< _(" --opengl=[true|false]\n"
+			  "                      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"
+			/** TRANSLATORS: You may translate true/false, also as on/off or yes/no, but "*/
+			/** TRANSLATORS: it HAS TO BE CONSISTENT with the translation in the widelands textdomain "*/
+		<< _(" --dock_windows_to_edges=[true|false]\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


Follow ups