Releases: BrunosCode/TwillTranslationHandler
Release list
v2.3.0 — Ship Boost guidelines & skills
Ship Laravel Boost guidelines and skills. php artisan boost:install now discovers twill-translation-handler and offers to install an AI guideline plus the translation-handler-mcp and translation-handler-development skills.
Boost only discovers the guidelines/skills of direct Composer dependencies, so the core laravel-translation-handler package — a transitive dependency in a Twill app — was previously skipped entirely; this package now re-exports its Boost resources. The content is read live from the installed core package at install time (a thin Blade wrapper around the core core.blade.php and SKILL.md files), so it stays in sync with the installed laravel-translation-handler version without duplication. A Twill-specific section covers editing translations from the admin.
Full Changelog: https://github.com/BrunosCode/TwillTranslationHandler/blob/main/CHANGELOG.md
v2.2.0 — Laravel Boost support
- Bump
brunoscode/laravel-translation-handlerto^2.6(v2.6.1). - Laravel Boost support. With the optional
laravel/boost ^2.0package installed, the core package's translation MCP tools (list, find, set, delete, sort, sync, check) become available to AI agents — documented in the new README section. - README house-style pass aligned with LaravelTranslationHandler: added a table of contents, a blockquote tagline, the code-style and license badges, and a Contributing section; replaced the deprecated bare
translation-handlercommand withtranslation-handler:syncin the deploy and production-sync examples.
v2.1.2
- Bump
brunoscode/laravel-translation-handlerto^2.4(v2.4.0), bringing the newtranslation-handler:checkcommand, linter-friendly file writes, and thefalse|intreturn semantics forsync()/import()/export(). - Adapt the empty-export test to the new
export()semantics: since v2.3export()returnsfalseand writes nothing when the source has no translations, soTranslationToolsController::exportToCsvnow redirects back with an error instead of returning an empty headers-only CSV download.
v2.1.1
- Bump
brunoscode/laravel-translation-handlerto^2.2
v2.1.0 — Laravel 12 + PHP 8.4
New
- Laravel 12 support. Framework constraint widened to
^11.0|^12.0. Twill 3.5+ pulls the rightcartalyst/tagsand dependency tree under L12 thanks tocomposer update -Win CI. - PHP 8.4 support. Tested and confirmed. CI matrix now covers PHP 8.2 / 8.3 / 8.4 × Laravel 11 / 12 on Ubuntu and Windows.
laravel-translation-handlerupdated to^2.1(v2.1.2).
Bug fixes
- Null values in form save no longer cause errors. Twill can pass
nullfor inactive-locale fields when saving a translation or translation group. BothTranslationRepository::updateandTranslationGroupRepository::updatenow normalisenullto''before delegating to the parent repository.
Test infrastructure
- Removed
uses(RefreshDatabase::class)from all tests. Testbench 10 (required for L12) routedRefreshDatabasethroughartisan('migrate:fresh'), which crashed because L12'sCommand::run()accesses$this->laraveland a Twill command was being resolved before the container was ready. With SQLite in-memory, each test gets a fresh app —TestCase::defineDatabaseMigrations()andtearDown()provide isolation without artisan. - CI workflow:
composer requiresplit into framework + dev steps to keeporchestra/testbenchinrequire-dev(avoids a Windows interactive prompt).composer update -Wadded to allow transitive upgrades (cartalyst/tags v14→v15, etc.). - PHPStan:
--memory-limit=2Gpassed in CI (default 128M crashed under phpstan v2). View-string false-positive on package-registered view added to baseline.
Dev dependency constraints widened
| Package | Before | After |
|---|---|---|
larastan/larastan |
^2.9 |
^2.9 || ^3.0 |
pestphp/pest |
^2.34 |
^2.34 || ^3.0 |
pestphp/pest-plugin-laravel |
^2.3 |
^2.3 || ^3.0 |
pestphp/pest-plugin-arch |
^2.7 |
^2.7 || ^3.0 |
phpstan/phpstan-deprecation-rules |
^1.1 |
^1.1 || ^2.0 |
phpstan/phpstan-phpunit |
^1.3 |
^1.3 || ^2.0 |
orchestra/testbench |
^9.0.0||^8.22.0 |
`^9.0.0 || ^10.0.0 |
v2.0.1
Bug fixes
CannotCombineNavigationBuilderWithLegacyConfigexception on install. Apps using theTwillNavigationbuilder API would crash at boot because the package unconditionally registered the Translations entries via the legacytwill-navigationconfig array. Both APIs cannot coexist in Twill 3.
New config flag: legacy-twill-navigation
// config/translation-handler.php
'legacy-twill-navigation' => true, // default — behaviour unchanged from v2.0Set to false if your app uses the TwillNavigation builder and register the navigation entries yourself. See the Navigation section in the README for both approaches.
Other changes
- Package migrations are now auto-loaded via
loadMigrationsFrom()— no manual step required aftercomposer require. - Tests added for both flag states (
legacy-twill-navigation = true/false), verifying that thetwill-navigationconfig is populated or left untouched accordingly, and that routes remain registered in both cases.
v2.0.0 — Twill 3 + Laravel 11
Twill 2 / Laravel 10 users: stay on the
v1.xreleases.
Breaking changes
| Requirement | v1.x | v2.0 |
|---|---|---|
| PHP | 8.1+ | 8.2+ |
| Laravel | 10 | 11 |
| Twill | 2.x | 3.x |
| laravel-translation-handler | ^1.0 | ^2.0 |
Twill 3 compatibility
- All repository and controller methods updated to match Twill 3 contracts:
TwillModelContractreturn type onupdate, strict signatures onafterSave,filter,getFormFields,indexItemData. - Route name prefix is now read from
config('twill.admin_route_name_prefix', 'admin.')everywhere — works with both Twill 3's defaulttwill.prefix and custom values.
Bug fixes
importGroupCsvignored the selected CSV delimiter. Uploading a group CSV with,or⇥as delimiter always fell back to;and failed. The delimiter is now forwarded correctly from the request.- Runtime
setOptionoverrides ignored on Laravel 11. Laravel 11's IoC container removed automatic conversion of positional parameters to named ones, causinggetCsvHandler()/getPhpHandler()etc. to resolve a freshTranslationOptionsfrom config instead of using the modified one. Fixed inlaravel-translation-handlerv2.0.2 (named parameters now used explicitly).
Tests
Rewrote the test infrastructure to be fully compatible with Laravel 11 + SQLite (Twill's default migrations include a cascade migration that fails on SQLite in Laravel 11 — all tables are now defined inline in TestCase).
Added TranslationToolsControllerTest with 14 cases covering:
importFromCsvandimportGroupCsvwith;,,and⇥delimitersexportToCsvandexportGroupCsvdownload responses- Error paths: mismatched delimiter, missing file, non-existent group
The 404 test for unknown group uses a model-level assertion rather than an HTTP request to avoid Twill attempting to render its error view (which requires compiled assets not present in the test pipeline).
Upgrade from v1.x
composer require brunoscode/twill-translation-handler:^2.0 area17/twill:^3.0 laravel/framework:^11.0
php artisan migratev1.0.0
First stable release of Twill Translation Handler — a Twill 2 capsule for managing Laravel translations directly from the admin panel.
Features
- Translation keys — browse and edit all translation keys stored in the database, with per-locale values editable inline.
- Groups — translations are automatically organized by prefix (e.g.
messages,messages.validation). Intermediate groups are created automatically on import. Each group can be edited as a single form with all matching keys and their locale values exposed directly as textareas. - Search — filter translations by key and value in both the keys list and the groups list.
- Auto-sync to PHP files — saving a translation key or a group automatically writes the corresponding PHP language file, keeping the filesystem always in sync with the database.
- CSV import / export — upload a CSV to import translations into the database (and PHP files), or download all translations as CSV from the tools page.
- Per-group CSV export — download a filtered CSV for a single group directly from its edit page (GET request, no nested form).
- Allow empty values flag — each group form exposes a checkbox to bypass validation and allow saving empty translation values.
- Validation with translation keys — form validation errors on the group page display the actual translation key (
messages.welcome (it) is required) instead of the internal field name. - Automatic navigation — a Translations entry with three sub-pages (Keys, Groups, Import / Export) is registered in the Twill sidebar automatically at boot. Position in the sidebar can be controlled via a placeholder in
config/twill-navigation.php.
Requirements
- PHP 8.2 or 8.3
- Laravel 10
- Twill 2.x
- brunoscode/laravel-translation-handler ^1.0
Support for Twill 3 and Laravel 11 is planned for a future release.
Full Changelog: v0.2...v1
v0.2
What's Changed
- Bump stefanzweifel/git-auto-commit-action from 5 to 7 by @dependabot[bot] in #7
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #8
- Bump ramsey/composer-install from 3 to 4 by @dependabot[bot] in #10
Full Changelog: v0.1...v0.2