// This version use the traditional gettext.
Messages::Messages(string const & l)
- : lang_(l)
+ : lang_(l), warned_(false)
{
if ( lang_.empty() ) {
char const * lc_msgs = 0;
// Since this method gets called for every translatable
// buffer string like e.g. "Figure:" we warn only once.
#if !defined(_WIN32) && !defined(__CYGWIN__)
- bool warned = false;
- if (!warned && !lc_msgs) {
- warned = true;
+ if (!warned_ && !lc_msgs) {
+ warned_ = true;
lyxerr << "Locale " << lang_ << " could not be set" << endl;
}
#endif
private:
///
std::string lang_;
+ /// Did we warn about unavailable locale already?
+ mutable bool warned_;
///
typedef std::map<std::string, docstring> TranslationCache;
/// Internal cache for gettext translated strings.