X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLanguage.cpp;h=e588218047aea9c790753aa0d94b1a118188bd99;hb=c7e6a677c4df14b0f2f7d701e1f1976c4005a629;hp=fe9d56d00a7c3f5c3ececb7fc23b804606f77540;hpb=1aa5a0d1f167764aebdc7638d24fd1a09d90f9e1;p=lyx.git diff --git a/src/Language.cpp b/src/Language.cpp index fe9d56d00a..e588218047 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -22,6 +22,7 @@ #include "support/debug.h" #include "support/FileName.h" #include "support/lstrings.h" +#include "support/Messages.h" using namespace std; using namespace lyx::support; @@ -165,6 +166,10 @@ bool Language::read(Lexer & lex) encoding_ = encodings.fromLyXName("iso8859-1"); LYXERR0("Unknown encoding " << encodingStr_); } + // cache translation status. Calling getMessages() directly in + // PrefLanguage::PrefLanguage() did only work if the gui language + // was set to auto (otherwise all languages would be marked as available). + translated_ = getMessages(code()).available(); return true; }