X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fdebug.C;h=005f562c3c0a5956a5b9b05e0a7212d64de97504;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=2b4badfcfabc86a6175d55a892d596b174911f25;hpb=22cdac5d5d53c4a5f4ecc9d2af0f5eeaf0f8295b;p=lyx.git diff --git a/src/debug.C b/src/debug.C index 2b4badfcfa..005f562c3c 100644 --- a/src/debug.C +++ b/src/debug.C @@ -20,9 +20,12 @@ #include #include -using lyx::support::ascii_lowercase; -using lyx::support::bformat; -using lyx::support::isStrInt; + +namespace lyx { + +using support::ascii_lowercase; +using support::bformat; +using support::isStrInt; using std::setw; using std::string; @@ -107,10 +110,10 @@ void lyx_debug_trait::showLevel(ostream & os, lyx_debug_trait::type level) if (errorTags[i].level != Debug::ANY && errorTags[i].level != Debug::NONE && errorTags[i].level & level) { - // avoid _(...) re-entrance problem - string const s = _(errorTags[i].desc); - os << bformat(_("Debugging `%1$s' (%2$s)"), - errorTags[i].name, s) + // avoid to_utf8(_(...)) re-entrance problem + docstring const s = _(errorTags[i].desc); + os << to_utf8(bformat(_("Debugging `%1$s' (%2$s)"), + from_utf8(errorTags[i].name), s)) << '\n'; } } @@ -123,8 +126,12 @@ void lyx_debug_trait::showTags(ostream & os) for (int i = 0; i < numErrorTags ; ++i) os << setw(7) << static_cast(errorTags[i].level) << setw(10) << errorTags[i].name - << " " << _(errorTags[i].desc) << '\n'; + << " " << to_utf8(_(errorTags[i].desc)) << '\n'; os.flush(); } + LyXErr lyxerr; + + +} // namespace lyx