summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-24 11:00:38 -0700
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-24 11:00:38 -0700
commita5a9c9f799dfbad2e542e4bd7b2c9ae7821ecb6b (patch)
tree40f6a2c0a445216ae797c0c15dd427c7dee6a358 /src
parent71b7d925970f38a993ff9f7c3f3939a0c0b8112b (diff)
parentcce210f6768ab9960248f07d2b203dfae660daac (diff)
downloadminetest-a5a9c9f799dfbad2e542e4bd7b2c9ae7821ecb6b.tar.gz
minetest-a5a9c9f799dfbad2e542e4bd7b2c9ae7821ecb6b.tar.bz2
minetest-a5a9c9f799dfbad2e542e4bd7b2c9ae7821ecb6b.zip
Merge pull request #36 from Oblomov/master
Some more gettext stuff
Diffstat (limited to 'src')
-rw-r--r--src/cmake_config.h.in1
-rw-r--r--src/gettext.h2
-rw-r--r--src/main.cpp4
-rw-r--r--src/servermain.cpp2
4 files changed, 6 insertions, 3 deletions
diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in
index 6a8f93bac..7cbb11f6b 100644
--- a/src/cmake_config.h.in
+++ b/src/cmake_config.h.in
@@ -6,6 +6,7 @@
#define PROJECT_NAME "@PROJECT_NAME@"
#define INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define VERSION_STRING "@VERSION_STRING@"
+#define USE_GETTEXT @USE_GETTEXT@
#ifdef NDEBUG
#define BUILD_TYPE "Release"
#else
diff --git a/src/gettext.h b/src/gettext.h
index 7c3a6ffab..493f9b21b 100644
--- a/src/gettext.h
+++ b/src/gettext.h
@@ -1,3 +1,5 @@
+#include "config.h" // for USE_GETTEXT
+
#if USE_GETTEXT
#include <libintl.h>
#else
diff --git a/src/main.cpp b/src/main.cpp
index bdfbc35f7..bcca60d95 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1132,7 +1132,7 @@ int main(int argc, char *argv[])
// Create user data directory
fs::CreateDir(porting::path_userdata);
- init_gettext((porting::path_userdata+"/locale").c_str());
+ init_gettext((porting::path_data+"/../locale").c_str());
// Initialize debug streams
#ifdef RUN_IN_PLACE
@@ -1153,7 +1153,7 @@ int main(int argc, char *argv[])
BEGIN_DEBUG_EXCEPTION_HANDLER
// Print startup message
- dstream<<DTIME<<"minetest-c55"
+ dstream<<DTIME<<PROJECT_NAME <<
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
<<", "<<BUILD_INFO
<<std::endl;
diff --git a/src/servermain.cpp b/src/servermain.cpp
index 146c548c5..b8fb9ba2b 100644
--- a/src/servermain.cpp
+++ b/src/servermain.cpp
@@ -162,7 +162,7 @@ int main(int argc, char *argv[])
BEGIN_DEBUG_EXCEPTION_HANDLER
// Print startup message
- dstream<<DTIME<<"minetest-c55"
+ dstream<<DTIME<<PROJECT_NAME <<
" with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST
<<", "<<BUILD_INFO
<<std::endl;