]> git.lyx.org Git - lyx.git/blobdiff - src/support/Messages.h
Strip gecos on Unix systems on user name only.
[lyx.git] / src / support / Messages.h
index be94ec83c1609b222acdbebff06dc4bacd5afa4e..9ef8dc3ae9a0703516346eab43249bef6489dd56 100644 (file)
@@ -26,6 +26,8 @@ public:
        Messages(std::string const & l = std::string());
        ///
        docstring const get(std::string const & msg) const;
+       /// Is an (at least partial) translation of this language available?
+       bool available() const;
        ///
        static void init();
        ///
@@ -43,17 +45,20 @@ private:
        ///
        typedef std::map<std::string, docstring> TranslationCache;
        /// Internal cache for gettext translated strings.
-       /// This is needed for performance reason within \c updateLabels()
+       /// This is needed for performance reason within \c updateBuffer()
        /// under Windows.
        mutable TranslationCache cache_;
 };
 
 /// Access to the unique Messages object for the passed \p language.
 /// Implementation is in LyX.cpp.
-extern Messages & getMessages(std::string const & language);
+extern Messages const & getMessages(std::string const & language);
 /// Access to the unique Messages object used for GUI element.
 /// Implementation is in LyX.cpp.
-extern Messages & getGuiMessages();
+extern Messages const & getGuiMessages();
+
+/// Remove the context suffix from \p trans
+extern void cleanTranslation(docstring & trans);
 
 } // namespace lyx