mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
* LaTeXFeatures.cpp (getI18nPreamble):
addition to r37974: if English is used as a secondary language, we have to propose an English translation, since the original string is in the document's main language! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37975 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a9878d52ed
commit
729ac126be
@ -1215,13 +1215,20 @@ docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel, bool use_po
|
||||
type, name,
|
||||
from_ascii(buffer().language()->babel())));
|
||||
for (lang_it lit = lbeg; lit != lend; ++lit) {
|
||||
name = translateIfPossible(flname,
|
||||
(*lit)->code());
|
||||
if (use_polyglossia && flname != name)
|
||||
string const code = (*lit)->code();
|
||||
name = translateIfPossible(flname, code);
|
||||
// we assume we have a suitable translation if
|
||||
// either the language is English (we need to
|
||||
// translate into English if English is a secondary
|
||||
// language) or if translateIfPossible returns
|
||||
// something different to the English source.
|
||||
bool const have_translation =
|
||||
(flname != name || contains(code, "en"));
|
||||
if (use_polyglossia && have_translation)
|
||||
snippets.insert(getFloatI18nPreamble(
|
||||
type, name,
|
||||
from_ascii((*lit)->polyglossia())));
|
||||
else if (flname != name)
|
||||
else if (have_translation)
|
||||
snippets.insert(getFloatI18nPreamble(
|
||||
type, name,
|
||||
from_ascii((*lit)->babel())));
|
||||
|
Loading…
Reference in New Issue
Block a user