Closed m49n closed 2 months ago
Last version. label and empty value are missing language variables Was:
$widget = new Form($this->controller, (object)[ 'arrayName' => self::PREFIX, 'model' => $this->model, 'fields' => [ 'reference_page' => [ 'type' => 'dropdown', 'label' => 'Seite', 'emptyOption' => '-- Bitte wählen', 'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getPageOptions', 'value' => post(self::PREFIX . '.reference_page'), // TODO: This is somehow registered for each Box on the page and results in one request per box. 'changeHandler' => 'onReferencePageChange', ], 'reference_box' => [ 'type' => 'dropdown', 'label' => 'Box', 'emptyOption' => '-- Bitte wählen', 'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getBoxOptions', 'trigger' => [ 'action' => 'hide', 'condition' => 'value[]', 'field' => 'page', ], ], ], ]);
Become:
$widget = new Form($this->controller, (object)[ 'arrayName' => self::PREFIX, 'model' => $this->model, 'fields' => [ 'reference_page' => [ 'type' => 'dropdown', 'label' => Lang::get('offline.boxes::lang.page'), 'emptyOption' => Lang::get('offline.boxes::lang.please_select'), 'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getPageOptions', 'value' => post(self::PREFIX . '.reference_page'), // TODO: This is somehow registered for each Box on the page and results in one request per box. 'changeHandler' => 'onReferencePageChange', ], 'reference_box' => [ 'type' => 'dropdown', 'label' => Lang::get('offline.boxes::lang.box'), 'emptyOption' => Lang::get('offline.boxes::lang.please_select'), 'options' => 'OFFLINE\Boxes\FormWidgets\BoxFinder::getBoxOptions', 'trigger' => [ 'action' => 'hide', 'condition' => 'value[]', 'field' => 'page', ], ], ], ]);
Very strange! According to git these strings were never translated in the first place. Thank you for the hint, this is fixed in v3.6.24.
Last version. label and empty value are missing language variables Was:
Become: