From ff85a4902ec4fff1b3bf0dbc9c9c53b3e87563cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Fri, 14 Nov 2014 18:18:30 +0100 Subject: [PATCH] mathed: bformat infoize messages - should fix bug #1908 --- src/mathed/InsetMathBox.cpp | 6 +++++- src/mathed/InsetMathColor.cpp | 6 +++++- src/mathed/InsetMathDecoration.cpp | 6 +++++- src/mathed/InsetMathEnv.cpp | 6 +++++- src/mathed/InsetMathFont.cpp | 6 +++++- src/mathed/InsetMathFontOld.cpp | 6 +++++- src/mathed/InsetMathHull.cpp | 2 +- src/mathed/InsetMathSize.cpp | 5 ++++- src/mathed/MathMacro.cpp | 7 ++++--- src/mathed/MathMacroTemplate.cpp | 2 +- 10 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/mathed/InsetMathBox.cpp b/src/mathed/InsetMathBox.cpp index 8b3cb2b427..509977b2fb 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 +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 7d005621e6..9023b7406e 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 +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 b9202f5d63..d3c23f60d8 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 +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 a7fb33c69d..cc613fd440 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 +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 b2e7c1dccc..b49985829a 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 +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 c14c4e36a8..013808d8a7 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 +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 538eee163a..53a16e8d0f 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 a638f43851..dc79652fad 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 #include +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 a6d92d9f88..f4150f30f8 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 #include +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 ce3494c61a..954538e4e9 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()); } -- 2.39.2