← Back to team overview

widelands-dev team mailing list archive

[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/267432

Fixed bug where localization is not yet initialized when handling command line. Also allows "--language=[ISO-Code] --help". Patch by Miroslav Remák (miroslavr256).

I already checked the code, just creating a merge request so I can have another look at the diff ;)
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-978175 into lp:widelands.
=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc	2015-06-09 09:22:36 +0000
+++ src/wlapplication.cc	2015-08-08 13:59:17 +0000
@@ -901,10 +901,6 @@
 */
 void WLApplication::handle_commandline_parameters()
 {
-	if (m_commandline.count("help") || m_commandline.count("version")) {
-		init_language();
-		throw ParameterError(); //no message on purpose
-	}
 	if (m_commandline.count("logfile")) {
 		m_logfile = m_commandline["logfile"];
 		std::cerr << "Redirecting log target to: " <<  m_logfile << std::endl;
@@ -1025,6 +1021,11 @@
 		g_options.pull_section("global").create_val
 			(it->first.c_str(), it->second.c_str());
 	}
+
+	if (m_commandline.count("help") || m_commandline.count("version")) {
+		init_language();
+		throw ParameterError(); //no message on purpose
+	}
 }
 
 


Follow ups