Skip to content

feat: setup Co-op Translator for Chinese documentation#310

Open
shogun444 wants to merge 1 commit intothesysdev:mainfrom
shogun444:coop-translator-clean
Open

feat: setup Co-op Translator for Chinese documentation#310
shogun444 wants to merge 1 commit intothesysdev:mainfrom
shogun444:coop-translator-clean

Conversation

@shogun444
Copy link
Copy Markdown
Contributor

This PR sets up Co-op Translator to automatically generate Chinese (Simplified)
translations for OpenUI documentation.

Changes:

  • Added GitHub Actions workflow for automated translations
  • Added translator.config.json
  • Created translations/zh directory

This provides a scalable i18n foundation so additional languages can be added easily.

Closes #296

@Aditya-thesys Aditya-thesys requested a review from zahlekhan March 20, 2026 11:34
@Aditya-thesys Aditya-thesys requested review from rabisg and removed request for zahlekhan March 20, 2026 11:34
@Aditya-thesys Aditya-thesys assigned rabisg and unassigned zahlekhan Mar 20, 2026
Copy link
Copy Markdown
Member

@rabisg rabisg left a comment

Choose a reason for hiding this comment

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

Given that this PR affects the GH workflow and will require a write permission, we can test it out in your fork and then merge the PR once its ready and working e2e

Also once it is working as expected please add a shields badge to the README.md for the translated version

push:
paths:
- README.md
- docs/content/docs/**
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please remove this. While this is something we definitely want to add in the future, it would require more work to be able to fully serve i18n content on fumadocs
https://www.fumadocs.dev/docs/internationalization/next

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets start with README for now and we can pick up docs i18n in a separate PR

- name: Checkout repository
uses: actions/checkout@v4

- name: Run Co-op Translator
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need an additional step after the translation to commit it to the repo or else the translation file won't show up in the repo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated PR - added a commit + push step after the translation so generated files are persisted to the repo.

I tested the workflow in my fork:

  • The workflow triggers correctly
  • The Co-op Translator step runs
  • The commit + push step works as expected (creates a commit or no-op if no changes)

However, the translation step requires an LLM provider configuration (API key). Since I don’t have an API key configured in my fork, the workflow cannot complete the translation step end-to-end.

From what I’ve verified, everything up to that point is working correctly, and the translation should function as expected once the appropriate repository-level secrets are configured.

Let me know if you’d like me to adjust anything or if there’s a preferred way to handle the LLM configuration.

@shogun444 shogun444 requested a review from rabisg March 21, 2026 06:48
@@ -0,0 +1,45 @@
# --------------------------------------------------
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you remove all unrelated changes from this PR
Lets keep the scope to only Co-op translator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done 👍.

@shogun444 shogun444 force-pushed the coop-translator-clean branch from 8b37894 to d01c32a Compare March 22, 2026 08:37
@shogun444 shogun444 force-pushed the coop-translator-clean branch from d01c32a to 38c0793 Compare March 22, 2026 08:41
@zahlekhan zahlekhan assigned zahlekhan and unassigned rabisg Mar 25, 2026
@zahlekhan
Copy link
Copy Markdown
Contributor

Changes, look good. I'll test it and see if it works

@shogun444
Copy link
Copy Markdown
Contributor Author

thanks for taking a look.
let me know if there's anything I should adjust.

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.

Setup Co-op translator

3 participants