Git Product home page Git Product logo

transifex-pull-request-action's Introduction

transifex-pull-request-action

A Github Action that fetches translations from transifex and proposes a pull request to merge these.

Usage

name: Retrieve i18n from Transifex

on:
  workflow_dispatch:
  schedule:
    - cron: '0 */6 * * *'

jobs:
  retrieve-18n:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Configure git
        run: |
          git config --global user.email "[email protected]"
          git config --global user.name "GitHub Action"
      - name: Retrieve i18n from Transifex and create PR if applies
        uses: c2corg/transifex-pull-request-action@v3
        with:
          transifex_token: ${{ secrets.TRANSIFEX_TOKEN }}
          transifex_organisation: camptocamp-association
          transifex_project: c2corg_ui
          transifex_resource: main
          output: src/translations
          locales: ca, de, en, es, eu, fr, hu, it, ru, sl, zh_CN
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: transifex/i18n

Action inputs

Inputs with defaults are optional.

Name Description Default
github_token GITHUB_TOKEN (contents: write, pull-requests: write) or a repo scoped Personal Access Token (PAT).
transifex_token Transifex token.
transifex_organisation Transifex organisation.
transifex_project Transifex project.
transifex_resource
branch The pull request branch name. transifex/i18n-updates
base_branch The target branch into which the pull request will be merged. master
output Folder where to output files.
locales A list of locales to fetch, separated by commas.
labels A comma separated list of labels to apply to the pull request. (no label)

One will usually run this action on a cron basis (say, every day or week)

Contributing

Edit / add GraphQL queries and mutations

src/generated folder contains generated type definitions based on queries. Run npm run graphql to update.

Release a version

npm run lint
npm run build
npm run pack

Then bump version number in package.json and package-lock.json using npm release command. Push commits.

Keep an major version tag synchronized with updates, e.g. if you publish version v2.0.3, then a v2 branch should be positioned at the same location.

transifex-pull-request-action's People

Contributors

brunobesson avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

transifex-pull-request-action's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.