Gettext domain should match the project name
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 23 Jul 2011 13:49:06 +0000 (15:49 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 24 Jul 2011 07:19:25 +0000 (09:19 +0200)
This partially reverts 023cc0d37776976b4b192b7363f73a5d2debdef6, goes
back to using PROJECT_NAME for the filename and also uses PROJECT_NAME
as text domain in the source code.

src/CMakeLists.txt
src/main.cpp

index 5554ec448f0edac2b285f6349677ebc1d3098c05..6daf9385cba1644f5bfc903ec8f53617bb48bcd4 100644 (file)
@@ -327,7 +327,7 @@ if (GETTEXT_FOUND AND USE_GETTEXT)
                                COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
                                COMMENT "mo-update [${LOCALE}]: Creating locale directory.")
 
-                       set(MO_FILE_PATH "${MO_BUILD_PATH}/minetest.mo")
+                       set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
 
                        add_custom_command(
                                OUTPUT ${MO_FILE_PATH}
index 11941a43fc7dd50eb94830441d0b0efcff09611c..2f48d229f1f755fc252764a745542b77593d8152 100644 (file)
@@ -1134,8 +1134,8 @@ int main(int argc, char *argv[])
 \r
 #ifdef LC_MESSAGES\r
        setlocale(LC_MESSAGES, "");
-       bindtextdomain("minetest", (porting::path_userdata+"/locale").c_str());\r
-       textdomain("minetest");\r
+       bindtextdomain(PROJECT_NAME, (porting::path_userdata+"/locale").c_str());\r
+       textdomain(PROJECT_NAME);\r
 #endif\r
 \r
        // Initialize debug streams\r