From 0b42f77551e607e59ac4fa98e5b926fb10a45baf Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 7 Mar 2021 08:21:23 +0100 Subject: [PATCH] \\spellchecker_ignore: use LyX language name rather than langcode --- src/BufferParams.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 4927741e50..d4fb384f18 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1051,9 +1051,9 @@ string BufferParams::readToken(Lexer & lex, string const & token, } else if (token == "\\spellchecker_ignore") { lex.eatLine(); docstring wl = lex.getDocString(); - docstring langcode; - docstring word = split(wl, langcode, ' '); - Language const * lang = languages.getFromCode(to_ascii(langcode)); + docstring language; + docstring word = split(wl, language, ' '); + Language const * lang = languages.getLanguage(to_ascii(language)); if (lang) spellignore().push_back(WordLangTuple(word, lang)); } else if (token == "\\author") { @@ -1433,7 +1433,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const } for (auto const & si : spellignore()) { - os << "\\spellchecker_ignore " << si.lang()->code() + os << "\\spellchecker_ignore " << si.lang()->lang() << " " << to_utf8(si.word()) << "\n"; } -- 2.39.5