1. Habit
  2. Skills
  3. Generate Translations skill
payloadcms · 569 installs

Generate Translations skill
Runs by itself, English keys change.

Every new key gets translated.

Install the Generate Translations skill and make it a habit: follow https://gethabit.dev/skills/payloadcms/generate-translations.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

569 installs45K starsMIT licenceSource on GitHub ↗

Generate Translations

by payloadcms · 569 installs

The skill

The generate translations skill helps Payload contributors add English keys to core or plugin packages and run the pnpm scripts that translate them into every supported language.

Only when you ask.

The habit

Every new key gets translated.

↻ Runs by itselfEnglish keys change

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after core plus three plugins per run.

  1. 01

    Detect new keys

    A change to an English en.ts file in core or a plugin starts the run.

  2. 02

    Add client keys

    Keys used in the browser get a colon-notation entry in packages/translations/src/clientKeys.ts.

  3. 03

    Check plugin folder

    For a plugin, confirm packages/plugin-{name}/src/translations exists, or ask you whether to scaffold it.

  4. 04

    Generate core

    From tools/scripts, pnpm generateTranslations:core fills every other language.

  5. 05

    Generate plugins

    Each touched plugin runs its own pnpm generateTranslations:plugin-{name} script.

  6. 06

    Check coverage

    Every new English key must now show up in all language files.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Generate Translations skill helps.

Use it when

  • ✓ You add new UI text to Payload
  • ✓ A plugin needs translated labels
  • ✓ A plugin lacks a translations folder

Skip it when

  • – You do not work on Payload
  • – No OPENAI_KEY is available

Questions

Generate Translations skill, answered.

What does it need to run?

The OPENAI_KEY environment variable, because the scripts use OpenAI to translate from English.

Does it edit other languages by hand?

No. English stays the source of truth and the generation scripts write the other files.

How do I install the Generate Translations skill?

Copy the prompt at the top into your agent. It installs the skill from payloadcms/payload and sets up the habit. Or run npx skills add payloadcms/payload --skill generate-translations.

Is the Generate Translations skill free?

Yes. It is published under MIT. Habit is free too.

Generate Translations. Now as a habit.

Install the Generate Translations skill and make it a habit: follow https://gethabit.dev/skills/payloadcms/generate-translations.md

  • Free
  • No account
  • Undo in one line

All payloadcms skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by payloadcms, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.