/transifex-sync

Sync translations with transifex

Primary LanguageJavaScript

transifex-sync

Sync resources with transifex

Setup

Environment variables

  • $TRANSIFEX_TOKEN Transifex API token
  • $TRANSIFEX_SYNC_BB_PASSWORD use bitbucket [app password]
  • $TRANSIFEX_SYNC_BB_USER username who created app password
  • $TRANSIFEX_SYNC_BB_BRANCH translation branch, defaults to translation
  • $TRANSIFEX_SYNC_CONFIG configuration file, defaults to .transifex-sync.yaml.

Configuration example:

targets:
  - # 'source' strings file location
    source: packages/login-form/messages.yaml
    # translation file template
    translation: packages/login-form/messages.{code}.yaml
    # location of transifex resource
    location:
      project: myproject
      resource: mywebsite
      # transifex JSONKEYVALUE resource key
      key: login-form

Usage

Bitbucket pipelines configuration example:

pipelines:
  custom:
    transifex-sync:
      - step:
          image: audienceproject/transifex-sync
          script:
            - transifex-sync
  branches:
    translation:
      - step:
          image: audienceproject/transifex-sync
          script:
            - transifex-sync