def GenEnum(table):
f = open('_wxlang.h', 'wt')
f.write("""
+
+// --- --- --- generated code begins here --- --- ---
+
// This enum is generated by misc/languages/genlang.py
// When making changes, please put them into misc/languages/langtabl.txt
enum wxLanguage
// for custom, user-defined languages:
wxLANGUAGE_USER_DEFINED
};
+
+// --- --- --- generated code ends here --- --- ---
+
""")
f.close()
def GenDocs(table):
f = open('_wxlang.tex', 'wt')
f.write("""
+
+%% --- --- --- generated code begins here --- --- ---
+
%% This enum is generated by misc/languages/genlang.py
%% When making changes, please put them into misc/languages/langtabl.txt
\\begin{itemize}\\itemsep=0pt
for i in table:
f.write('\\item %s\n' % (i[0].replace('_','\\_')))
f.write("""\\end{itemize}
+
+%% --- --- --- generated code ends here --- --- ---
+
""")
f.close()
f = open('_wxlang.cpp', 'wt')
f.write("""
+// --- --- --- generated code begins here --- --- ---
+
// This table is generated by misc/languages/genlang.py
// When making changes, please put them into misc/languages/langtabl.txt
%s
};
#undef LNG
+
+// --- --- --- generated code ends here --- --- ---
+
""" % (ifdefs, lngtable))
f.close()