X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fclient%2FMessages.cpp;h=9f54bc73ed08d2c6b5d33cac65d61f618c028cd9;hb=dba4f28b6269c0ebd7a4e70a82ca10cf6c4a6ff8;hp=27117fd5195c6f6a4b719b9eb84a961bba175da8;hpb=138b23fac84930cdbfada0067c61480989041113;p=lyx.git diff --git a/src/client/Messages.cpp b/src/client/Messages.cpp index 27117fd519..9f54bc73ed 100644 --- a/src/client/Messages.cpp +++ b/src/client/Messages.cpp @@ -2,7 +2,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author Lars Gullik Bjønnes + * \author Lars Gullik Bjønnes * * Full author contact details are available in file CREDITS. */ @@ -10,43 +10,39 @@ #include #include "Messages.h" -#include "debug.h" +#include "support/debug.h" #include "support/filetools.h" #include "support/Package.h" #include "support/unicode.h" -#include - #include +#include +using namespace std; +using namespace lyx::support; namespace lyx { -using lyx::support::package; -using std::endl; -using std::string; - #ifdef ENABLE_NLS - #if 0 --#include +#include // This version of the Pimpl utilizes the message capability of // libstdc++ that is distributed with GNU G++. class Messages::Pimpl { public: - typedef std::messages::catalog catalog; + typedef messages::catalog catalog; Pimpl(string const & l) : lang_(l), loc_gl(lang_.c_str()), - mssg_gl(std::use_facet >(loc_gl)) + mssg_gl(use_facet >(loc_gl)) { //lyxerr << "Messages: language(" << l - // << ") in dir(" << dir << ")" << std::endl; + // << ") in dir(" << dir << ")" << endl; string const locale_dir = package().locale_dir().toFilesystemEncoding(); cat_gl = mssg_gl.open(PACKAGE, loc_gl, locale_dir.c_str()); @@ -66,9 +62,9 @@ private: /// string lang_; /// - std::locale loc_gl; + locale loc_gl; /// - std::messages const & mssg_gl; + messages const & mssg_gl; /// catalog cat_gl; }; @@ -81,7 +77,7 @@ private: # if HAVE_GETTEXT # include // use the header already in the system *EK* # else -# include "../intl/libintl.h" +# include "intl/libintl.h" # endif // This is a more traditional variant. @@ -91,7 +87,7 @@ public: : lang_(l) { //lyxerr << "Messages: language(" << l - // << ") in dir(" << dir << ")" << std::endl; + // << ") in dir(" << dir << ")" << endl; } @@ -116,20 +112,17 @@ public: char const * c = bindtextdomain(PACKAGE, locale_dir.c_str()); int e = errno; if (e) { - LYXERR(Debug::DEBUG) - << BOOST_CURRENT_FUNCTION << '\n' + LYXERR(Debug::DEBUG, "Messages::get()" << '\n' << "Error code: " << errno << '\n' << "Lang, mess: " << lang_ << " " << m << '\n' - << "Directory : " << package().locale_dir().absFilename() << '\n' - << "Rtn value : " << c << endl; + << "Directory : " << package().locale_dir().absFileName() << '\n' + << "Rtn value : " << c); } if (!bind_textdomain_codeset(PACKAGE, ucs4_codeset)) { - LYXERR(Debug::DEBUG) - << BOOST_CURRENT_FUNCTION << '\n' + LYXERR(Debug::DEBUG, "Messages::get()" << '\n' << "Error code: " << errno << '\n' - << "Codeset : " << ucs4_codeset << '\n' - << endl; + << "Codeset : " << ucs4_codeset << '\n'); } textdomain(PACKAGE); @@ -144,7 +137,7 @@ public: //lyxerr << "Same as entered returned" << endl; translated = from_ascii(tmp); } else { - LYXERR(Debug::DEBUG) << "We got a translation" << endl; + LYXERR(Debug::DEBUG, "We got a translation"); char_type const * ucs4 = reinterpret_cast(msg); translated = ucs4; }