]> git.lyx.org Git - lyx.git/blobdiff - src/support/Messages.cpp
there is no trunk/src/intl folder
[lyx.git] / src / support / Messages.cpp
index b8ae5a0ac3fb6b924ba6760cf0c0138ec8bb29be..b1483d294ca1be8eca347d76ba1759641307fde2 100644 (file)
@@ -17,7 +17,7 @@
 #include "support/Package.h"
 #include "support/unicode.h"
 
-#include <boost/assert.hpp>
+#include "support/assert.h"
 
 #include <cerrno>
 
@@ -60,7 +60,7 @@ void cleanTranslation(docstring & trans)
 #  if HAVE_GETTEXT
 #    include <libintl.h>      // use the header already in the system *EK*
 #  else
-#    include "../intl/libintl.h"
+#    include "../../intl/libintl.h"
 #  endif
 
 using namespace lyx::support;
@@ -111,8 +111,8 @@ docstring const Messages::get(string const & m) const
 
        // The string was not found, use gettext to generate it
 
-       string const oldLANGUAGE = getEnv("LANGUAGE");
-       string const oldLC_ALL = getEnv("LC_ALL");
+       static string const oldLANGUAGE = getEnv("LANGUAGE");
+       static string const oldLC_ALL = getEnv("LC_ALL");
        if (!lang_.empty()) {
                // This GNU extension overrides any language locale
                // wrt gettext.
@@ -155,10 +155,10 @@ docstring const Messages::get(string const & m) const
 #endif
        }
 
-       std::pair<TranslationCache::iterator, bool> result =
-               cache_.insert(std::make_pair(m, trans));
+       pair<TranslationCache::iterator, bool> result =
+               cache_.insert(make_pair(m, trans));
 
-       BOOST_ASSERT(result.second);
+       LASSERT(result.second, /**/);
 
        return result.first->second;
 }
@@ -198,12 +198,12 @@ namespace lyx {
 // libstdc++ that is distributed with GNU G++.
 class Messages::Pimpl {
 public:
-       typedef std::messages<char>::catalog catalog;
+       typedef messages<char>::catalog catalog;
 
        Pimpl(string const & l)
                : lang_(l),
                  loc_gl(lang_.c_str()),
-                 mssg_gl(std::use_facet<std::messages<char> >(loc_gl))
+                 mssg_gl(use_facet<messages<char> >(loc_gl))
        {
                //LYXERR("Messages: language(" << l << ") in dir(" << dir << ")");
 
@@ -225,9 +225,9 @@ private:
        ///
        string lang_;
        ///
-       std::locale loc_gl;
+       locale loc_gl;
        ///
-       std::messages<char> const & mssg_gl;
+       messages<char> const & mssg_gl;
        ///
        catalog cat_gl;
 };