소스 검색

Expanded choices are now translated

Expanded choices are added to the form by the $options[choice_list] which was never translated. The translation_domain option of the view was never set, so is always getting the default (messages) value.
I update the translation_domain with the $options['catalogue'] to resolve this problems.
crisei 12 년 전
부모
커밋
cc9291a90c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Form/Type/TranslatableChoiceType.php

+ 1 - 0
Form/Type/TranslatableChoiceType.php

@@ -62,6 +62,7 @@ class TranslatableChoiceType extends AbstractType
         if (!empty($view->vars['empty_value'])) {
             $view->vars['empty_value'] = $this->translator->trans($view->vars['empty_value'], array(), $options['catalogue']);
         }
+        $view->vars['translation_domain'] = $options['catalogue'];
     }
 
     /**