adding-translations

Regenerate TypeScript translation keys after modifying lang files.

1|1|Updated Apr 3, 2025
One-click install
npx skills add https://github.com/franklinogf/churchesadmin --skill adding-translations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-translations
Source: https://github.com/franklinogf/churchesadmin/tree/main/.github/skills/adding-translations
Command: npx skills add https://github.com/franklinogf/churchesadmin --skill adding-translations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adds new translations to the application. Activates when modifying language files (e.g., lang/es.json) or when user mentions adding translations, updating language files, or working with localization.

Core Features & Use Cases

  • Automatic localization updates: detects changes to lang/* files and guides regenerating keys.
  • Type-safe frontend keys: ensures frontend keys stay in sync via TypeScript typings.
  • Use Case: modify lang/es.json and run the required command to update translation keys across the app.

Quick Start

Edit a language file under lang (e.g., lang/es.json) and run php artisan utils:ts-lang-keys to regenerate the TypeScript translation keys.

Frequently Asked Questions about adding-translations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Laravel translation keys synced when updating language files?

To keep Laravel translation keys synced when updating language files, you modify the target lang file, such as lang/es.json, and run php artisan utils:ts-lang-keys to regenerate the TypeScript translation keys.

What is the best way to update TypeScript keys after modifying Laravel lang files?

The best way to update TypeScript keys after modifying Laravel lang files is to run the php artisan utils:ts-lang-keys command, which regenerates the typings to ensure frontend keys stay type-safe and synchronized.

Does this localization workflow support both frontend and backend translation updates?

Yes, this localization workflow supports both frontend and backend translation updates by detecting changes to lang files and requiring the regeneration of TypeScript keys to apply type-safe updates across the application.

When do I need to regenerate TypeScript translation keys in my i18n workflow?

You need to regenerate TypeScript translation keys in your i18n workflow whenever you modify or add new translations to language files, ensuring changes trigger proper type-safe updates across the application.

Why are my frontend TypeScript translation keys out of sync with my Laravel language files?

Frontend TypeScript translation keys are out of sync with Laravel language files because the required regeneration command was not run after modifying the lang files, leaving the frontend typings outdated.

Can I use this Skill to automate adding translations to Laravel lang JSON files?

Yes, you can use this Skill to automate adding translations to Laravel lang JSON files, as it detects changes to lang/* files and guides the regeneration of keys to maintain localization consistency.