Exemple #1
0
def build_locales():
    src_path = 'po-sk1'
    dest_path = LOCALES_PATH
    po.build_locales(src_path, dest_path, 'sk1')
Exemple #2
0
            print 'Desktop database update: ',
            os.system('update-desktop-database')
            print 'DONE!'
        else:
            print 'sK1 installation is not found!'
        sys.exit(0)

    elif sys.argv[1] == 'update_pot':
        paths = ['src/sk1', 'src/uc2']
        po.build_pot(paths, 'po-sk1/sk1.pot', False)
        sys.exit(0)

    elif sys.argv[1] == 'build_locales':
        src_path = 'po-sk1'
        dest_path = 'src/sk1/share/locales'
        po.build_locales(src_path, dest_path, 'sk1')
        sys.exit(0)

# Preparing start script
src_script = 'src/script/sk1.tmpl'
dst_script = 'src/script/sk1'
fileptr = open(src_script, 'rb')
fileptr2 = open(dst_script, 'wb')
while True:
    line = fileptr.readline()
    if line == '':
        break
    if '$APP_INSTALL_PATH' in line:
        line = line.replace('$APP_INSTALL_PATH', install_path)
    fileptr2.write(line)
fileptr.close()
Exemple #3
0
def build_locales():
    src_path = 'po-cp2'
    dest_path = LOCALES_PATH
    po.build_locales(src_path, dest_path, 'cp2')