Skip to content

MandalAutomations/MCP-Language-Translator-Issue-Ops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translator (Issue Ops)

An IssueOps workflow that translates text between languages using GitHub Issues, GitHub Actions, and the GitHub Models API.

Features

  • Translate text between languages by commenting on a GitHub Issue.
  • Source and target languages are read from the issue body.
  • The triggering comment is edited in place to include both the original and the translated text.
  • Manual workflow_dispatch mode also supported.

How it works

main.py calls the GitHub Models API at https://models.github.ai/inference (model: openai/gpt-5-mini) using the OpenAI SDK with a GitHub PAT. parse_issue.py extracts the source_lang / target_lang fields from the issue body so the translator knows which languages to translate between.

Usage

1. Configure secrets

Add a repository secret named GH_TOKEN containing a token with repo and issues scopes and access to GitHub Models.

2. Open a Translation Issue

Create an issue using the Translation template and fill in:

source_lang: English
target_lang: French

3. Comment on the issue

Add a comment containing the text you want translated. The workflow will:

  1. Detect the new comment.
  2. Parse the issue body for source_lang / target_lang.
  3. Translate the comment text via the GitHub Models API.
  4. Edit the comment to include both the original and the translated text.

4. Manual run

You can also dispatch the workflow manually from the Actions tab and pass the text to translate as input.

Files

  • main.py — Calls the GitHub Models API and prints the translated text.
  • parse_issue.py — Parses the source/target languages out of the issue body.
  • requirements.txt — Python dependencies (openai).

About

Python issue-ops tool that translates text and GitHub issue comments via the GitHub Models API, runnable directly inside GitHub Actions workflows.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages