Am 01.11.2010 um 16:18 schrieb Pavel Sanda: > Kornel Benko wrote: >> Well, this is exactly the case here, as "%1$s" may have different gender in >> slovak for >> values like "vcs-revision" and "vcs-author". And I am acting as some >> translator here too. > > i understand, but inventing some machinery for this corner case is really > overkill.
The nicest solution could be the attached patch. But as said already that requires the translators to translate 5 strings... (I'd also say that it's overkill.) Stephan
Index: src/insets/InsetInfo.cpp =================================================================== --- src/insets/InsetInfo.cpp (Revision 35965) +++ src/insets/InsetInfo.cpp (Arbeitskopie) @@ -426,21 +426,25 @@ break; } LyXVC::RevisionInfo itype = LyXVC::Unknown; - if (name_ == "vcs-revision") + docstring emsg = _("buffer-info name unknown"); + if (name_ == "vcs-revision") { itype = LyXVC::File; - else if (name_ == "vcs-tree-revision") + emsg = _("vcs-revision not available"); + } else if (name_ == "vcs-tree-revision") { itype = LyXVC::Tree; - else if (name_ == "vcs-author") + emsg = _("vcs-tree-revision not available"); + } else if (name_ == "vcs-author") { itype = LyXVC::Author; - else if (name_ == "vcs-time") + emsg = _("vcs-author not available"); + } else if (name_ == "vcs-time") { itype = LyXVC::Time; - else if (name_ == "vcs-date") + emsg = _("vcs-time not available"); + } else if (name_ == "vcs-date") { itype = LyXVC::Date; + emsg = _("vcs-date not available"); + } string binfo = buffer().lyxvc().revisionInfo(itype); - if (binfo.empty()) - setText(bformat(_("%1$s unknown"), from_ascii(name_))); - else - setText(from_utf8(binfo)); + setText(binfo.empty() ? emsg : from_utf8(binfo)); break; } case LYX_INFO: