On Friday 26 April 2002 3:43 pm, [EMAIL PROTECTED] wrote: > Sorry to send many similar messages. > > I have found other untranslated points : > > - the inset labels for float:algorithm, float:figure and float:table, > the word float is translated, but not the other ones > (all other inset labels are translatable)
Progress. I believe that this is the correct patch for this particular one. Angus
Index: src/insets/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v retrieving revision 1.405 diff -u -p -r1.405 ChangeLog --- src/insets/ChangeLog 24 Apr 2002 10:53:55 -0000 1.405 +++ src/insets/ChangeLog 26 Apr 2002 15:25:23 -0000 @@ -1,3 +1,7 @@ +2002-04-26 Angus Leeming <[EMAIL PROTECTED]> + + * insetfloat.C (c-tor, wide): translate the name of the float. + 2002-04-22 Angus Leeming <[EMAIL PROTECTED]> * insetcite.[Ch]: take Herbert's patch to give WYSIWYG citation labels Index: src/insets/insetfloat.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfloat.C,v retrieving revision 1.41 diff -u -p -r1.41 insetfloat.C --- src/insets/insetfloat.C 21 Mar 2002 17:09:48 -0000 1.41 +++ src/insets/insetfloat.C 26 Apr 2002 15:25:23 -0000 @@ -99,11 +99,25 @@ using std::endl; // // Lgb +namespace { + +string floatname(string const & type) +{ + FloatList::const_iterator it = floatList[type]; + if (it == floatList.end()) + return type; + + return _(it->second.name()); +} + +} // namespace anon + + InsetFloat::InsetFloat(BufferParams const & bp, string const & type) : InsetCollapsable(bp), wide_(false) { - string lab(_("float:")); - lab += type; + string lab(_("float: ")); + lab += floatname(type); setLabel(lab); LyXFont font(LyXFont::ALL_SANE); font.decSize(); @@ -294,16 +308,14 @@ string const & InsetFloat::placement() c void InsetFloat::wide(bool w) { wide_ = w; - if (wide_) { - string lab(_("float:")); - lab += floatType_; + + string lab(_("float:")); + lab += floatname(floatType_); + + if (wide_) lab += "*"; - setLabel(lab); - } else { - string lab(_("float:")); - lab += floatType_; - setLabel(lab); - } + + setLabel(lab); }