def main():

    # Rebuilding the <domain>.pot
    if DEBUG:
        print "Rebuilding", GENERATED_POT
    argv = [
        'i18ndude', 'rebuild-pot',
        '--pot', GENERATED_POT,
        '--create', DOMAIN,
        MERGE_OPT,
        EXCLUDED_OPT,
        ROOT]
    sys.argv = flatten(argv)
    i18n_rebuild_pot()

    # Synching the .po files
    if DEBUG:
        print "Synching", PO_FILENAME, "files"
    argv = [
        'i18ndude', 'sync',
        '--pot', GENERATED_POT,
        find_po_files()
        ]
    sys.argv = flatten(argv)
    i18n_sync()

    return
def main():

    # Rebuilding the <domain>.pot
    if DEBUG:
        print "Rebuilding", GENERATED_POT
    argv = [
        'i18ndude', 'rebuild-pot', '--pot', GENERATED_POT, '--create', DOMAIN,
        MERGE_OPT, EXCLUDED_OPT, ROOT
    ]
    sys.argv = flatten(argv)
    i18n_rebuild_pot()

    # Synching the .po files
    if DEBUG:
        print "Synching", PO_FILENAME, "files"
    argv = ['i18ndude', 'sync', '--pot', GENERATED_POT, find_po_files()]
    sys.argv = flatten(argv)
    i18n_sync()

    # Compiling .po files
    if DEBUG:
        print "Compiling to", PO_FILENAME[:-2] + 'mo', "files"
    for po_filename in find_po_files():
        mo_filename = po_filename[:-2] + 'mo'
        if (not os.path.exists(mo_filename) or
            (os.stat(po_filename)[ST_MTIME] > os.stat(mo_filename)[ST_MTIME])):
            if DEBUG:
                print mo_filename
            po_hdl = file(mo_filename, 'wb')
            po_hdl.write(Msgfmt(po_filename).get())
            po_hdl.close()
    return
Beispiel #3
0
def main():

    # Rebuilding the <domain>.pot
    if DEBUG:
        print "Rebuilding", GENERATED_POT
    argv = [
        'i18ndude', 'rebuild-pot', '--pot', GENERATED_POT, '--create', DOMAIN,
        MERGE_OPT, EXCLUDED_OPT, ROOT
    ]
    sys.argv = flatten(argv)
    i18n_rebuild_pot()

    # Synching the .po files
    if DEBUG:
        print "Synching", PO_FILENAME, "files"
    argv = ['i18ndude', 'sync', '--pot', GENERATED_POT, find_po_files()]
    sys.argv = flatten(argv)
    i18n_sync()

    return
Beispiel #4
0
def main():

    # Rebuilding the <domain>.pot
    if DEBUG:
        print "Rebuilding", GENERATED_POT
    argv = [
        'i18ndude', 'rebuild-pot',
        '--pot', GENERATED_POT,
        '--create', DOMAIN,
        MERGE_OPT,
        EXCLUDED_OPT,
        ROOT]
    sys.argv = flatten(argv)
    i18n_rebuild_pot()

    # Synching the .po files
    if DEBUG:
        print "Synching", PO_FILENAME, "files"
    argv = [
        'i18ndude', 'sync',
        '--pot', GENERATED_POT,
        find_po_files()
        ]
    sys.argv = flatten(argv)
    i18n_sync()

    # Compiling .po files
    if DEBUG:
        print "Compiling to", PO_FILENAME[:-2] + 'mo', "files"
    for po_filename in find_po_files():
        mo_filename = po_filename[:-2] + 'mo'
        if (not os.path.exists(mo_filename)
            or
            (os.stat(po_filename)[ST_MTIME] > os.stat(mo_filename)[ST_MTIME])):
            if DEBUG:
                print mo_filename
            po_hdl = file(mo_filename, 'wb')
            po_hdl.write(Msgfmt(po_filename).get())
            po_hdl.close()
    return