]> git.lyx.org Git - lyx.git/blobdiff - src/messages.C
Remove the inset and view member functions from PreviewedInset.
[lyx.git] / src / messages.C
index 77ee44a4a7c5f863e411820255ee0ea30f1af313..0fcf097708f33bccf4eca75225e2270050aa5e56 100644 (file)
@@ -4,14 +4,19 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "messages.h"
-#include "debug.h"
 #include "support/filetools.h"
+#include "support/path_defines.h"
+
+using lyx::support::GetEnvPath;
+using lyx::support::lyx_localedir;
+
+using std::string;
 
 
 #ifdef ENABLE_NLS
@@ -25,7 +30,7 @@ string const & getLocaleDir()
        if (locale_dir.empty()) {
                locale_dir = GetEnvPath("LYX_LOCALEDIR");
                if (locale_dir.empty())
-                       locale_dir = LOCALEDIR;
+                       locale_dir = lyx_localedir();
        }
        return locale_dir;
 }
@@ -34,7 +39,7 @@ string const & getLocaleDir()
 
 #if 0
 
-#include <locale>
+-#include <locale>
 
 // This version of the Pimpl utilizes the message capability of
 // libstdc++ that is distributed with GNU G++.
@@ -102,6 +107,9 @@ public:
 
        string const get(string const & m) const
        {
+               if (m.empty())
+                       return m;
+
                char * old = strdup(setlocale(LC_ALL, 0));
                char * n = setlocale(LC_ALL, lang_.c_str());
                const char* msg = gettext(m.c_str());
@@ -114,8 +122,6 @@ public:
 private:
        ///
        string lang_;
-       ///
-       string localedir_;
 };
 #endif