Exemplo n.º 1
0
def cmd_push(argv, path_to_tx):
    """Push local files to remote server"""
    parser = push_parser()
    options = parser.parse_args(argv)
    force_creation = options.force_creation
    languages = parse_csv_option(options.languages)
    resources = parse_csv_option(options.resources)
    skip = options.skip_errors
    xliff = options.xliff
    parallel = options.parallel
    prj = project.Project(path_to_tx)
    if not (options.push_source or options.push_translations):
        parser.error("You need to specify at least one of the -s|--source, "
                     "-t|--translations flags with the push command.")

    branch = get_branch_from_options(options, prj.root)
    prj.push(force=force_creation,
             resources=resources,
             languages=languages,
             skip=skip,
             source=options.push_source,
             translations=options.push_translations,
             no_interactive=options.no_interactive,
             xliff=xliff,
             branch=branch,
             parallel=parallel)
    logger.info("Done.")
def cmd_push(argv, path_to_tx):
    "Push local files to remote server"
    parser = push_parser()
    (options, args) = parser.parse_args(argv)
    force_creation = options.force_creation
    languages = parse_csv_option(options.languages)
    resources = parse_csv_option(options.resources)
    skip = options.skip_errors
    prj = project.Project(path_to_tx)
    if not (options.push_source or options.push_translations):
        parser.error("You need to specify at least one of the -s|--source,"
            " -t|--translations flags with the push command.")

    prj.push(
        force=force_creation, resources=resources, languages=languages,
        skip=skip, source=options.push_source,
        translations=options.push_translations,
        no_interactive=options.no_interactive
    )
    logger.info("Done.")
Exemplo n.º 3
0
def cmd_push(argv, path_to_tx):
    "Push local files to remote server"
    parser = push_parser()
    (options, args) = parser.parse_args(argv)
    force_creation = options.force_creation
    languages = parse_csv_option(options.languages)
    resources = parse_csv_option(options.resources)
    skip = options.skip_errors
    prj = project.Project(path_to_tx)
    if not (options.push_source or options.push_translations):
        parser.error("You need to specify at least one of the -s|--source,"
            " -t|--translations flags with the push command.")

    prj.push(
        force=force_creation, resources=resources, languages=languages,
        skip=skip, source=options.push_source, num=options.num,
        translations=options.push_translations,
        no_interactive=options.no_interactive
    )
    logger.info("Done.")
Exemplo n.º 4
0
def cmd_push(argv, path_to_tx):
    """Push local files to remote server"""
    parser = push_parser()
    options = parser.parse_args(argv)
    force_creation = options.force_creation
    languages = parse_csv_option(options.languages)
    resources = parse_csv_option(options.resources)
    skip = options.skip_errors
    xliff = options.xliff
    parallel = options.parallel
    prj = project.Project(path_to_tx)
    if not (options.push_source or options.push_translations):
        parser.error("You need to specify at least one of the -s|--source, "
                     "-t|--translations flags with the push command.")

    branch = get_branch_from_options(options, prj.root)
    prj.push(
        force=force_creation, resources=resources, languages=languages,
        skip=skip, source=options.push_source,
        translations=options.push_translations,
        no_interactive=options.no_interactive,
        xliff=xliff, branch=branch, parallel=parallel
    )
    logger.info("Done.")