]> git.lyx.org Git - lyx.git/blobdiff - src/importer.C
Collapse all those LFUN_XYZ_APPLY to a single LFUN_INSET_APPLY.
[lyx.git] / src / importer.C
index 03eb4002b92be0dc35a300a86a8c16468c248f9c..808ec9c39573f7ec7dec4fdd7ca34ddb18a0f84b 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#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,7 +37,11 @@ bool Importer::Import(LyXView * lv, string const & filename,
 {
        string const displaypath = MakeDisplayPath(filename);
        ostringstream s1;
-       s1 << _("Importing") << ' ' << displaypath << "...";
+#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 +60,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