Skip to content

Commit b724782

Browse files
committed
Fix choice translation domain for expanded choice widget
1 parent 2762bfc commit b724782

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
22
<?php foreach ($form as $child): ?>
33
<?php echo $view['form']->widget($child) ?>
4-
<?php echo $view['form']->label($child) ?>
4+
<?php echo $view['form']->label($child, null, array('translation_domain' => $choice_translation_domain)) ?>
55
<?php endforeach ?>
66
</div>

Resources/views/Form/form_label.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
<?php if (!$label) { $label = isset($label_format)
55
? strtr($label_format, array('%name%' => $name, '%id%' => $id))
66
: $view['form']->humanize($name); } ?>
7-
<label <?php foreach ($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>
7+
<label <?php foreach ($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, array(), $translation_domain) : $label) ?></label>
88
<?php endif ?>

0 commit comments

Comments
 (0)