Browse Source

force translation of action_label

Benoit Pointet 13 năm trước cách đây
mục cha
commit
f4747aec50
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Controller/CRUDController.php

+ 1 - 1
Controller/CRUDController.php

@@ -440,7 +440,7 @@ class CRUDController extends Controller
         $askConfirmation = isset($batchActions[$action]['ask_confirmation']) ? $batchActions[$action]['ask_confirmation'] : true;
 
         if ($askConfirmation && $confirmation != 'ok') {
-            $label = isset($batchActions[$action]['label']) ? $batchActions[$action]['label'] : $action;
+            $label = $this->admin->trans($this->admin->getLabelTranslatorStrategy()->getLabel($action, 'action'));
 
             $formView = $datagrid->getForm()->createView();