diff --git a/src/ChangeLog b/src/ChangeLog index 456b2ef7dd..45b19300cf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2003-04-25 Lars Gullik Bjønnes + * text2.C (setCounter): use B_ a bit. + + * lyxlayout.C (Read): be sure to trim the label strings. + * messages.C (Messages): fix typo in comment * buffer.C (readFile): set message_ after file is loaded. diff --git a/src/lyxlayout.C b/src/lyxlayout.C index a0bdb5ed2e..9aa7684798 100644 --- a/src/lyxlayout.C +++ b/src/lyxlayout.C @@ -394,17 +394,17 @@ bool LyXLayout::Read (LyXLex & lexrc, LyXTextClass const & tclass) case LT_LABELSTRING: // label string definition if (lexrc.next()) - labelstring_ = lexrc.getString(); + labelstring_ = trim(lexrc.getString()); break; case LT_ENDLABELSTRING: // endlabel string definition if (lexrc.next()) - endlabelstring_ = lexrc.getString(); + endlabelstring_ = trim(lexrc.getString()); break; case LT_LABELSTRING_APPENDIX: // label string appendix definition if (lexrc.next()) - labelstring_appendix_ = lexrc.getString(); + labelstring_appendix_ = trim(lexrc.getString()); break; case LT_FREE_SPACING: // Allow for free spacing. diff --git a/src/text2.C b/src/text2.C index 6d442b0e78..4d2e015154 100644 --- a/src/text2.C +++ b/src/text2.C @@ -1086,9 +1086,9 @@ void LyXText::setCounter(Buffer const * buf, ParagraphList::iterator pit) // Is there a label? Useful for Chapter layout if (!pit->params().appendix()) { - s << layout->labelstring(); + s << buf->B_(layout->labelstring()); } else { - s << layout->labelstring_appendix(); + s << buf->B_(layout->labelstring_appendix()); } // Use of an integer is here less than elegant. For now. @@ -1103,7 +1103,8 @@ void LyXText::setCounter(Buffer const * buf, ParagraphList::iterator pit) langtype = "latin"; } - s << textclass.counters() + s << " " + << textclass.counters() .numberLabel(layout->latexname(), numbertype, langtype, head); @@ -1150,7 +1151,7 @@ void LyXText::setCounter(Buffer const * buf, ParagraphList::iterator pit) } // In biblio should't be following counters but... } else { - string s = layout->labelstring(); + string s = buf->B_(layout->labelstring()); // the caption hack: if (layout->labeltype == LABEL_SENSITIVE) { @@ -1178,14 +1179,14 @@ void LyXText::setCounter(Buffer const * buf, ParagraphList::iterator pit) // Doesn't work... yet. #if USE_BOOST_FORMAT - s = boost::io::str(boost::format(_("%1$s #:")) % fl.name()); + s = boost::io::str(boost::format(_("%1$s #:")) % buf->B_(fl.name())); // s << boost::format(_("%1$s %1$d:") // % fl.name() // % buf->counters().value(fl.name()); #else ostringstream o; //o << fl.name() << ' ' << buf->counters().value(fl.name()) << ":"; - o << fl.name() << " #:"; + o << buf->B_(fl.name()) << " #:"; s = STRCONV(o.str()); #endif } else {