definition can contain the following entries:
\end_layout
+\begin_layout Description
+\change_inserted -195340706 1333913893
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+BabelPreamble
+\end_layout
+
+\end_inset
+
+ Preamble for changing languages. See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:I18n"
+
+\end_inset
+
+.
+\end_layout
+
\begin_layout Description
\begin_inset Flex Code
status collapsed
\end_inset
) modify this label on the fly.
+
+\end_layout
+
+\begin_layout Description
+\change_inserted -195340706 1333913893
+\begin_inset Flex Code
+status collapsed
+
+\begin_layout Plain Layout
+
+LangPreamble
+\end_layout
+
+\end_inset
+
+ Language dependent preamble. See section
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:I18n"
+
+\end_inset
+
+.
+
\end_layout
\begin_layout Description
\end_inset
+\end_layout
+
+\begin_layout Standard
+\begin_inset listings
+lstparams "float,language={C++}"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+
+ccc
+\end_layout
+
+\end_inset
+
+while(true);
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstlistoflistings
+\end_layout
+
+\end_inset
+
+
\end_layout
\end_body
#
# Detailed format description is available in the customization manual
-Format 36
+Format 38
Provides stdinsets 1
ForcePlain true
End
+InsetLayout IncludeListings
+ # We need the [[List of Listings]] context, since "Listings" is also
+ # the name of the inset and translated differently.
+ # "Listings[[List of Listings]]" is the name of the "List of listings"
+ # ("Listings" is the predefined english name) in listings.sty, so it
+ # must be used here as well.
+ BabelPreamble
+ \addto\captions$$lang{\renewcommand{\lstlistingname}{_(Listing)}}
+ \addto\captions$$lang{\renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}}
+ EndBabelPreamble
+ # The commands do not need to be defined in LangPreamble, since
+ # listings.sty does that already. However they need to be redefined
+ # in order to be used for non-english single-language documents.
+ LangPreamble
+ \renewcommand{\lstlistingname}{_(Listing)}
+ \renewcommand{\lstlistlistingname}{_(Listings[[List of Listings]])}
+ EndLangPreamble
+End
+
InsetLayout Listings
- LabelString Listings
+ CopyStyle IncludeListings
+ LabelString Listings[[inset]]
LatexType none
Decoration minimalistic
Font
"List of Graphs" "قائمة الرسوم البيانية"
"List of Schemes" "قائمة التصميمات"
"List of Tableaux" "قائمة الجداول"
+ "Listing" "عمل قوائم"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "تدوين"
"Note" "ملاحظة"
"Problem" "مشكلة"
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
+ "Listing" "Llistat"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notació"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "Seznam grafů"
"List of Schemes" "Seznam schémat"
"List of Tableaux" "Seznam tabel"
+ "Listing" "Výpis"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Značení"
"Note" "Poznámka"
"Problem" "Úloha"
"List of Graphs" "Grafliste"
"List of Schemes" "Schemaliste"
"List of Tableaux" "Tableauliste"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Notat"
"Problem" "Problem"
"List of Graphs" "Liste der Graphen"
"List of Schemes" "Liste der Schemata"
"List of Tableaux" "Tableaux-Verzeichnis"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Notiz"
"Problem" "Problem"
"List of Graphs" "Λίστα Γραφημάτων"
"List of Schemes" "Λίστα Σχεδίων"
"List of Tableaux" "Λίστα Ταμπλό"
+ "Listing" "Καταλογοποίηση"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Σημειογραφία"
"Note" "Σημείωση"
"Problem" "Πρόβλημα"
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Note"
"Problem" "Problem"
"List of Graphs" "Índice de gráficos"
"List of Schemes" "Índice de esquemas"
"List of Tableaux" "Índice de Tableaux"
+ "Listing" "Listado"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notación"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "Grafikoen zerrenda"
"List of Schemes" "Eskemen zerrenda"
"List of Tableaux" "Taulen zerrenda"
+ "Listing" "Zerrenda"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notazioa"
"Note" "Ohar"
"Problem" "Buruketa"
"List of Graphs" "Kuvaajien luettelo"
"List of Schemes" "Kuvausten lettelo"
"List of Tableaux" "Taulujen luettelo"
+ "Listing" "Listaus"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Merkintätapa"
"Note" "Muistiinpano"
"Problem" "Ongelma"
"List of Graphs" "Liste des graphiques"
"List of Schemes" "Liste des schémas"
"List of Tableaux" "Liste des tableaux (TO)"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Note"
"Problem" "Problème"
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
+ "Listing" "Lista"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notación"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "רשימת גרפים"
"List of Schemes" "רשימת סכמות"
"List of Tableaux" "List of Tableaux"
+ "Listing" "רישום קוד"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "צורת רישום"
"Note" "הערה"
"Problem" "בעיה"
"List of Graphs" "Grafikonok listája"
"List of Schemes" "Sémák listája"
"List of Tableaux" "Csoportképek listája"
+ "Listing" "Lista"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Jelölés"
"Note" "Megjegyzés"
"Problem" "Probléma"
"List of Graphs" "Lista de graphicos"
"List of Schemes" "Lista de schemas"
"List of Tableaux" "Lista de tableau"
+ "Listing" "Listar"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "Daftar Grafik"
"List of Schemes" "Daftar Skema"
"List of Tableaux" "Daftar Tableaux"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notasi"
"Note" "Nota"
"Problem" "Masalah"
"List of Graphs" "Elenco dei grafici"
"List of Schemes" "Elenco degli schemi"
"List of Tableaux" "Elenco dei tableau"
+ "Listing" "Listato"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notazione"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "グラフ一覧"
"List of Schemes" "スキーム一覧"
"List of Tableaux" "絵画一覧"
+ "Listing" "リスト"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "記法"
"Note" "注釈"
"Problem" "問題"
"List of Graphs" "Grafer"
"List of Schemes" "Struktruformler"
"List of Tableaux" "Tablåer"
+ "Listing" "«Listing»"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notasjon"
"Note" "Merknad"
"Problem" "Problem"
"List of Graphs" "Grafiekenlijst"
"List of Schemes" "Schema-lijst"
"List of Tableaux" "Lijst van Tableaus"
+ "Listing" "Opsomming"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notatie"
"Note" "Noot"
"Problem" "Opgave"
"List of Graphs" "Liste over grafar"
"List of Schemes" "Liste over skjema"
"List of Tableaux" "Liste over tablå"
+ "Listing" "Kodeliste"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notasjon"
"Note" "Notis"
"Problem" "Problem"
"List of Graphs" "Lista grafów"
"List of Schemes" "Lista schematów"
"List of Tableaux" "List of Tableaux"
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notacja"
"Note" "Notka"
"Problem" "Problem"
"List of Graphs" "Lista de Gráficos"
"List of Schemes" "Lista de Esquemas"
"List of Tableaux" "Lista de Quadros"
+ "Listing" "Listagem"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notação"
"Note" "Nota"
"Problem" "Problema"
"List of Graphs" "Listă de Grafice"
"List of Schemes" "Listă de Scheme"
"List of Tableaux" "Listă de Tabele"
+ "Listing" "Listare"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notație"
"Note" "Notă"
"Problem" "Problemă"
"List of Graphs" "Список графиков"
"List of Schemes" "Список схем"
"List of Tableaux" "Список таблиц"
+ "Listing" "Листинг"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Нотация"
"Note" "Заметка"
"Problem" "Проблема"
"List of Graphs" "Zoznam grafík"
"List of Schemes" "Zoznam náčrtkov"
"List of Tableaux" "Zoznam tablov"
+ "Listing" "Výpis"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notácia"
"Note" "Poznámka"
"Problem" "Problém"
"List of Graphs" "Spisak Grafikona"
"List of Schemes" "Spisak Šema"
"List of Tableaux" "Spisak Tabela "
+ "Listing" "Listing"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Zabeleška"
"Note" "Napomena"
"Problem" "Problem"
"List of Graphs" "Lista över grafer"
"List of Schemes" "Lista över scheman"
"List of Tableaux" "Lista över tablåer"
+ "Listing" "Listning"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notation"
"Note" "Not"
"Problem" "Problem"
"List of Graphs" "List of Graphs"
"List of Schemes" "Plan Listesi"
"List of Tableaux" "Tablo Listesi"
+ "Listing" "Liste"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Notasyon"
"Note" "Not"
"Problem" "Problem"
"List of Graphs" "Список графіків"
"List of Schemes" "Список схем"
"List of Tableaux" "Список табло"
+ "Listing" "Текст програми"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "Позначення"
"Note" "Примітка"
"Problem" "Проблема"
"List of Graphs" "图形列表"
"List of Schemes" "方案列表"
"List of Tableaux" "场景列表"
+ "Listing" "列表"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "记号"
"Note" "备忘"
"Problem" "问题"
"List of Graphs" "List of Graphs"
"List of Schemes" "List of Schemes"
"List of Tableaux" "List of Tableaux"
+ "Listing" "列表"
+ "Listings[[List of Listings]]" "Listings"
"Notation" "記法"
"Note" "註記"
"Problem" "問題"
# Implement the citation engine machinery in layouts.
# Change CiteFormat to CiteFormat (default|authoryear|numerical).
+# Incremented to format 38, 08 April 2012 by gb
+# Introduce LangPreamble and BabelPreamble for InsetLayout.
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
# development/tools/updatelayouts.sh script to update all
# layout files to the new format.
-currentFormat = 37
+currentFormat = 38
def usage(prog_name):
i += 1
continue
+ if format == 37:
+ i += 1
+ continue
+
if format == 36:
match = re_CiteFormat.match(lines[i]);
if match and match.group(4) == "":
keys.append(key)
keys.sort()
+ ContextRe = re.compile(r'(.*)(\[\[.*\]\])')
+
print >> out, '''# This file has been automatically generated by po/lyx_pot.py.
# PLEASE MODIFY ONLY THE LAGUAGES HAVING NO .po FILE! If you want to regenerate
# this file from the translations, run `make ../lib/layouttranslations' in po.
# also print untranslated entries to help translators
elif not lang in oldlanguages:
key = key.replace('\\', '\\\\').replace('"', '\\"')
+ res = ContextRe.search(key)
+ if res != None:
+ val = res.group(1)
+ else:
+ val = key
print >> out, '\t"%s" "%s"' % \
- (key.encode('utf-8'), key.encode('utf-8'))
+ (key.encode('utf-8'), val.encode('utf-8'))
print >> out, 'End'
out.close()
#include "support/filetools.h"
#include "support/gettext.h"
#include "support/lstrings.h"
+#include "support/regex.h"
#include <algorithm>
<< "{\\renewcommand{\\" << type << "name}{" << translated << "}}\n";
return os.str();
}
+
+
+docstring const i18npreamble(docstring const & templ, Language const * lang,
+ Encoding const & enc, bool const polyglossia)
+{
+ if (templ.empty())
+ return templ;
+
+ string preamble = polyglossia ?
+ subst(to_utf8(templ), "$$lang", lang->polyglossia()) :
+ subst(to_utf8(templ), "$$lang", lang->babel());
+
+ string const langenc = lang->encoding()->iconvName();
+ string const texenc = lang->encoding()->latexName();
+ string const bufenc = enc.iconvName();
+ // First and second character of plane 15 (Private Use Area)
+ string const s1 = "\xf3\xb0\x80\x80"; // U+F0000
+ string const s2 = "\xf3\xb0\x80\x81"; // U+F0001
+ // FIXME UNICODE
+ // lyx::regex is not unicode-safe.
+ // Should use QRegExp or (boost::u32regex, but that requires ICU)
+ static regex const reg("_\\(([^\\)]+)\\)");
+ smatch sub;
+ while (regex_search(preamble, sub, reg)) {
+ string const key = sub.str(1);
+ docstring const name = lang->translateLayout(key);
+ // Check whether name can be encoded in the buffer encoding
+ bool encodable = true;
+ for (size_t i = 0; i < name.size(); ++i) {
+ if (!enc.encodable(name[i])) {
+ encodable = false;
+ break;
+ }
+ }
+ string const translated = encodable ? to_utf8(name)
+ : "\\inputencoding{" + texenc + "}"
+ + s1 + langenc + s2 + to_utf8(name)
+ + s1 + bufenc + s2;
+ preamble = subst(preamble, sub.str(), translated);
+ }
+ return from_utf8(preamble);
+}
+
}
list<docstring>::const_iterator end = usedLayouts_.end();
for (; cit != end; ++cit) {
// language dependent commands (once per document)
- snippets.insert(tclass[*cit].langpreamble(buffer().language(),
+ snippets.insert(i18npreamble(tclass[*cit].langpreamble(),
+ buffer().language(),
buffer().params().encoding(),
use_polyglossia));
// commands for language changing (for multilanguage documents)
if ((use_babel || use_polyglossia) && !UsedLanguages_.empty()) {
- snippets.insert(tclass[*cit].babelpreamble(
+ snippets.insert(i18npreamble(
+ tclass[*cit].babelpreamble(),
buffer().language(),
buffer().params().encoding(),
use_polyglossia));
for (lang_it lit = lbeg; lit != lend; ++lit)
- snippets.insert(tclass[*cit].babelpreamble(
+ snippets.insert(i18npreamble(
+ tclass[*cit].babelpreamble(),
*lit,
buffer().params().encoding(),
use_polyglossia));
}
}
+ cit = usedInsetLayouts_.begin();
+ end = usedInsetLayouts_.end();
+ TextClass::InsetLayouts const & ils = tclass.insetLayouts();
+ for (; cit != end; ++cit) {
+ TextClass::InsetLayouts::const_iterator it = ils.find(*cit);
+ if (it == ils.end())
+ continue;
+ // language dependent commands (once per document)
+ snippets.insert(i18npreamble(it->second.langpreamble(),
+ buffer().language(),
+ buffer().params().encoding(),
+ use_polyglossia));
+ // commands for language changing (for multilanguage documents)
+ if ((use_babel || use_polyglossia) && !UsedLanguages_.empty()) {
+ snippets.insert(i18npreamble(
+ it->second.babelpreamble(),
+ buffer().language(),
+ buffer().params().encoding(),
+ use_polyglossia));
+ for (lang_it lit = lbeg; lit != lend; ++lit)
+ snippets.insert(i18npreamble(
+ it->second.babelpreamble(),
+ *lit,
+ buffer().params().encoding(),
+ use_polyglossia));
+ }
+ }
+
odocstringstream tcpreamble;
set<docstring>::const_iterator const send = snippets.end();
set<docstring>::const_iterator it = snippets.begin();
if (it != layoutTranslations_.end())
return it->second;
- return from_ascii(m);
+ docstring t = from_ascii(m);
+ cleanTranslation(t);
+ return t;
}
#include "support/lassert.h"
#include "support/lstrings.h"
#include "support/Messages.h"
-#include "support/regex.h"
#include "support/textutils.h"
}
-namespace {
-
-docstring const i18npreamble(Language const * lang, Encoding const & enc,
- docstring const & templ, bool const polyglossia)
-{
- if (templ.empty())
- return templ;
-
- string preamble = polyglossia ?
- subst(to_utf8(templ), "$$lang", lang->polyglossia()) :
- subst(to_utf8(templ), "$$lang", lang->babel());
-
-#ifdef TEX2LYX
- // tex2lyx does not have getMessages()
- LASSERT(false, /**/);
- (void)enc;
-#else
- string const langenc = lang->encoding()->iconvName();
- string const texenc = lang->encoding()->latexName();
- string const bufenc = enc.iconvName();
- // First and second character of plane 15 (Private Use Area)
- string const s1 = "\xf3\xb0\x80\x80"; // U+F0000
- string const s2 = "\xf3\xb0\x80\x81"; // U+F0001
- // FIXME UNICODE
- // lyx::regex is not unicode-safe.
- // Should use QRegExp or (boost::u32regex, but that requires ICU)
- static regex const reg("_\\(([^\\)]+)\\)");
- smatch sub;
- while (regex_search(preamble, sub, reg)) {
- string const key = sub.str(1);
- docstring const name = lang->translateLayout(key);
- // Check whether name can be encoded in the buffer encoding
- bool encodable = true;
- for (size_t i = 0; i < name.size(); ++i) {
- if (!enc.encodable(name[i])) {
- encodable = false;
- break;
- }
- }
- string const translated = encodable ? to_utf8(name)
- : "\\inputencoding{" + texenc + "}"
- + s1 + langenc + s2 + to_utf8(name)
- + s1 + bufenc + s2;
- preamble = subst(preamble, sub.str(), translated);
- }
-#endif
- return from_utf8(preamble);
-}
-
-}
-
-
-docstring const Layout::langpreamble(Language const * lang,
- Encoding const & enc, bool const polyglossia) const
-{
- return i18npreamble(lang, enc, langpreamble_, polyglossia);
-}
-
-
-docstring const Layout::babelpreamble(Language const * lang,
- Encoding const & enc, bool const polyglossia) const
-{
- return i18npreamble(lang, enc, babelpreamble_, polyglossia);
-}
-
-
string const & Layout::htmltag() const
{
if (htmltag_.empty())
#ifndef LAYOUT_H
#define LAYOUT_H
-#include "Encoding.h"
#include "FontInfo.h"
#include "LayoutEnums.h"
#include "Spacing.h"
namespace lyx {
-class Language;
class Lexer;
class TextClass;
docstring const & preamble() const { return preamble_; }
/// Get language dependent macro definitions needed for this layout
/// for language \p lang
- docstring const langpreamble(Language const * lang, Encoding const & enc, bool const polyglossia) const;
+ docstring const langpreamble() const { return langpreamble_; }
/// Get language and babel dependent macro definitions needed for
/// this layout for language \p lang
- docstring const babelpreamble(Language const * lang, Encoding const & enc, bool const polyglossia) const;
+ docstring const babelpreamble() const { return babelpreamble_; }
///
std::set<std::string> const & requires() const { return requires_; }
///
// could. See LayoutFileList::addEmptyClass() and, especially, the
// definition of the layoutpost string.
// You should also run (or ask someone who has bash to run) the
-// development/updatelayouts.sh script, to update the format of
+// development/tools/updatelayouts.sh script, to update the format of
// all of our layout files.
//
-int const LAYOUT_FORMAT = 37; //jrioux : move citation engine stuff into layouts
+int const LAYOUT_FORMAT = 38; //gb : LangPreamble and BabelPreamble for InsetLayout
namespace {
docPS->addPanel(pdfSupportModule, qt_("PDF Properties"));
docPS->addPanel(mathsModule, qt_("Math Options"));
docPS->addPanel(floatModule, qt_("Float Placement"));
- docPS->addPanel(listingsModule, qt_("Listings"));
+ docPS->addPanel(listingsModule, qt_("Listings[[inset]]"));
docPS->addPanel(bulletsModule, qt_("Bullets"));
docPS->addPanel(branchesModule, qt_("Branches"));
docPS->addPanel(outputModule, qt_("Output"));
features.includeFile(include_label, writefile);
+ features.useInsetLayout(getLayout());
if (isVerbatim(params()))
features.require("verbatim");
else if (isListings(params()))
}
+docstring InsetInclude::layoutName() const
+{
+ if (isListings(params()))
+ return from_ascii("IncludeListings");
+ return InsetCommand::layoutName();
+}
+
//
// preview stuff
DisplayType display() const;
///
InsetCode lyxCode() const { return INCLUDE_CODE; }
+ ///
+ docstring layoutName() const;
/** Fills \c key
* \param keys the list of bibkeys in the child buffer.
* \param it not used here
bool InsetLayout::read(Lexer & lex, TextClass const & tclass)
{
enum {
+ IL_BABELPREAMBLE,
IL_BGCOLOR,
IL_CONTENTASLABEL,
IL_COPYSTYLE,
IL_INTOC,
IL_LABELFONT,
IL_LABELSTRING,
+ IL_LANGPREAMBLE,
IL_LATEXNAME,
IL_LATEXPARAM,
IL_LATEXTYPE,
LexerKeyword elementTags[] = {
+ { "babelpreamble", IL_BABELPREAMBLE },
{ "bgcolor", IL_BGCOLOR },
{ "contentaslabel", IL_CONTENTASLABEL },
{ "copystyle", IL_COPYSTYLE },
{ "keepempty", IL_KEEPEMPTY },
{ "labelfont", IL_LABELFONT },
{ "labelstring", IL_LABELSTRING },
+ { "langpreamble", IL_LANGPREAMBLE },
{ "latexname", IL_LATEXNAME },
{ "latexparam", IL_LATEXPARAM },
{ "latextype", IL_LATEXTYPE },
case IL_PREAMBLE:
preamble_ = from_utf8(lex.getLongString("EndPreamble"));
break;
+ case IL_BABELPREAMBLE:
+ babelpreamble_ = from_utf8(lex.getLongString("EndBabelPreamble"));
+ break;
+ case IL_LANGPREAMBLE:
+ langpreamble_ = from_utf8(lex.getLongString("EndLangPreamble"));
+ break;
case IL_REFPREFIX:
lex >> refprefix_;
break;
ColorCode bgcolor() const { return bgcolor_; }
///
docstring preamble() const { return preamble_; }
+ /// Get language dependent macro definitions needed for this inset
+ docstring const langpreamble() const { return langpreamble_; }
+ /// Get language and babel dependent macro definitions needed for
+ /// this inset
+ docstring const babelpreamble() const { return babelpreamble_; }
///
docstring counter() const { return counter_; }
///
docstring counter_;
///
docstring preamble_;
+ /// Language dependent macro definitions needed for this inset
+ docstring langpreamble_;
+ /// Language and babel dependent macro definitions needed for this inset
+ docstring babelpreamble_;
///
docstring refprefix_;
///
// Instanciate static member.
string Messages::main_lang_;
-namespace {
-
void cleanTranslation(docstring & trans)
{
/*
}
}
-} // anonymous
} // lyx
/// Implementation is in LyX.cpp.
extern Messages const & getGuiMessages();
+/// Remove the context suffix from \p trans
+extern void cleanTranslation(docstring & trans);
+
} // namespace lyx
#endif