]> git.lyx.org Git - lyx.git/blobdiff - src/messages.C
* Painter.h:
[lyx.git] / src / messages.C
index 2b049c705efee0908dbc805f95190f11e96f1f01..f35038f62cdbd4ab11edba2802dd9d0a7a4a83a1 100644 (file)
 
 #include <cerrno>
 
-using lyx::support::package;
-using lyx::support::getEnv;
-using lyx::support::setEnv;
 
-using lyx::char_type;
-using lyx::docstring;
-using lyx::from_ascii;
+namespace lyx {
+
+using support::package;
+using support::getEnv;
+using support::setEnv;
 
 using std::string;
 using std::endl;
@@ -114,7 +113,7 @@ public:
        docstring const get(string const & m) const
        {
                if (m.empty())
-                       return lyx::from_ascii(m);
+                       return from_ascii(m);
 
                // In this order, see support/filetools.C:
                string lang = getEnv("LC_ALL");
@@ -196,11 +195,11 @@ public:
                        lyxerr << "Undefined result from gettext" << endl;
                        translated = from_ascii(tmp);
                } else if (msg == tmp) {
-                       lyxerr << "Same as entered returned" << endl;
+                       //lyxerr << "Same as entered returned" << endl;
                        translated = from_ascii(tmp);
                } else {
                        lyxerr << "We got a translation" << endl;
-                       lyx::char_type const * ucs4 = reinterpret_cast<lyx::char_type const *>(msg);
+                       char_type const * ucs4 = reinterpret_cast<char_type const *>(msg);
                        translated = ucs4;
                }
 #endif
@@ -224,9 +223,9 @@ public:
 
        ~Pimpl() {}
 
-       string const get(string const & m) const
+       docstring const get(string const & m) const
        {
-               return m;
+               return from_ascii(m);
        }
 };
 #endif
@@ -251,3 +250,6 @@ docstring const Messages::get(string const & msg) const
 {
        return pimpl_->get(msg);
 }
+
+
+} // namespace lyx