From 2625a2343753a8e84105979f7e0d8f32f65b8b02 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 12 Nov 2006 11:06:02 +0000 Subject: [PATCH] strip the translation hints also in the dummy variant git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15877 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/messages.C | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/messages.C b/src/messages.C index 2ff381bb9c..90a345470c 100644 --- a/src/messages.C +++ b/src/messages.C @@ -32,6 +32,10 @@ using support::setEnv; using std::string; using std::endl; + +static boost::regex const reg("^([^\\[]*)\\[\\[[^\\]]*\\]\\]$"); + + #ifdef ENABLE_NLS @@ -188,7 +192,6 @@ public: // string, otherwise the user sees bogus messages. // If we are unable to honour the request we just // return what we got in. - static boost::regex const reg("^([^\\[]*)\\[\\[[^\\]]*\\]\\]$"); boost::smatch sub; if (regex_match(m, sub, reg)) translated = from_ascii(sub.str(1)); @@ -221,7 +224,12 @@ public: docstring const get(string const & m) const { - return from_ascii(m); + // See comment above + boost::smatch sub; + if (regex_match(m, sub, reg)) + return from_ascii(sub.str(1)); + else + return from_ascii(m); } }; #endif -- 2.39.2