]> git.lyx.org Git - lyx.git/blobdiff - src/support/Messages.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / support / Messages.cpp
index 26a320b2d243c753c727b19947aade5ebfe0457b..57c18d522e2afadf45539aa1fdb53df43409857a 100644 (file)
@@ -347,6 +347,19 @@ docstring const Messages::get(string const & m) const
        }
 }
 
+
+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
@@ -375,6 +388,11 @@ bool Messages::available(string const & /* c */)
        return false;
 }
 
+docstring const Messages::getIfFound(string const & m) const
+{
+       return docstring();
+}
+
 } // namespace lyx
 
 #endif