]> git.lyx.org Git - lyx.git/blobdiff - src/messages.C
Fix loop when opening TOC widget in an empty document, basically by Richard Heck.
[lyx.git] / src / messages.C
index 37f8814a435cba6e7dcee871b0158c70bb934408..b93ab6d1c7fa35dedbaccdbb4d7fbcecc568eafd 100644 (file)
@@ -112,14 +112,15 @@ docstring const Messages::get(string const & m) const
 
        setlocale(LC_CTYPE, lang_.c_str());
        errno = 0;
-       char const * c = bindtextdomain(PACKAGE, package().locale_dir().c_str());
+       string const locale_dir = package().locale_dir().toFilesystemEncoding();
+       char const * c = bindtextdomain(PACKAGE, locale_dir.c_str());
        int e = errno;
        if (e) {
                LYXERR(Debug::DEBUG)
                << BOOST_CURRENT_FUNCTION << '\n'
                        << "Error code: " << errno << '\n'
                        << "Lang, mess: " << lang_ << " " << m << '\n'
-                       << "Directory : " << package().locale_dir() << '\n'
+                       << "Directory : " << package().locale_dir().absFilename() << '\n'
                        << "Rtn value : " << c << endl;
        }
 
@@ -222,7 +223,8 @@ public:
                //lyxerr << "Messages: language(" << l
                //       << ") in dir(" << dir << ")" << endl;
 
-               cat_gl = mssg_gl.open(PACKAGE, loc_gl, package().locale_dir().c_str());
+               string const locale_dir = package().locale_dir().toFilesystemEncoding();
+               cat_gl = mssg_gl.open(PACKAGE, loc_gl, locale_dir.c_str());
 
        }