]> git.lyx.org Git - lyx.git/blobdiff - src/importer.C
Remove the XOpenIM test as lyxlookup.C has been buried.
[lyx.git] / src / importer.C
index f70b2295ace2ca359379ed7caccac04ff0d0ba2a..999f5173ff909883080c060a4e17ae9e229119e2 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
@@ -104,7 +116,7 @@ vector<Format const *> const Importer::GetImportableFormats()
 
 vector<string> const Importer::Loaders()
 {
-       vector<string> v;
+       vector<string> v(3);
        v.push_back("lyx");
        v.push_back("text");
        v.push_back("textparagraph");