X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLanguage.cpp;h=884d1a039bb7078ba141013e693a6ba15b65843f;hb=d9082639080b9de993742bd352f92e5183058cf5;hp=84e03b1e9e2f85d1baf0c70de46d3793132d50e6;hpb=fe85162a29893e98bd3426d15c9a9eb62aa90f6b;p=lyx.git diff --git a/src/Language.cpp b/src/Language.cpp index 84e03b1e9e..884d1a039b 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -15,12 +15,14 @@ #include "Language.h" +#include "BufferParams.h" #include "Encoding.h" #include "LaTeXFonts.h" #include "Lexer.h" #include "LyXRC.h" #include "support/debug.h" +#include "support/docstring.h" #include "support/FileName.h" #include "support/filetools.h" #include "support/lassert.h" @@ -55,22 +57,22 @@ bool Language::isBabelExclusive() const } -docstring const Language::translateLayout(string const & m) const +docstring const Language::translateLayout(string const & msg) const { - if (m.empty()) + if (msg.empty()) return docstring(); - if (!isAscii(m)) { - lyxerr << "Warning: not translating `" << m + if (!isAscii(msg)) { + lyxerr << "Warning: not translating `" << msg << "' because it is not pure ASCII.\n"; - return from_utf8(m); + return from_utf8(msg); } - TranslationMap::const_iterator it = layoutTranslations_.find(m); + TranslationMap::const_iterator it = layoutTranslations_.find(msg); if (it != layoutTranslations_.end()) return it->second; - docstring t = from_ascii(m); + docstring t = from_ascii(msg); cleanTranslation(t); return t; } @@ -87,7 +89,7 @@ string Language::fontenc(BufferParams const & params) const // We check whether the used rm font supports an encoding our language supports LaTeXFont const & lf = theLaTeXFonts().getLaTeXFont(from_ascii(params.fontsRoman())); - vector const lfe = lf.fontencs(); + vector const & lfe = lf.fontencs(); for (auto & fe : fontenc_) { // ASCII means: support all T* encodings plus OT1 if (fe == "ASCII") {