Skip to content

Add translation workflow: issue/PR templates and auto-generated language switcher#60

Open
Lacah wants to merge 3 commits into
mainfrom
feature/translation-workflow
Open

Add translation workflow: issue/PR templates and auto-generated language switcher#60
Lacah wants to merge 3 commits into
mainfrom
feature/translation-workflow

Conversation

@Lacah

@Lacah Lacah commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New Translation Request issue template (.github/ISSUE_TEMPLATE/translation.yml) — contributors claim a language and follow a checklist covering folder naming (translations/<iso-code>/), keeping filenames identical, requiring all 3 docs (README, CONTRIBUTING, CODE_OF_CONDUCT) in one PR, correct same-language cross-linking, and not duplicating images.
  • New translation PR template (.github/PULL_REQUEST_TEMPLATE/translation.md), scoped via the multi-template convention so it doesn't affect unrelated PRs.
  • New language-switcher generator (.github/scripts/update-language-switcher.js, zero dependencies) — scans translations/, fills in the <!-- LANGUAGE_SWITCHER:START/END --> block in every doc that has it, and regenerates translations/README.md as a status index table. Contributors are told to leave the marker block empty; the script owns it.
  • New workflow (.github/workflows/language-switcher.yml) — runs the generator and pushes the result on any push to main that touches translations/** or the relevant docs/template.
  • Added the marker block to CONTRIBUTING.md, CODE_OF_CONDUCT.md, and .github/templates/rootreadmetemplate.md. README.md itself is untouched — per AGENTS.md/CONTRIBUTING.md it's regenerated by an external ServiceNow process from the template, so the switcher is added to the template and will flow through on the next regeneration.

Test plan

  • Ran the generator locally with zero translations present — confirms it's a no-op / stays empty, no clutter (translations/README.md shows "No translations yet").
  • Added a throwaway translations/es/{README,CONTRIBUTING,CODE_OF_CONDUCT}.md fixture, reran the generator, and verified: correct bidirectional cross-linking (root docs link to the Spanish file, the Spanish file links back to English), current language rendered bold/non-linked, and the translations/README.md index table populated correctly. Removed the fixture afterward.
  • First real translation PR opened against this workflow, to confirm the end-to-end contributor experience.

Lacah and others added 2 commits July 17, 2026 16:04
Contributors can now claim a language via issue template, submit
README/CONTRIBUTING/CODE_OF_CONDUCT translations under translations/<iso>/,
and have the language switcher auto-generated by a script that runs on
push to main. README.md itself is untouched since it's regenerated
externally from .github/templates/rootreadmetemplate.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Resolve conflict in CONTRIBUTING.md: keep the language-switcher marker
block and the grammar fix from main ("host repository for other
repositories").
@Lacah
Lacah requested a review from earlduque July 17, 2026 14:13
@Lacah

Lacah commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

NGL, I fell into an internalization rabbit hole, and this is the result. Do we want to even consider going in this direction? Is there a point? WDYT?

@Lacah
Lacah requested review from SapphicFire and wiz0floyd July 17, 2026 14:16
Add Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam,
Punjabi, Odia, and Assamese alongside the existing Hindi entry, since
Indian contributors are likely to be among the first translators.
Bengali, Punjabi, and Urdu get dual flags since each is a national
language of two countries. Switch English's flag from GB to US.
@wiz0floyd

Copy link
Copy Markdown

I think it's a great idea

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.

2 participants