]> git.lyx.org Git - lyx.git/blobdiff - src/importer.C
Fix natbib bug spotted by JMarc.
[lyx.git] / src / importer.C
index f70b2295ace2ca359379ed7caccac04ff0d0ba2a..8d6894e9bcd8e6a12d2805f1422ea5f6feac2a17 100644 (file)
@@ -14,8 +14,6 @@
 #pragma implementation
 #endif
 
-#include <algorithm>
-
 #include "importer.h"
 #include "converter.h"
 #include "frontends/LyXView.h"
 #include "gettext.h"
 #include "BufferView.h"
 
+#include "BoostFormat.h"
+
+#include <algorithm>
+
 using std::vector;
 using std::find;
 
@@ -39,8 +41,12 @@ bool Importer::Import(LyXView * lv, string const & filename,
 {
        string const displaypath = MakeDisplayPath(filename);
        ostringstream s1;
-       s1 << _("Importing") << ' ' << displaypath << "...";
-       lv->message(s1.str().c_str());
+#if USE_BOOST_FORMAT
+       s1 << boost::format(_("Importing %1$s...")) % displaypath;
+#else
+       s1 << _("Importing ") << displaypath << _("...");
+#endif
+       lv->message(STRCONV(s1.str()));
 
        string const lyxfile = ChangeExtension(filename, ".lyx");
 
@@ -58,9 +64,15 @@ bool Importer::Import(LyXView * lv, string const & filename,
                        }
                }
                if (loader_format.empty()) {
+#if USE_BOOST_FORMAT
                        Alert::alert(_("Cannot import file"),
-                                  _("No information for importing from ")
-                                  + formats.prettyName(format));
+                                    boost::io::str(boost::format(_("No information for importing from %1$s"))
+                                  % formats.prettyName(format)));
+#else
+                       Alert::alert(_("Cannot import file"),
+                                    _("No information for importing from ")
+                                    + formats.prettyName(format));
+#endif
                        return false;
                }
        } else