diff --git a/src/Counters.cpp b/src/Counters.cpp index 42e10e8362..15cede1a0f 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -41,8 +41,9 @@ Counter::Counter() Counter::Counter(docstring const & mc, docstring const & ls, - docstring const & lsa) - : initial_value_(0), master_(mc), labelstring_(ls), labelstringappendix_(lsa) + docstring const & lsa, docstring const & guiname) + : initial_value_(0), master_(mc), labelstring_(ls), + labelstringappendix_(lsa), guiname_(guiname) { reset(); } @@ -211,7 +212,8 @@ Counters::Counters() : appendix_(false), subfloat_(false), longtable_(false) void Counters::newCounter(docstring const & newc, docstring const & masterc, docstring const & ls, - docstring const & lsa) + docstring const & lsa, + docstring const & guiname) { if (!masterc.empty() && !hasCounter(masterc)) { lyxerr << "Master counter does not exist: " @@ -219,7 +221,7 @@ void Counters::newCounter(docstring const & newc, << endl; return; } - counterList_[newc] = Counter(masterc, ls, lsa); + counterList_[newc] = Counter(masterc, ls, lsa, guiname); } diff --git a/src/Counters.h b/src/Counters.h index 92643c1bd5..ffc091b2ad 100644 --- a/src/Counters.h +++ b/src/Counters.h @@ -35,7 +35,7 @@ public: Counter(); /// Counter(docstring const & mc, docstring const & ls, - docstring const & lsa); + docstring const & lsa, docstring const & guiname); /// \return true on success bool read(Lexer & lex); /// @@ -124,7 +124,8 @@ public: void newCounter(docstring const & newc, docstring const & masterc, docstring const & ls, - docstring const & lsa); + docstring const & lsa, + docstring const & guiname); /// Checks whether the given counter exists. bool hasCounter(docstring const & c) const; /// reads the counter name diff --git a/src/TextClass.cpp b/src/TextClass.cpp index c8fbfaf966..c34f5ca2d0 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -913,7 +913,7 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt) // If we do not succeed, then it was not there, which means that // the textclass did not provide the definitions of the standard // insets. So we need to try to load them. - int erased = provides_.erase("stdinsets"); + size_type const erased = provides_.erase("stdinsets"); if (!erased) { FileName tmp = libFileSearch("layouts", "stdinsets.inc"); @@ -1569,11 +1569,13 @@ bool TextClass::readFloat(Lexer & lexrc) floatlist_.newFloat(fl); // each float has its own counter counters_.newCounter(from_ascii(type), from_ascii(within), - docstring(), docstring()); + docstring(), docstring(), + bformat(_("%1$s (Float)"), from_ascii(name))); // also define sub-float counters docstring const subtype = "sub-" + from_ascii(type); counters_.newCounter(subtype, from_ascii(type), - "\\alph{" + subtype + "}", docstring()); + "\\alph{" + subtype + "}", docstring(), + bformat(_("Sub-%1$s (Float)"), from_ascii(name))); } return getout; }