X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLanguage.cpp;h=e6f7f9ed6a940a261b6a604b9c54b210936527d7;hb=cde541d785aaac9d45d636a7f9071353dd932eb6;hp=95e725f3f3c2b3f0178b0d4be1c9cbad66cac678;hpb=2dd84b3417ba6e5329dca681dc69059e201b7cf5;p=lyx.git diff --git a/src/Language.cpp b/src/Language.cpp index 95e725f3f3..e6f7f9ed6a 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -38,6 +38,12 @@ Language const * latex_language = 0; Language const * reset_language = 0; +bool Language::isPolyglossiaExclusive() const +{ + return babel().empty() && !polyglossia().empty() && requires().empty(); +} + + docstring const Language::translateLayout(string const & m) const { if (m.empty()) @@ -255,12 +261,8 @@ void Languages::read(FileName const & filename) } // Read layout translations - FileName path = libFileSearch(string(), "layouttranslations"); + FileName const path = libFileSearch(string(), "layouttranslations"); readLayoutTranslations(path); - - // Read installed translations - path = libFileSearch(string(), "installed_translations"); - readInstalledTranslations(path); } @@ -369,32 +371,6 @@ void Languages::readLayoutTranslations(support::FileName const & filename) } -void Languages::readInstalledTranslations(support::FileName const & filename) -{ - Lexer lex; - lex.setFile(filename); - lex.setContext("Languages::read"); - - // 1) read all installed gmo files names - set installed_translations; - string lang_code; - while (lex.isOK()) { - lex >> lang_code; - installed_translations.insert(lang_code); - } - - // 2) mark all corresponding languages as translated. - LanguageList::iterator lit = languagelist.begin(); - LanguageList::iterator const lend = languagelist.end(); - for ( ; lit != lend ; ++lit) { - if (installed_translations.count(lit->second.code()) - || installed_translations.count(token(lit->second.code(), '_', 0))) - lit->second.translated(true); - } - -} - - Language const * Languages::getLanguage(string const & language) const { if (language == "reset")