+ name = master.B_("Listing");
+ else
+ name = master.B_(tclass.floats().getType(type).name());
+ docstring counter = from_utf8(type);
+ if (cnts.isSubfloat()) {
+ // only standard captions allowed in subfloats
+ type_ = "Standard";
+ counter = "sub-" + from_utf8(type);
+ name = bformat(_("Sub-%1$s"),
+ master.B_(tclass.floats().getType(type).name()));
+ }
+ docstring sec;
+ if (cnts.hasCounter(counter)) {
+ cnts.step(counter, utype);
+ sec = cnts.theCounter(counter, lang);
+ }
+ if (getLayout().labelstring() != master.B_("standard")) {
+ if (!sec.empty())
+ sec += from_ascii(" ");
+ sec += bformat(from_ascii("(%1$s)"), getLayout().labelstring());
+ }
+ if (!sec.empty())
+ full_label_ = bformat(from_ascii("%1$s %2$s:"), name, sec);