Skip to content

Integrate Reusable Azure AI Translation Workflow from Central Repository #780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

mr-vara
Copy link
Contributor

@mr-vara mr-vara commented Jun 23, 2025

Proposed changes

This PR sets up the repository to use a centralized, reusable GitHub Actions workflow that automates localization file translation using Azure AI Translation (Microsoft Translator).

What’s Included

  • Calls the reusable translation workflow from the central repository.
  • Supports translation of .po and .json files with optional context stripping.
  • Allows configuration of text_domain, defaulting to the repository name if not provided.

Configuration Notes

  • Triggers on push to main and via manual workflow_dispatch.
  • Requires the following secrets:
    • TRANSLATOR_API_KEY (Azure AI Translation)
    • NEWFOLD_ACCESS_TOKEN (for creating pull requests)

This setup helps automate translation updates across repositories using a single, centralized translation logic.

Documentation

AI Translation Workflow Documentation

wpscholar
wpscholar previously approved these changes Jun 23, 2025
@mr-vara mr-vara requested a review from circlecube June 24, 2025 07:09
Copy link
Member

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change!

uses: newfold-labs/workflows/.github/workflows/reusable-translations.yml@main
with:
text_domain: 'wp-module-onboarding'
pr_branch_name: 'trunk'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pr_branch_name: 'trunk'

This is no longer required or accepted. The github.ref_name will be used by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants