From: Juergen Spitzmueller Date: Sun, 16 Feb 2014 09:23:30 +0000 (+0100) Subject: Fix localization of captions (#8977) X-Git-Tag: 2.1.0rc1~210 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=cc7c042ddacc456b1b86f0d9ab4cda7e51571303;p=lyx.git Fix localization of captions (#8977) --- diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 13ecb4bccd..2303a1d82a 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -400,14 +400,17 @@ void InsetCaption::updateBuffer(ParIterator const & it, UpdateType utype) master.B_(tclass.floats().getType(type).name())); } docstring sec; + docstring const lstring = getLayout().labelstring(); + docstring const labelstring = isAscii(lstring) ? + master.B_(to_ascii(lstring)) : lstring; if (cnts.hasCounter(counter)) { cnts.step(counter, utype); sec = cnts.theCounter(counter, lang); } - if (getLayout().labelstring() != master.B_("standard")) { + if (labelstring != master.B_("standard")) { if (!sec.empty()) sec += from_ascii(" "); - sec += bformat(from_ascii("(%1$s)"), getLayout().labelstring()); + sec += bformat(from_ascii("(%1$s)"), labelstring); } if (!sec.empty()) full_label_ = bformat(from_ascii("%1$s %2$s:"), name, sec);