]> git.lyx.org Git - lyx.git/blobdiff - src/Counters.cpp
Better debug ouput
[lyx.git] / src / Counters.cpp
index c06e9a7f9f4497742f83fc2f01a7b1bb0bb87872..d6865d107d99dd6954b1e4a3d697c7449a2f8acd 100644 (file)
@@ -545,19 +545,19 @@ docstring Counters::counterLabel(docstring const & format,
 }
 
 
-docstring Counters::prettyCounter(docstring const & counter,
+docstring Counters::prettyCounter(docstring const & name,
                               string const & lang) const
 {
-       CounterList::const_iterator it = counterList_.find(counter); 
+       CounterList::const_iterator it = counterList_.find(name); 
        if (it == counterList_.end())
                return from_ascii("??");
        Counter const & ctr = it->second;
+
+       docstring const value = theCounter(name, lang);
        docstring const & format = ctr.prettyFormat();
-       if (format.empty()) {
-               docstring cntrname = translateIfPossible(counter, lang);
-               return  cntrname + " " + theCounter(counter, lang);
-       }
-       return counterLabel(format, lang);
+       if (format.empty())
+               return value;
+       return subst(format, from_ascii("##"), value);
 }