コード例 #1
0
ファイル: tx.py プロジェクト: banlyst/docs-tools
def update(conf):
    logger.info('updating translation artifacts. Long running.')

    project_name = conf.project.title.lower().split()
    if conf.project.edition is not None and conf.project.edition != conf.project.name:
        project_name.append(conf.project.edition)

    project_name = hyph_concat(*project_name)

    logger.info('starting translation upload with sphinx-intl')

    flogger = FileLogger(logger)
    update_txconfig_resources(transifex_project_name=project_name,
                              locale_dir=conf.paths.locale,
                              pot_dir=os.path.join(conf.paths.locale, 'pot'),
                              out=flogger)

    logger.info('sphinx-intl: updated pot directory')
コード例 #2
0
ファイル: tx.py プロジェクト: mbrukman/mongodb-docs-tools
def update(conf):
    logger.info('updating translation artifacts. Long running.')

    project_name = conf.project.title.lower().split()
    if conf.project.edition is not None and conf.project.edition != conf.project.name:
        project_name.append(conf.project.edition)

    project_name = '-'.join(project_name)

    logger.info('starting translation upload with sphinx-intl')

    flogger = FileLogger(logger)
    update_txconfig_resources(transifex_project_name=project_name,
                              locale_dir=conf.paths.locale,
                              pot_dir=os.path.join(conf.paths.projectroot, conf.paths.locale, 'pot'),
                              out=flogger)

    logger.info('sphinx-intl: updated pot directory')
コード例 #3
0
def test_update_txconfig_resources(temp):
    commands.create_txconfig()
    commands.update_txconfig_resources('ham-project', 'locale')
コード例 #4
0
def test_update_txconfig_resources(temp):
    commands.create_txconfig()
    commands.update_txconfig_resources('ham-project', 'locale')