Skip to content

v2.2.0

Choose a tag to compare

@BrunosCode BrunosCode released this 10 May 14:22
· 8 commits to main since this release

v2.2.0

New Commands

  • translation-handler:sync — Syncs translations between formats. The old bare translation-handler command is now deprecated in favour of this.
  • translation-handler:list — Lists translations from a format, with optional --locale and --group filters.
  • translation-handler:list-groups — Lists unique key group prefixes at a configurable depth, with optional --search filter.
  • translation-handler:find — Finds a specific key+locale and prints it as a table.
  • translation-handler:delete — Deletes a translation key. Use --locale to target a single locale, omit it to delete all locales.
  • translation-handler:delete-group — Deletes all keys under a group prefix.
  • translation-handler:sort — Sorts translation keys alphabetically in PHP, JSON, and CSV formats. Supports --locale and --group filters to restrict the scope.

New MCP Tools

Three new tools are available to AI agents via Laravel Boost:

  • delete-translation-tool — Deletes a single key, optionally for a specific locale only.
  • delete-translation-group-tool — Deletes all keys under a group prefix.
  • sort-translations-tool — Sorts keys alphabetically in PHP, JSON, or CSV, with optional locale and group filters.

New Facade Methods

TranslationHandler::deleteKey(from: 'php_file', key: 'auth.welcome', locale: 'en');
TranslationHandler::deleteGroup(from: 'php_file', group: 'auth');
TranslationHandler::sortKeys(from: 'php_file', locales: ['en'], groups: ['auth']);

Bug Fixes

  • PHP and CSV handlers: removed a redundant array_replace_recursive merge in put(). The service already merges the full collection before writing — the file-level re-merge was causing deleted keys to reappear after a write.
  • PHP handler: when all translations for a locale file are removed, the file is now deleted instead of silently skipped (which left stale data on disk).
  • Database handler: handleSoftDelete now also soft-deletes individual locale values when a key is partially deleted (e.g. removing only the en value while keeping it). Previously only whole-key deletion was supported.