mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
use B_ a bit and trim label strings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6852 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6b6f256944
commit
febdea3f88
@ -1,5 +1,9 @@
|
||||
2003-04-25 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* 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.
|
||||
|
@ -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.
|
||||
|
13
src/text2.C
13
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user