#include "support/lassert.h"
-#include <boost/cstdint.hpp>
-
#include <cerrno>
+#include <cstdint>
#include <fstream>
#include <utility>
#endif
using namespace std;
-using boost::uint32_t;
namespace lyx {
}
}
-} // lyx
+} // namespace lyx
#ifdef ENABLE_NLS
}
return string();
}
-}
+} // namespace
bool Messages::available(string const & c)
}
-} // namespace anon
+} // namespace
bool Messages::readMoFile()
{
if (header->magic != 0x950412de) {
LYXERR0("Wrong magic number for file " << filen
- << ".\nExpected 0x950412de, got 0x" << std::hex << header->magic);
+ << ".\nExpected 0x950412de, got 0x" << std::hex << header->magic << std::dec);
return false;
}
}
}
+
+docstring const Messages::getIfFound(string const & m) const
+{
+ if (m.empty())
+ return docstring();
+
+ TranslationMap::const_iterator it = trans_map_.find(m);
+ if (it != trans_map_.end())
+ return it->second;
+ else
+ return docstring();
+}
+
} // namespace lyx
#else // ENABLE_NLS
}
std::string Messages::language() const
- {
- return string();
- }
+{
+ return string();
+}
bool Messages::available(string const & /* c */)
{
return false;
}
+docstring const Messages::getIfFound(string const & /* m */) const
+{
+ return docstring();
+}
+
} // namespace lyx
#endif