commit ff85a4902ec4fff1b3bf0dbc9c9c53b3e87563cf
Author: Uwe Stöhr <[email protected]>
Date: Fri Nov 14 18:18:30 2014 +0100
mathed: bformat infoize messages
- should fix bug #1908
diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp
index 8b3cb2b..509977b 100644
--- a/src/mathed/InsetMathBox.cpp
+++ b/src/mathed/InsetMathBox.cpp
@@ -19,10 +19,14 @@
#include "MathSupport.h"
#include "MetricsInfo.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+
#include "frontends/Painter.h"
#include <ostream>
+using namespace lyx::support;
namespace lyx {
@@ -92,7 +96,7 @@ void InsetMathBox::draw(PainterInfo & pi, int x, int y) const
void InsetMathBox::infoize(odocstream & os) const
{
- os << "Box: " << name_;
+ os << bformat(_("Box: %1$s"), name_);
}
diff --git a/src/mathed/InsetMathColor.cpp b/src/mathed/InsetMathColor.cpp
index 7d00562..9023b74 100644
--- a/src/mathed/InsetMathColor.cpp
+++ b/src/mathed/InsetMathColor.cpp
@@ -19,8 +19,12 @@
#include "MathSupport.h"
#include "MetricsInfo.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+
#include <ostream>
+using namespace lyx::support;
namespace lyx {
@@ -95,7 +99,7 @@ void InsetMathColor::normalize(NormalStream & os) const
void InsetMathColor::infoize(odocstream & os) const
{
- os << "Color: " << color_;
+ os << bformat(_("Color: %1$s"), color_);
}
diff --git a/src/mathed/InsetMathDecoration.cpp
b/src/mathed/InsetMathDecoration.cpp
index b9202f5..d3c23f6 100644
--- a/src/mathed/InsetMathDecoration.cpp
+++ b/src/mathed/InsetMathDecoration.cpp
@@ -23,10 +23,14 @@
#include "support/debug.h"
#include "support/docstring.h"
+#include "support/gettext.h"
#include "support/lassert.h"
+#include "support/lstrings.h"
#include <ostream>
+using namespace lyx::support;
+
using namespace std;
namespace lyx {
@@ -165,7 +169,7 @@ void InsetMathDecoration::normalize(NormalStream & os) const
void InsetMathDecoration::infoize(odocstream & os) const
{
- os << "Deco: " << key_->name;
+ os << bformat(_("Decoration: %1$s"), key_->name);
}
diff --git a/src/mathed/InsetMathEnv.cpp b/src/mathed/InsetMathEnv.cpp
index a7fb33c..cc613fd 100644
--- a/src/mathed/InsetMathEnv.cpp
+++ b/src/mathed/InsetMathEnv.cpp
@@ -16,8 +16,12 @@
#include "MathStream.h"
#include "MathStream.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+
#include <ostream>
+using namespace lyx::support;
namespace lyx {
@@ -61,7 +65,7 @@ void InsetMathEnv::normalize(NormalStream & os) const
void InsetMathEnv::infoize(odocstream & os) const
{
- os << "Env: " << name_;
+ os << bformat(_("Environment: %1$s"), name_);
}
diff --git a/src/mathed/InsetMathFont.cpp b/src/mathed/InsetMathFont.cpp
index b2e7c1d..b499858 100644
--- a/src/mathed/InsetMathFont.cpp
+++ b/src/mathed/InsetMathFont.cpp
@@ -18,8 +18,12 @@
#include "MathParser.h"
#include "MetricsInfo.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+
#include <ostream>
+using namespace lyx::support;
namespace lyx {
@@ -200,7 +204,7 @@ void InsetMathFont::mathmlize(MathStream & os) const
void InsetMathFont::infoize(odocstream & os) const
{
- os << "Font: " << key_->name;
+ os << bformat(_("Font: %1$s"), key_->name);
}
diff --git a/src/mathed/InsetMathFontOld.cpp b/src/mathed/InsetMathFontOld.cpp
index c14c4e3..013808d 100644
--- a/src/mathed/InsetMathFontOld.cpp
+++ b/src/mathed/InsetMathFontOld.cpp
@@ -18,8 +18,12 @@
#include "MathSupport.h"
#include "MetricsInfo.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+
#include <ostream>
+using namespace lyx::support;
namespace lyx {
@@ -96,7 +100,7 @@ void InsetMathFontOld::normalize(NormalStream & os) const
void InsetMathFontOld::infoize(odocstream & os) const
{
- os << "Font: " << key_->name;
+ os << bformat(_("Font: %1$s"), key_->name);
}
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 538eee1..53a16e8 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -1303,7 +1303,7 @@ void InsetMathHull::normalize(NormalStream & os) const
void InsetMathHull::infoize(odocstream & os) const
{
- os << "Type: " << hullName(type_);
+ os << bformat(_("Type: %1$s"), hullName(type_));
}
diff --git a/src/mathed/InsetMathSize.cpp b/src/mathed/InsetMathSize.cpp
index a638f43..dc79652 100644
--- a/src/mathed/InsetMathSize.cpp
+++ b/src/mathed/InsetMathSize.cpp
@@ -19,10 +19,13 @@
#include "output_xhtml.h"
#include "support/convert.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
#include <string>
#include <ostream>
+using namespace lyx::support;
using namespace std;
namespace lyx {
@@ -101,7 +104,7 @@ void InsetMathSize::normalize(NormalStream & os) const
void InsetMathSize::infoize(odocstream & os) const
{
- os << "Size: " << key_->name;
+ os << bformat(_("Size: %1$s"), key_->name);
}
diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp
index a6d92d9..f4150f3 100644
--- a/src/mathed/MathMacro.cpp
+++ b/src/mathed/MathMacro.cpp
@@ -36,11 +36,13 @@
#include "support/debug.h"
#include "support/gettext.h"
#include "support/lassert.h"
+#include "support/lstrings.h"
#include "support/textutils.h"
#include <ostream>
#include <vector>
+using namespace lyx::support;
using namespace std;
namespace lyx {
@@ -806,14 +808,13 @@ void MathMacro::octave(OctaveStream & os) const
void MathMacro::infoize(odocstream & os) const
{
- os << "Macro: " << name();
+ os << bformat(_("Macro: %1$s"), name());
}
void MathMacro::infoize2(odocstream & os) const
{
- os << "Macro: " << name();
-
+ os << bformat(_("Macro: %1$s"), name());
}
diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp
index ce3494c..954538e 100644
--- a/src/mathed/MathMacroTemplate.cpp
+++ b/src/mathed/MathMacroTemplate.cpp
@@ -1360,7 +1360,7 @@ size_t MathMacroTemplate::numOptionals() const
void MathMacroTemplate::infoize(odocstream & os) const
{
- os << "Math Macro: \\" << name();
+ os << bformat(_("Math Macro: \\%1$s"), name());
}