From 8cc07adb035d6dd3869af33c653cf3095a1ebe42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20G=C3=96R=C3=96G?= Date: Mon, 22 Jan 2024 12:28:19 +0100 Subject: [PATCH] fix: detect trans_choice functions --- README.md | 1 + config/lost-in-translation.php | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 8a7bedf..19bc936 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ The command detects the following in your blade and application files: - `@lang('key')` Blade directives are compiled to `app('translator')->get('key')` - `__('key')` any call to the `__` function - `trans('key')` any call to the `trans` function +- `trans_choice('key', x)` any call to the `trans_choice` function - `app('translator')->get('key')` any direct `get`method call on the `translator` - `App::make('translator')->get('key')` any direct `get` method call on the `translator` - `Lang::get('key')` any `get` static call on the `Lang` facade diff --git a/config/lost-in-translation.php b/config/lost-in-translation.php index f249596..c760e10 100644 --- a/config/lost-in-translation.php +++ b/config/lost-in-translation.php @@ -45,6 +45,7 @@ 'function' => [ '__', // __('key') 'trans', // trans('key') + 'trans_choice', // trans_choice('key', x) ], 'method-function' => [