X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63986ba653aa30be8bde24c21feabb8fc6067d03..02a1dfbae942c883d8651e34dcfbc5153aabc56e:/misc/languages/genlang.py diff --git a/misc/languages/genlang.py b/misc/languages/genlang.py index 99dd403416..e6b15875f8 100755 --- a/misc/languages/genlang.py +++ b/misc/languages/genlang.py @@ -20,6 +20,9 @@ def ReadTable(): 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 @@ -36,6 +39,9 @@ enum wxLanguage // for custom, user-defined languages: wxLANGUAGE_USER_DEFINED }; + +// --- --- --- generated code ends here --- --- --- + """) f.close() @@ -43,6 +49,9 @@ enum wxLanguage 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 @@ -55,6 +64,9 @@ this for i in table: f.write('\\item %s\n' % (i[0].replace('_','\\_'))) f.write("""\\end{itemize} + +%% --- --- --- generated code ends here --- --- --- + """) f.close() @@ -89,6 +101,8 @@ def GenTable(table): 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 @@ -120,6 +134,9 @@ void wxLocale::InitLanguagesDB() %s }; #undef LNG + +// --- --- --- generated code ends here --- --- --- + """ % (ifdefs, lngtable)) f.close()