#include "Thesaurus.h"
+#include "support/gettext.h"
+
#include "support/lstrings.h"
+#include "frontends/alert.h"
+
#include <algorithm>
+using namespace std;
namespace lyx {
#ifdef HAVE_LIBAIKSAURUS
-
-using std::sort;
-using std::string;
+using support::bformat;
Thesaurus::Thesaurus()
return meanings;
string const text = to_ascii(t);
+
+ docstring error = from_ascii(aik_->error());
+ if (!error.empty()) {
+ static bool sent_error = false;
+ if (!sent_error) {
+ frontend::Alert::error(_("Thesaurus failure"),
+ bformat(_("Aiksaurus returned the following error:\n\n%1$s."),
+ error));
+ sent_error = true;
+ }
+ return meanings;
+ }
if (!aik_->find(text.c_str()))
return meanings;