mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 13:04:58 +00:00
Languages::readLayoutTranslations() clarify and un-indent loop.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39298 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fcb2cce53f
commit
b9f6712d77
@ -325,22 +325,22 @@ void Languages::readLayoutTranslations(support::FileName const & filename)
|
||||
if (!lex.next(true))
|
||||
break;
|
||||
string const code = lex.getString();
|
||||
bool readit = false;
|
||||
bool found = false;
|
||||
for (LanguageList::iterator lit = lbeg; lit != lend; ++lit) {
|
||||
if (match(code, lit->second) != NoMatch) {
|
||||
if (readTranslations(lex, trans[code]))
|
||||
readit = true;
|
||||
else
|
||||
lex.printError("Could not read layout "
|
||||
"translations for language "
|
||||
"`" + code + "'");
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!readit) {
|
||||
if (!found) {
|
||||
lex.printError("Unknown language `" + code + "'");
|
||||
break;
|
||||
}
|
||||
if (!readTranslations(lex, trans[code])) {
|
||||
lex.printError("Could not read layout translations for language `"
|
||||
+ code + "'");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 2) merge all translations into the languages
|
||||
@ -349,7 +349,7 @@ void Languages::readLayoutTranslations(support::FileName const & filename)
|
||||
TransMap::const_iterator const tend = trans.end();
|
||||
for (TransMap::const_iterator tit = tbeg; tit != tend; ++tit) {
|
||||
for (LanguageList::iterator lit = lbeg; lit != lend; ++lit) {
|
||||
Match m = match(tit->first, lit->second);
|
||||
Match const m = match(tit->first, lit->second);
|
||||
if (m == NoMatch)
|
||||
continue;
|
||||
lit->second.readLayoutTranslations(tit->second,
|
||||
|
Loading…
Reference in New Issue
Block a user