[EMAIL PROTECTED] wrote:
Author: schmitt
Date: Tue May  1 10:26:40 2007
New Revision: 18143

URL: http://www.lyx.org/trac/changeset/18143
Log:
"fix" bug #3332 (plain text export depends on the menu language)

Please note that method B_ (translate text to buffer language) is presently 
broken (at least on Windows)!


Modified: lyx-devel/trunk/src/Buffer.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Buffer.cpp?rev=18143
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp (original)
+++ lyx-devel/trunk/src/Buffer.cpp Tue May  1 10:26:40 2007
@@ -1451,11 +1451,7 @@
docstring const Buffer::B_(string const & l10n) const
 {
-       Language const * lang = pimpl_->params.language;
-       if (lang)
-               return getMessages(lang->code()).get(l10n);
-
-       return _(l10n);
+       return params().B_(l10n);
 }

If you want to transfer the translation method to BufferParams, you should also remove this one.


+docstring const BufferParams::B_(string const & l10n) const
+{
+       BOOST_ASSERT(language);
+       return getMessages(language->code()).get(l10n);
+}

Are we sure that language is always set? In the original Buffer::B_ language is checked for nullity. I think you should keep this test.

Abdel

Reply via email to