From 1bda441ba66fb4175e6f99d2387fd96e99a88c0f Mon Sep 17 00:00:00 2001 From: Khaled Huthaily Date: Thu, 29 May 2025 12:41:40 -0600 Subject: [PATCH] include total number of all changed translations It is good for project managers to easily see the total number of translations changed; not just by group. --- src/Controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Controller.php b/src/Controller.php index 31ab43c0..7c87f298 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -32,6 +32,7 @@ public function getIndex($group = null) $groups = [''=>'Choose a group'] + $groups; $numChanged = Translation::where('group', $group)->where('status', Translation::STATUS_CHANGED)->count(); + $allNumChanged = Translation::where('status', Translation::STATUS_CHANGED)->count(); $allTranslations = Translation::where('group', $group)->orderBy('key', 'asc')->get(); $numTranslations = count($allTranslations); @@ -47,6 +48,7 @@ public function getIndex($group = null) ->with('group', $group) ->with('numTranslations', $numTranslations) ->with('numChanged', $numChanged) + ->with('allNumChanged', $allNumChanged) ->with('editUrl', $group ? action('\Barryvdh\TranslationManager\Controller@postEdit', [$group]) : null) ->with('deleteEnabled', $this->manager->getConfig('delete_enabled')); }