view MoinMoin/i18n/tools/ @ 4133:251827af7ddc

Fixed: cannot check for File.Error in same line like checking import of File
author Florian Krupicka <>
date Tue, 27 May 2008 18:13:17 +0200
parents 30a254da9eba
children 532865ba8334
line wrap: on
line source
    get latest translation page content from the wiki and write it to *.po
DOMAIN = "MoinMoin"

def run():
    import sys, xmlrpclib
    sys.path.insert(0, '../..')

    excluded = ["en", ] # languages managed in repository, not in wiki

    lang = sys.argv[1]

    if not lang in excluded:
        wiki = xmlrpclib.ServerProxy("")

        pagename = "MoinI18n/%s" % lang
        print pagename
        pagedata = wiki.getPage(pagename).encode('utf-8').replace("\n", "\r\n")

        f = open("%s.%s.po" % (lang, DOMAIN), "w")

if __name__ == "__main__":