]> git.lyx.org Git - lyx.git/blobdiff - src/support/Messages.cpp
Add quote style information to languages
[lyx.git] / src / support / Messages.cpp
index 0aa29d84e0290caecd3b0e36e865c0a637c29d51..8d85460ea6dba9e1930b181f9bd73b64f1ab9be1 100644 (file)
@@ -29,8 +29,6 @@ namespace lyx {
 // Instanciate static member.
 string Messages::main_lang_;
 
-namespace {
-
 void cleanTranslation(docstring & trans) 
 {
        /*
@@ -51,7 +49,6 @@ void cleanTranslation(docstring & trans)
        }
 }
 
-} // anonymous
 } // lyx
 
 
@@ -64,7 +61,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;
@@ -165,6 +162,11 @@ docstring const Messages::get(string const & m) const
 #endif
        }
 
+       // FIXME: gettext sometimes "forgets" the ucs4_codeset we set
+       // in init(), which leads to severe message corruption (#7371)
+       // We set it again here unconditionally. A real fix must be found!
+       LASSERT(bind_textdomain_codeset(PACKAGE, ucs4_codeset), /**/);
+
        char const * m_c = m.c_str();
        char const * trans_c = gettext(m_c);
        docstring trans;
@@ -231,7 +233,7 @@ docstring const Messages::get(string const & m) const
 
 bool Messages::available() const
 {
-       return true;
+       return false;
 }
 
 } // namespace lyx