Back to index

moin  1.9.0~rc2
Functions
MoinMoin.i18n.tools.prepend Namespace Reference

Functions

def run

Function Documentation

Definition at line 8 of file prepend.py.

00008 
00009 def run():
00010     import sys, codecs
00011     fname = sys.argv[1]
00012 
00013     lang = fname.replace('.po_', '').replace('.po', '')
00014 
00015     f = codecs.open(fname, 'r', 'utf-8')
00016     data = f.read()
00017     f.close()
00018 
00019     data = u"""\
00020 ## Please edit system and help pages ONLY in the moinmaster wiki! For more
00021 ## information, please see MoinMaster:MoinPagesEditorGroup.
00022 ##master-page:None
00023 ##master-date:None
00024 #acl MoinPagesEditorGroup:read,write,delete,revert All:read
00025 #format gettext
00026 #language %s
00027 
00028 %s""" % (lang, data)
00029 
00030     f = codecs.open(fname, 'w', 'utf-8')
00031     f.write(data)
00032     f.close()