X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.cpp;h=dac2097bb93baeec34705bf3eb44350450b72622;hb=0c05432284f144bcb6c278a60d54d9bc777829e0;hp=86fd8401b492e85b09e6d5078186ff96b534f87a;hpb=eebea6284d521c1a291de3b3ed483969f882dcd7;p=lyx.git diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 86fd8401b4..dac2097bb9 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -541,16 +541,16 @@ docstring const BibTeXInfo::getAuthorList(Buffer const * buf, // These are defined in the styles string const etal = - buf ? buf->params().documentClass().getCiteMacro(engine_type, "_etal") + buf ? buf->params().documentClass().getCiteMacro(engine_type, "B_etal") : " et al."; string const namesep = - buf ? buf->params().documentClass().getCiteMacro(engine_type, "_namesep") + buf ? buf->params().documentClass().getCiteMacro(engine_type, "B_namesep") : ", "; string const lastnamesep = - buf ? buf->params().documentClass().getCiteMacro(engine_type, "_lastnamesep") + buf ? buf->params().documentClass().getCiteMacro(engine_type, "B_lastnamesep") : ", and "; string const pairnamesep = - buf ? buf->params().documentClass().getCiteMacro(engine_type, "_pairnamesep") + buf ? buf->params().documentClass().getCiteMacro(engine_type, "B_pairnamesep") : " and "; string firstnameform = buf ? buf->params().documentClass().getCiteMacro(engine_type, "!firstnameform") @@ -811,13 +811,20 @@ docstring BibTeXInfo::expandFormat(docstring const & format, fmt = from_utf8(val) + fmt.substr(1); counter += 1; continue; - } else if (key[0] == '_') { - // a translatable bit + } else if (prefixIs(key, "B_")) { + // a translatable bit (to the Buffer language) string const val = buf.params().documentClass().getCiteMacro(engine_type, key); docstring const trans = translateIfPossible(from_utf8(val), buf.params().language->code()); ret << trans; + } else if (key[0] == '_') { + // a translatable bit (to the GUI language) + string const val = + buf.params().documentClass().getCiteMacro(engine_type, key); + docstring const trans = + translateIfPossible(from_utf8(val)); + ret << trans; } else { docstring const val = getValueForKey(key, buf, ci, xrefs, max_keysize);