Translated using Weblate (Lithuanian)
[oweals/minetest.git] / src / gettext.cpp
index 1fab875e5e14745272beee1e12ff156695a3358a..6818004df158eb513abb659e47cc7d9f4b5c0007 100644 (file)
@@ -18,9 +18,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include <string>
-#include <string.h>
+#include <cstring>
 #include <iostream>
-#include <stdlib.h>
+#include <cstdlib>
 #include "gettext.h"
 #include "util/string.h"
 #include "log.h"
@@ -160,7 +160,7 @@ void init_gettext(const char *path, const std::string &configured_language,
 
                        // Allow calling without an extension
                        std::string app_name = argv[0];
-                       if (app_name.compare(appname.size() - 4, 4, ".exe") != 0)
+                       if (app_name.compare(app_name.size() - 4, 4, ".exe") != 0)
                                app_name += ".exe";
 
                        STARTUPINFO startup_info = {0};
@@ -217,7 +217,10 @@ void init_gettext(const char *path, const std::string &configured_language,
 #endif
 #endif
 
-       static std::string name = lowercase(PROJECT_NAME);
+       std::string name = lowercase(PROJECT_NAME);
+       infostream << "Gettext: domainname=\"" << name
+               << "\" path=\"" << path << "\"" << std::endl;
+
        bindtextdomain(name.c_str(), path);
        textdomain(name.c_str());
 
@@ -246,4 +249,3 @@ void init_gettext(const char *path, const std::string &configured_language,
        infostream << "Message locale is now set to: "
                        << setlocale(LC_ALL, 0) << std::endl;
 }
-