#include <clocale>
#include <cctype>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-
#include "gettext.h"
#include "lyxfont.h"
#include "debug.h"
#include "support/lstrings.h"
#include "bufferparams.h" // stateText
+#include "BoostFormat.h"
+
using std::ostream;
using std::endl;
namespace {
char const * GUIFamilyNames[LyXFont::NUM_FAMILIES + 2 /* default & error */] =
-{ N_("Roman"), N_("Sans serif"), N_("Typewriter"), N_("Symbol"),
+{ N_("Roman"), N_("Sans Serif"), N_("Typewriter"), N_("Symbol"),
"cmr", "cmsy", "cmm", "cmex", "msa", "msb", "eufrak", "wasy",
N_("Inherit"), N_("Ignore") };
ost << _(GUISizeNames[size()]) << ", ";
if (color() != LColor::inherit)
ost << lcolor.getGUIName(color()) << ", ";
- if (emph() != INHERIT)
- ost << _("Emphasis ")
- << _(GUIMiscNames[emph()]) << ", ";
- if (underbar() != INHERIT)
- ost << _("Underline ")
- << _(GUIMiscNames[underbar()]) << ", ";
- if (noun() != INHERIT)
+ if (emph() != INHERIT) {
+#if USE_BOOST_FORMAT
+ ost << boost::format(_("Emphasis %1$s, "))
+ % _(GUIMiscNames[emph()]);
+#else
+ ost << _("Emphasis ") << _(GUIMiscNames[emph()]) << ", ";
+#endif
+ }
+ if (underbar() != INHERIT) {
+#if USE_BOOST_FORMAT
+ ost << boost::format(_("Underline %1$s, "))
+ % _(GUIMiscNames[underbar()]);
+#else
+ ost << _("Underline ") << _(GUIMiscNames[underbar()]) << ", ";
+#endif
+ }
+ if (noun() != INHERIT) {
+#if USE_BOOST_FORMAT
+ ost << boost::format(_("Noun %1$s, "))
+ % _(GUIMiscNames[noun()]);
+#else
ost << _("Noun ") << _(GUIMiscNames[noun()]) << ", ";
+#endif
+ }
if (bits == inherit)
ost << _("Default") << ", ";
- if (!params || (language() != params->language))
+ if (!params || (language() != params->language)) {
+#if USE_BOOST_FORMAT
+ ost << boost::format(_("Language: %1$s, "))
+ % _(language()->display());
+#else
ost << _("Language: ") << _(language()->display()) << ", ";
- if (number() != OFF)
+#endif
+ }
+ if (number() != OFF) {
+#if USE_BOOST_FORMAT
+ ost << boost::format(_(" Number %1$s"))
+ % _(GUIMiscNames[number()]);
+#else
ost << _(" Number ") << _(GUIMiscNames[number()]);
+#endif
+ }
- string buf(STRCONV(ost.str()));
- buf = rtrim(buf, ", ");
+ string const buf = rtrim(STRCONV(ost.str()), ", ");
return buf;
}
}
if (language() != base.language() && language() != next.language()) {
- os << "}";
+ os << '}';
++count;
}