Translate Premium Plugin Strings
Translate the Simple History Premium plugin's PO files from English to specified locales.
Premium Add-on Path
See CLAUDE.local.md for the premium add-on path. Read it first to determine the correct path. All commands below should be run from that directory.
Workflow
Setup
- Read
CLAUDE.local.mdto find the premium add-on path - Read
translation-config.jsonin the premium add-on to get configured locales - Check existing PO/POT files in the
languages/directory - Check available npm scripts with
npm run
Determine Locales
Break up $ARGUMENTS into parts — each part is a locale.
If no locales are provided, use all locales defined in the translation config.
Confirm that each locale is valid and defined in the translation config. If not, show an error and exit.
Show the locales to be translated for confirmation.
Step 1: Update Source Strings (once)
Run from the premium add-on path:
npm run i18n:make-pot— Update the POT file with latest strings from source codenpm run i18n:update-po— Update PO files for all locales
Step 2: Translate Each Locale
If translating 1-2 locales: Translate sequentially in the main conversation.
If translating 3+ locales: Use batched parallel agents:
- Process locales in batches of 5 at a time
- For each batch, spawn parallel agents (one per locale) using the Agent tool
- Wait for the batch to complete before starting the next batch
Translation rules for each locale:
- Read the PO file for the locale
- For each
msgid(English string), provide an accurate translation in the correspondingmsgstr - Keep WordPress-specific terms, HTML tags, and placeholders (
%s,%d,%1$s) unchanged - Maintain proper PO file format
- Use formal tone appropriate for software interface
- Only translate user-facing strings, not developer strings or code
- Be consistent with WordPress core translations for common terms
Step 3: Compile (once, after all locales)
Run from the premium add-on path:
npm run i18n:make-mo— Compile MO filesnpm run i18n:make-php— Compile PHP files
Examples
/premium-translate de_DE— Translate to German/premium-translate sv_SE da_DK— Translate to Swedish and Danish/premium-translate— Translate all configured locales