[fbreader] Don't require book language to be in languagePatterns.zip
There ain't that many languages there, really. Not setting the language may cause some format plugins to reset book encoding to "windows-1252".
This commit is contained in:
parent
6b81b44c47
commit
ffb9e883fa
1 changed files with 1 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2009-2010 Geometer Plus <contact@geometerplus.com>
|
* Copyright (C) 2009-2010 Geometer Plus <contact@geometerplus.com>
|
||||||
|
* Copyright (C) 2019 Slava Monich <slava.monich@jolla.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -238,14 +239,6 @@ void Book::setTitle(const std::string &title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Book::setLanguage(const std::string &language) {
|
void Book::setLanguage(const std::string &language) {
|
||||||
if (!language.empty()) {
|
|
||||||
const std::vector<std::string> &codes = ZLLanguageList::languageCodes();
|
|
||||||
std::vector<std::string>::const_iterator it =
|
|
||||||
std::find(codes.begin(), codes.end(), language);
|
|
||||||
if (it == codes.end()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
myLanguage = language;
|
myLanguage = language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue