aboutsummaryrefslogtreecommitdiff
path: root/src/gettext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gettext.cpp')
-rw-r--r--src/gettext.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/gettext.cpp b/src/gettext.cpp
index 0c0e520ca..688a22570 100644
--- a/src/gettext.cpp
+++ b/src/gettext.cpp
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stdlib.h>
#include "gettext.h"
#include "util/string.h"
+#include "log.h"
#if USE_GETTEXT && defined(_MSC_VER)
#include <WinNls.h>
@@ -116,9 +117,9 @@ const char* MSVC_LocaleLookup(const char* raw_shortname) {
/******************************************************************************/
#ifdef _MSC_VER
-void init_gettext(const char *path,std::string configured_language,int argc, char** argv) {
+void init_gettext(const char *path, const std::string &configured_language, int argc, char** argv) {
#else
-void init_gettext(const char *path,std::string configured_language) {
+void init_gettext(const char *path, const std::string &configured_language) {
#endif
#if USE_GETTEXT
/** first try to set user override environment **/
@@ -173,15 +174,15 @@ void init_gettext(const char *path,std::string configured_language) {
}
if (!CreateProcess(appname.c_str(),
- (char*) ptr_parameters,
- NULL,
- NULL,
- false,
- DETACHED_PROCESS | CREATE_UNICODE_ENVIRONMENT,
- NULL,
- NULL,
- &startupinfo,
- &processinfo)) {
+ (char*) ptr_parameters,
+ NULL,
+ NULL,
+ false,
+ DETACHED_PROCESS | CREATE_UNICODE_ENVIRONMENT,
+ NULL,
+ NULL,
+ &startupinfo,
+ &processinfo)) {
char buffer[1024];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
@@ -261,9 +262,6 @@ void init_gettext(const char *path,std::string configured_language) {
setlocale(LC_NUMERIC,"C");
infostream << "Message locale is now set to: "
- << setlocale(LC_ALL,0) << std::endl;
+ << setlocale(LC_ALL, 0) << std::endl;
}
-
-
-