]> git.lyx.org Git - lyx.git/commitdiff
fix another bug spotted by Pavel
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 7 Apr 2011 19:17:30 +0000 (19:17 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 7 Apr 2011 19:17:30 +0000 (19:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38300 a592a061-630c-0410-9148-cb99ea01b6c8

src/LaTeXFeatures.cpp

index a714df386e63b5a7916b9dac3a5ef2df6abc6bdc..61bd0a7a03da8ae4b5e004bb1049b65065e32a63 100644 (file)
@@ -1215,7 +1215,7 @@ docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel, bool use_po
                                        from_ascii(buffer().language()->babel())));
                        for (lang_it lit = lbeg; lit != lend; ++lit) {
                                string const code = (*lit)->code();
-                               name = translateIfPossible(flname, code);
+                               name = (*lit)->translateLayout(fl.name());
                                // we assume we have a suitable translation if
                                // either the language is English (we need to
                                // translate into English if English is a secondary
@@ -1347,9 +1347,8 @@ void LaTeXFeatures::getFloatDefinitions(odocstream & os) const
                        docstring const ext = from_ascii(fl.ext());
                        docstring const within = from_ascii(fl.within());
                        docstring const style = from_ascii(fl.style());
-                       docstring const name = translateIfPossible(
-                                       from_utf8(fl.name()),
-                                       buffer().language()->code());
+                       docstring const name =
+                               buffer().language()->translateLayout(fl.name());
                        os << "\\floatstyle{" << style << "}\n"
                           << "\\newfloat{" << type << "}{" << placement
                           << "}{" << ext << '}';