Skip to content

Commit

Permalink
Simplify translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoUseFreak committed Apr 9, 2015
1 parent f33d076 commit eb90f4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Clastic/BackofficeBundle/Form/TabHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function createTab($name, $label, $options = array())
array(
'label' => $label,
'inherit_data' => true,
'translation_domain' => 'clastic',
));

$tab = $this->formBuilder->create($name, 'tabs_tab', $options);
Expand Down
7 changes: 3 additions & 4 deletions src/Clastic/NodeBundle/Form/Type/NodeFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ private function createGeneralTab(FormBuilderInterface $builder)
->createTab($builder, 'general', array(
'label' => 'node.form.tab.general.label',
'position' => 'first',
'translation_domain' => 'clastic',
))
->add('title', 'text', array(
'property_path' => 'node.title',
Expand All @@ -55,7 +54,6 @@ private function createPublicationTab(FormBuilderInterface $builder)
return $this
->createTab($builder, 'publication', array(
'label' => 'node.form.tab.publication.label',
'translation_domain' => 'clastic',
))
->add('available', 'checkbox', array(
'property_path' => 'node.publication.available',
Expand All @@ -77,7 +75,6 @@ private function createAuthorInformationTab(FormBuilderInterface $builder)
return $this
->createTab($builder, 'author_information', array(
'label' => 'node.form.tab.author_information.label',
'translation_domain' => 'clastic',
))
->add('author', 'entity', array(
'class' => 'ClasticUserBundle:User',
Expand Down Expand Up @@ -109,7 +106,6 @@ private function createActionTab(FormBuilderInterface $builder)
->create('actions', 'tabs_tab_actions', array(
'mapped' => false,
'inherit_data' => true,
'translation_domain' => 'clastic',
))
->add('save', 'submit', array(
'label' => 'node.form.tab.action.field.save',
Expand All @@ -122,6 +118,9 @@ private function createActionTab(FormBuilderInterface $builder)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'translation_domain' => 'clastic',
));
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/Clastic/UserBundle/Form/Type/UserFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ private function createActionTab(FormBuilderInterface $builder)
return $builder->create('actions', 'tabs_tab_actions', array(
'mapped' => false,
'inherit_data' => true,
'translation_domain' => 'clastic',
))
->add('save', 'submit', array(
'label' => 'node.form.tab.action.field.save',
Expand All @@ -120,7 +119,6 @@ private function createTab(FormBuilderInterface $builder, $name, $options = arra
$options,
array(
'inherit_data' => true,
'translation_domain' => 'clastic',
));

return $builder->create($name, 'tabs_tab', $options);
Expand All @@ -131,6 +129,9 @@ private function createTab(FormBuilderInterface $builder, $name, $options = arra
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'translation_domain' => 'clastic',
));
}

/**
Expand Down

0 comments on commit eb90f4b

Please sign in to comment.