Skip to content

Commit bb54e2c

Browse files
sapiersapier
sapier
authored and
sapier
committedNov 11, 2013
Disable localization workaround in server
1 parent 22a59b3 commit bb54e2c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎src/gettext.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,14 @@ void init_gettext(const char *path,std::string configured_language) {
142142

143143
SetEnvironmentVariableA("LANGUAGE",configured_language.c_str());
144144

145+
#ifndef SERVER
145146
//very very dirty workaround to force gettext to see the right environment
146147
if (current_language_var != configured_language) {
147148
STARTUPINFO startupinfo;
148149
PROCESS_INFORMATION processinfo;
149150
memset(&startupinfo,0,sizeof(startupinfo));
150151
memset(&processinfo,0,sizeof(processinfo));
151-
errorstream << "MSVC localization workaround aktive restating minetest in new environment!" << std::endl;
152+
errorstream << "MSVC localization workaround active restating minetest in new environment!" << std::endl;
152153

153154
std::string parameters = "";
154155

@@ -199,6 +200,13 @@ void init_gettext(const char *path,std::string configured_language) {
199200
else {
200201
exit(0);
201202
}
203+
#else
204+
errorstream << "*******************************************************" << std::endl;
205+
errorstream << "Can't apply locale workaround for server!" << std::encl;
206+
errorstream << "Expect language to be broken!" << std::endl;
207+
errorstream << "*******************************************************" << std::endl;
208+
209+
#endif
202210
}
203211

204212
setlocale(LC_ALL,configured_language.c_str());

0 commit comments

Comments
 (0)
Please sign in to comment.