The branch, 2.0.x, has been updated.

- Log -----------------------------------------------------------------

commit 2eb4a46d0b63361532a8b6bd3a3d62f4f00365a6
Author: Uwe Stöhr <uwesto...@lyx.org>
Date:   Sat Jun 30 03:40:40 2012 +0200

    tex2lyx: backport fix for bug #8210

diff --git a/src/tex2lyx/Preamble.h b/src/tex2lyx/Preamble.h
index 9b15a3f..8372fcb 100644
--- a/src/tex2lyx/Preamble.h
+++ b/src/tex2lyx/Preamble.h
@@ -39,6 +39,8 @@ public:
        ///
        std::string notefontcolor() const { return h_notefontcolor; }
        ///
+       std::string language() const { return h_language; }
+       ///
        std::string use_indices() const { return h_use_indices; }
        ///
        bool indentParagraphs() const;
diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp
index 5b91e18..3acc0e7 100644
--- a/src/tex2lyx/tex2lyx.cpp
+++ b/src/tex2lyx/tex2lyx.cpp
@@ -681,6 +681,10 @@ bool tex2lyx(idocstream & is, ostream & os, string 
encoding)
        active_environments.push_back("document");
        Context context(true, textclass);
        stringstream ss;
+       // store the document language in the context to be able to handle the
+       // commands like \foreignlanguage and \textenglish etc.
+       context.font.language = preamble.language();
+       // parse the main text
        parse_text(p, ss, FLAG_END, true, context);
        if (Context::empty)
                // Empty document body. LyX needs at least one paragraph.
diff --git a/status.20x b/status.20x
index 4ce7367..0742baa 100644
--- a/status.20x
+++ b/status.20x
@@ -84,6 +84,7 @@ What's new
 
 * TEX2LYX
 
+- Fix bug that language change was not recognized (bug 8210).
 
 
 * ADVANCED FIND AND REPLACE

-----------------------------------------------------------------------

Summary of changes:
 src/tex2lyx/Preamble.h  |    2 ++
 src/tex2lyx/tex2lyx.cpp |    4 ++++
 status.20x              |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to