ibrows/translation-helper-bundle
A Symfony bundle that helps you manage translations by detecting missing, unused, and duplicate translation keys across your locale files, so you can keep message catalogs clean and consistent without manual auditing.
Reality check first: this bundle has 0 stars, 0 dependents, and a score of 0. Before you wire it into anything, do the five-minute triage:
composer.json in the repo and check the require block. Anything pinned to symfony/symfony ~2.x or ~3.x means it will not boot on a modern Symfony (5/6/7) app without a fork. That single line determines whether the rest of this assessment applies to you.README.md. If the README is a stub (common for internal ibrows bundles), the real documentation is the DependencyInjection/ and Resources/config/ folders.IbrowsTranslationHelperBundle class — the getContainerExtension() and any CompilerPass tell you exactly what it hooks into (Twig loader? Translation loader? A custom extractor command?).If it installs cleanly, minimal setup:
composer require ibrows/translation-helper-bundle
Register in config/bundles.php (Symfony 4+) or AppKernel.php (Symfony 2/3):
Ibrows\TranslationHelperBundle\IbrowsTranslationHelperBundle::class => ['dev' => true, 'test' => true],
Then immediately run:
php bin/console list ibrows
php bin/console debug:container --tag=twig.extension
The first tells you what commands the bundle actually exposes (don't trust the README); the second confirms whether it registered a Twig extension or profiler hook you didn't know about.
First use case to try: point it at your translations/ directory in a dev-only environment and see whether it reports missing keys from your templates. That's the core value proposition of a "translation helper" for a Symfony shop: finding the keys you reference in Twig but never defined in any messages.*.yml, and the keys you defined but no longer use. Do this on a throwaway branch — if it writes files, you want that isolated.
Because the package is essentially undocumented, treat it as a small set of building blocks you wire yourself rather than a turnkey tool.
Dev-only installation. Translation helpers are almost always diagnostic. Keep the bundle out of prod and test unless its commands are part of CI. In composer.json, add it under require-dev and gate bundle registration on $this->getEnvironment() !== 'prod'. This avoids shipping a translation-management web UI to production (a common footgun with these bundles).
Extract → review → apply loop. The workable workflow with any helper of this kind:
# 1. Snapshot your translation state
git stash list # or: git diff > pre-helper.patch
# 2. Run the extractor / consistency check the bundle provides
php bin/console ibrows:translation:extract # verify exact name via `list`
# 3. Diff the result before committing
git diff translations/ templates/
If the bundle has a "find missing keys" command, run it in a --dry-run mode first if one exists. If no dry-run flag is present, run against a copy of your translations/ directory (cp -r translations /tmp/translations.bak) and diff. This is the single most important habit with unmaintained tooling.
Integrate with your own extractor rather than replacing it. If you already use symfony/translation's translation:extract (Symfony 4+) or a modern tool like translation:extract from symfony/translation-contracts, you probably don't need this bundle's extractor at all. The bundle's real added value, when it exists, is typically its reporting — a table of missing/unused keys, or a web UI under a firewall-restricted route. Use that, and keep Symfony's native extractor as the source of truth for writing keys.
Locale file conventions. If the bundle reads YAML, it will be sensitive to your file naming (messages.en.yml vs messages.en.yaml vs translations/messages+intl-icu.en.yaml). Standardise on one naming scheme across the project before running it, or you'll get phantom "missing" reports. Check the bundle's Resources/config/services.yml for how it globs the translations directory — that's the ground truth for what it will and won't see.
Twig-side usage. If it registers a Twig extension (check debug:container --tag=twig.extension), you may get helper functions like a debug dump of which translation domain a template is using. That's genuinely useful for diagnosing "why is this label still in English?" — it tells you the resolved domain and locale for the current render. Wrap such calls in {% if app.debug %} so they never leak into prod HTML.
Fork-and-own pattern. With 0 dependents, assume nobody else will maintain this. If you find it useful, fork it into your own acme/translation-helper-bundle (or a bundles/ directory in your monorepo), bump the Symfony version constraints, and run the test suite (if any) under PHP 8. That's a day of work; it turns an abandoned dependency into a tool you control.
require. If it's a require-dev used by a few developers, the blast radius of it breaking is small. If it's used in CI, pin the exact version and vendor the source.Symfony\Component\DependencyInjection\Extension\Extension without the getAlias() autoloading conventions, or reference Symfony\Component\HttpKernel\Kernel APIs changed in 4.0+. If the bundle won't boot, read the stack trace's first non-vendor frame — it's almost always a removed class, not a logic bug.messages.*.yaml, files using ICU syntax (with {count, plural, ...} blocks) can trip naive parsers and be reported as missing or malformed. Test with a small file containing plural rules before trusting its output.git add -A after.php bin/console debug:container <service_id> and php bin/console debug:event-dispatcher to confirm the bundle's services and listeners actually loaded. If the bundle silently does nothing, verify the bundle is registered before your app bundle that overrides translation config.services.yaml (e.g., a translation loader or key extractor). Look for interfaces in its Model/ or Service/ namespace — those are the stable-ish contracts. Prefer decorating them over copying vendored code.DataCollector registered outside dev adds overhead and occasionally leaks template contents. Confirm with debug:container --tag=data_collector and remove it from prod config.continue-on-error: true) rather than a gate, because an unmaintained tool's false positives will block merges you don't want blocked.|trans calls, how to walk the translations directory) rather than a long-term dependency. Modern Symfony's translation:extract plus a small custom command covering "unused keys" will cover 90% of what a 2015-era translation helper did — with a maintainer.How can I help you explore Laravel packages today?