Prompt file imported from ProgDroid/anime-calendar (
.claude/commands/translate.md). Fill in{{arguments}}before use. Copyright stays with the author.
Add the translation key from {{arguments}} to both locale files in frontend/src/locales/.
Parse Arguments
The arguments are: <key> "<english>" "<portuguese>"
- Key: dot-notation path, e.g.
auth.login.newButtonorcalendar.header.title - English: the English string (may be quoted)
- Portuguese: the Portuguese string (may be quoted)
Steps
- Read
frontend/src/locales/en.json - Read
frontend/src/locales/pt.json - For each file:
- Navigate the nested structure using the dot-notation key
- If an intermediate object doesn't exist, create it
- Insert the leaf key with the appropriate text value
- Preserve existing alphabetical ordering within each object
- Write both files using Edit (not Write — preserve existing content)
- Confirm: output the key and both translations as a summary
Key Format Examples
auth.login.newButton→ insert"newButton": "..."insideen.json > auth > loginerrors.network→ insert"network": "..."insideen.json > errorscalendar.filter.label→ insert"label": "..."insideen.json > calendar > filter
If the parent namespace doesn't exist in a file, create it as an empty object and then add the key.
Never overwrite existing keys — if the key already exists in either file, stop and report the conflict.
