Locale dir should be parallel to global data dir
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 24 Jul 2011 17:20:40 +0000 (19:20 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 24 Jul 2011 17:23:03 +0000 (19:23 +0200)
cmake/Modules/FindGettextLib.cmake
src/main.cpp

index a215f3f8d8d14276636e38bae058907f9d46fd8f..18935eaadb3e06cb6a6be009256d0bd6a48c06b9 100644 (file)
@@ -56,7 +56,7 @@ ENDIF()
 IF(GETTEXT_FOUND)
        SET(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
        SET(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
-       SET(GETTEXT_MO_DEST_PATH locale/<locale>/LC_MESSAGES)
+       SET(GETTEXT_MO_DEST_PATH ${DATADIR}/../locale/<locale>/LC_MESSAGES)
        FILE(GLOB GETTEXT_AVAILABLE_LOCALES RELATIVE ${GETTEXT_PO_PATH} "${GETTEXT_PO_PATH}/*")
        LIST(REMOVE_ITEM GETTEXT_AVAILABLE_LOCALES minetest.pot)
        MACRO(SET_MO_PATHS _buildvar _destvar _locale)
index 0001d33ecb71caa8855dcd4f39848c4684638d97..bcca60d95d58ba16e343f035bef17e7fd80e86f1 100644 (file)
@@ -1132,7 +1132,7 @@ int main(int argc, char *argv[])
        // Create user data directory\r
        fs::CreateDir(porting::path_userdata);\r
 \r
-       init_gettext((porting::path_userdata+"/locale").c_str());\r
+       init_gettext((porting::path_data+"/../locale").c_str());\r
 \r
        // Initialize debug streams\r
 #ifdef RUN_IN_PLACE\r