Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
aperture

GitHub Action

Localize AI

v1

Localize AI

aperture

Localize AI

Localize your project with GPT

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Localize AI

uses: voloshinskii/localize-ai@v1

Learn more about this action in voloshinskii/localize-ai

Choose a version

localize-ai

Localize your services without pain 🕺

Usage

Create workflow file in your repository, for example workflow.yaml:

name: Localize strings
on:
  push:
    paths:
      - locales/**
jobs:
  localize:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Localize strings
        uses: voloshinskii/localize-ai@v1
        with: 
          model: gpt-4
          openai-token: ${{ secrets.OPENAI_TOKEN }}
          locales-path: ./locales
          main-locale: en

      - name: commit and push all changed files
        env:
          CI_COMMIT_MESSAGE: Localize new strings
          CI_COMMIT_AUTHOR: CI
        run: |
          git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
          git config --global user.email "username@users.noreply.github.com"
          git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}"
          git push

Known limitations

- Only supports .json
- Pluralization is not supported now