بنقرة واحدة
generate-translations
Use when new translation keys are added to packages to generate new translations strings
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when new translation keys are added to packages to generate new translations strings
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Manually invoked skill for reskinning Payload UI components. Requires Figma URL. Usage: /ui4
Review UI4 CSS migrations for proper token usage. Checks that CSS variables are used instead of hardcoded values.
Use when CI tests fail on main branch after PR merge, when investigating flaky test failures, or when user provides a PR URL/number to aggregate all failing tests
Use when UI changes are complete and e2e tests need updating. Analyzes what changed in UI components and systematically finds/fixes affected tests.
Use when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails
| name | generate-translations |
| description | Use when new translation keys are added to packages to generate new translations strings |
| allowed-tools | Write, Bash(date:*), Bash(mkdir -p *) |
Payload has two separate translation systems:
When to use: Adding translations to core Payload packages (packages/ui, packages/payload, packages/next)
Add the English translation to packages/translations/src/languages/en.ts
authentication, general, fields, etc.)export const enTranslations = {
authentication: {
// ... existing keys
newFeature: 'New Feature Text',
},
}
Add client key (if needed for client-side usage) to packages/translations/src/clientKeys.ts
'authentication:newFeature'Generate translations for all languages
cd tools/scriptspnpm generateTranslations:coreWhen to use: Adding translations to any plugin package (packages/plugin-*)
Verify plugin has translations folder
packages/plugin-{name}/src/translations existsAdd the English translation to the plugin's packages/plugin-{name}/src/translations/languages/en.ts
export const enTranslations = {
'plugin-multi-tenant': {
'new-feature-label': 'New Feature',
},
}
Generate translations for all languages
cd tools/scriptspnpm generateTranslations:plugin-{name}pnpm generateTranslations:plugin-multi-tenantpnpm generateTranslations:plugin-ecommercepnpm generateTranslations:plugin-import-exportIf a plugin doesn't have a translations folder yet, ask the user if they want to scaffold one.
packages/plugin-{name}/src/translations/
├── index.ts
├── types.ts
└── languages/
├── en.ts
├── es.ts
└── ... (all other language files)
Create tools/scripts/src/generateTranslations/plugin-{name}.ts
plugin-multi-tenant.ts as a templateAdd script to tools/scripts/package.json:
"generateTranslations:plugin-{name}": "node --no-deprecation --import @swc-node/register/esm-register src/generateTranslations/plugin-{name}.ts"
OPENAI_KEY environment variable to be set