sinnbeck/laravel-langcheck

Find missing translations

v1.0 2020-10-16 12:48 UTC

This package is auto-updated.

Last update: 2024-10-29 04:25:48 UTC


README

Laravel LangCheck is created to help developers find missing translations in the lang directory of Laravel

Installation

$ composer require sinnbeck/laravel-langcheck --dev

Configuration

Laravel LangCheck will use the locale defined in laravel by default. It is possible to override with by publishing the config file.

$ php artisan vendor:publish --provider="Sinnbeck\LangCheck\LangCheckServiceProvider"

Usage

Laravel Lang Check is purely made to be used with artisan and currently has two commands available.

Find missing

$ php artisan langcheck:missing

Will render a table for each locale found with missing translations. The key is setup the same as when using the translations in laravel folder.key.key

It is possible to ensure that missing translations are caught, but passing the flag --throw, to make the command throw an exception on missing translations.

Find superfluous

$ php artisan langcheck:super

Same as missing except it shows locales with extra translations that are most likely not in use anymore.

Todo

  • Create/remove translations automatically?