From 76cfbc0afab501f24597f3187b34faac24985c6f Mon Sep 17 00:00:00 2001 From: Alex Even Date: Thu, 23 Jun 2016 13:59:24 +0200 Subject: [PATCH] BO: Adding translation domains for Product Page - part 2 --- .../Controller/Admin/ProductController.php | 26 +++++----- .../Admin/ProductImageController.php | 6 +-- .../Form/Admin/Category/SimpleCategory.php | 2 +- .../Form/Admin/Feature/ProductFeature.php | 10 ++-- .../Form/Admin/Product/ProductAttachement.php | 14 +++--- .../Form/Admin/Product/ProductCombination.php | 32 ++++++------ .../Admin/Product/ProductCombinationBulk.php | 16 +++--- .../Form/Admin/Product/ProductCustomField.php | 10 ++-- .../Form/Admin/Product/ProductInformation.php | 48 +++++++++--------- .../Form/Admin/Product/ProductOptions.php | 50 +++++++++---------- .../Form/Admin/Product/ProductPrice.php | 26 +++++----- .../Form/Admin/Product/ProductQuantity.php | 50 +++++++++---------- .../Form/Admin/Product/ProductSeo.php | 22 ++++---- .../Form/Admin/Product/ProductShipping.php | 12 ++--- .../Admin/Product/ProductSpecificPrice.php | 42 ++++++++-------- .../Form/Admin/Product/ProductVirtual.php | 16 +++--- .../Product/ProductWarehouseCombination.php | 4 +- .../Product/Include/form_shipping.html.twig | 4 +- .../views/Admin/Product/form.html.twig | 18 +++---- .../TwigTemplateForm/typeahead.html.twig | 2 +- 20 files changed, 205 insertions(+), 205 deletions(-) diff --git a/src/PrestaShopBundle/Controller/Admin/ProductController.php b/src/PrestaShopBundle/Controller/Admin/ProductController.php index 7f1f04da3a564..46b6b9e17ab2f 100644 --- a/src/PrestaShopBundle/Controller/Admin/ProductController.php +++ b/src/PrestaShopBundle/Controller/Admin/ProductController.php @@ -138,7 +138,7 @@ public function catalogAction(Request $request, $limit = 10, $offset = 0, $order $toolbarButtons = array(); $toolbarButtons['add'] = array( 'href' => $this->generateUrl('admin_product_new'), - 'desc' => $translator->trans('Add', array(), 'AdminProducts'), + 'desc' => $translator->trans('Add', array(), 'Admin.Actions'), 'icon' => 'add' ); @@ -170,7 +170,7 @@ public function catalogAction(Request $request, $limit = 10, $offset = 0, $order 'PrestaShopBundle\Form\Admin\Type\ChoiceCategoriesTreeType', null, array( - 'label' => $translator->trans('Categories', array(), 'AdminProducts'), + 'label' => $translator->trans('Categories', array(), 'Admin.Catalog.Feature'), 'list' => $this->container->get('prestashop.adapter.data_provider.category')->getNestedCategories(), 'valid_list' => [], 'multiple' => false, @@ -311,7 +311,7 @@ public function newAction() $toolsAdapter = $this->container->get('prestashop.adapter.tools'); $productAdapter = $this->container->get('prestashop.adapter.data_provider.product'); $translator = $this->container->get('translator'); - $name = $translator->trans('New product', [], 'AdminProducts'); + $name = $translator->trans('New product', [], 'Admin.Catalog.Feature'); $product = $productAdapter->getProductInstance(); $product->active = $productProvider->isNewProductDefaultActivated()? 1 : 0; @@ -523,7 +523,7 @@ public function bulkAction(Request $request, $action) $hookDispatcher->dispatchMultiple(['actionAdminActivateBefore', 'actionAdminProductsControllerActivateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->activateProductIdList($productIdList); - $this->addFlash('success', $translator->trans('Product(s) successfully activated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product(s) successfully activated.', [], 'Admin.Catalog.Notification')); $logger->info('Products activated: ('.implode(',', $productIdList).').'); $hookDispatcher->dispatchMultiple(['actionAdminActivateAfter', 'actionAdminProductsControllerActivateAfter'], $hookEventParameters); break; @@ -531,7 +531,7 @@ public function bulkAction(Request $request, $action) $hookDispatcher->dispatchMultiple(['actionAdminDeactivateBefore', 'actionAdminProductsControllerDeactivateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->activateProductIdList($productIdList, false); - $this->addFlash('success', $translator->trans('Product(s) successfully deactivated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product(s) successfully deactivated.', [], 'Admin.Catalog.Notification')); $logger->info('Products deactivated: ('.implode(',', $productIdList).').'); $hookDispatcher->dispatchMultiple(['actionAdminDeactivateAfter', 'actionAdminProductsControllerDeactivateAfter'], $hookEventParameters); break; @@ -539,7 +539,7 @@ public function bulkAction(Request $request, $action) $hookDispatcher->dispatchMultiple(['actionAdminDeleteBefore', 'actionAdminProductsControllerDeleteBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->deleteProductIdList($productIdList); - $this->addFlash('success', $translator->trans('Product(s) successfully deleted.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product(s) successfully deleted.', [], 'Admin.Catalog.Notification')); $logger->info('Products deleted: ('.implode(',', $productIdList).').'); $hookDispatcher->dispatchMultiple(['actionAdminDeleteAfter', 'actionAdminProductsControllerDeleteAfter'], $hookEventParameters); break; @@ -547,7 +547,7 @@ public function bulkAction(Request $request, $action) $hookDispatcher->dispatchMultiple(['actionAdminDuplicateBefore', 'actionAdminProductsControllerDuplicateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->duplicateProductIdList($productIdList); - $this->addFlash('success', $translator->trans('Product(s) successfully duplicated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product(s) successfully duplicated.', [], 'Admin.Catalog.Notification')); $logger->info('Products duplicated: ('.implode(',', $productIdList).').'); $hookDispatcher->dispatchMultiple(['actionAdminDuplicateAfter', 'actionAdminProductsControllerDuplicateAfter'], $hookEventParameters); break; @@ -604,7 +604,7 @@ public function massEditAction(Request $request, $action) ); // Hooks: managed in ProductUpdater $productUpdater->sortProductIdList(array_combine($productIdList, $productPositionList), $productProvider->getPersistedFilterParameters()); - $this->addFlash('success', $translator->trans('Products successfully sorted.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Products successfully sorted.', [], 'Admin.Catalog.Notification')); $logger->info('Products sorted: ('.implode(',', $productIdList).') with positions ('.implode(',', $productPositionList).').'); $hookDispatcher->dispatchMultiple( ['actionAdminSortAfter', 'actionAdminProductsControllerSortAfter'], @@ -661,7 +661,7 @@ public function unitAction(Request $request, $action, $id) $hookDispatcher->dispatchMultiple(['actionAdminDeleteBefore', 'actionAdminProductsControllerDeleteBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->deleteProduct($id); - $this->addFlash('success', $translator->trans('Product successfully deleted.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product successfully deleted.', [], 'Admin.Catalog.Notification')); $logger->info('Product deleted: (' . $id . ').'); $hookDispatcher->dispatchMultiple(['actionAdminDeleteAfter', 'actionAdminProductsControllerDeleteAfter'], $hookEventParameters); break; @@ -669,7 +669,7 @@ public function unitAction(Request $request, $action, $id) $hookDispatcher->dispatchMultiple(['actionAdminDuplicateBefore', 'actionAdminProductsControllerDuplicateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $duplicateProductId = $productUpdater->duplicateProduct($id); - $this->addFlash('success', $translator->trans('Product successfully duplicated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product successfully duplicated.', [], 'Admin.Catalog.Notification')); $logger->info('Product duplicated: (from ' . $id . ' to ' . $duplicateProductId . ').'); $hookDispatcher->dispatchMultiple(['actionAdminDuplicateAfter', 'actionAdminProductsControllerDuplicateAfter'], $hookEventParameters); // stops here and redirect to the new product's page. @@ -678,7 +678,7 @@ public function unitAction(Request $request, $action, $id) $hookDispatcher->dispatchMultiple(['actionAdminActivateBefore', 'actionAdminProductsControllerActivateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->activateProductIdList([$id]); - $this->addFlash('success', $translator->trans('Product successfully activated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product successfully activated.', [], 'Admin.Catalog.Notification')); $logger->info('Product activated: '.$id); $hookDispatcher->dispatchMultiple(['actionAdminActivateAfter', 'actionAdminProductsControllerActivateAfter'], $hookEventParameters); break; @@ -686,7 +686,7 @@ public function unitAction(Request $request, $action, $id) $hookDispatcher->dispatchMultiple(['actionAdminDeactivateBefore', 'actionAdminProductsControllerDeactivateBefore'], $hookEventParameters); // Hooks: managed in ProductUpdater $productUpdater->activateProductIdList([$id], false); - $this->addFlash('success', $translator->trans('Product successfully deactivated.', [], 'AdminProducts')); + $this->addFlash('success', $translator->trans('Product successfully deactivated.', [], 'Admin.Catalog.Notification')); $logger->info('Product deactivated: '.$id); $hookDispatcher->dispatchMultiple(['actionAdminDeactivateAfter', 'actionAdminProductsControllerDeactivateAfter'], $hookEventParameters); break; @@ -839,7 +839,7 @@ public function renderFieldAction($productId, $step, $fieldName) $form = $this->createFormBuilder($modelMapper->getFormData()); - switch($step) { + switch ($step) { case 'step1': $form->add('step1', 'PrestaShopBundle\Form\Admin\Product\ProductInformation'); break; diff --git a/src/PrestaShopBundle/Controller/Admin/ProductImageController.php b/src/PrestaShopBundle/Controller/Admin/ProductImageController.php index d263c06999cbe..e9acac733ddb7 100644 --- a/src/PrestaShopBundle/Controller/Admin/ProductImageController.php +++ b/src/PrestaShopBundle/Controller/Admin/ProductImageController.php @@ -60,7 +60,7 @@ public function uploadImageAction($idProduct, Request $request) ->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', array( 'error_bubbling' => true, 'constraints' => [ - new Assert\NotNull(array('message' => $translator->trans('Please select a file', [], 'AdminProducts'))), + new Assert\NotNull(array('message' => $translator->trans('Please select a file', [], 'Admin.Catalog.Feature'))), new Assert\Image(array('maxSize' => $this->configuration->get('PS_ATTACHMENT_MAXIMUM_SIZE').'M')), ] )) @@ -132,11 +132,11 @@ public function formAction($idImage, Request $request) 'options' => [], 'locales' => $locales, 'hideTabs' => true, - 'label' => $translator->trans('Legend', [], 'AdminProducts'), + 'label' => $translator->trans('Legend', [], 'Admin.Catalog.Feature'), 'required' => false, )) ->add('cover', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $translator->trans('Choose as cover image', [], 'AdminProducts'), + 'label' => $translator->trans('Choose as cover image', [], 'Admin.Catalog.Feature'), 'required' => false, )) ->getForm(); diff --git a/src/PrestaShopBundle/Form/Admin/Category/SimpleCategory.php b/src/PrestaShopBundle/Form/Admin/Category/SimpleCategory.php index 89131ea430911..9226a13ceada0 100644 --- a/src/PrestaShopBundle/Form/Admin/Category/SimpleCategory.php +++ b/src/PrestaShopBundle/Form/Admin/Category/SimpleCategory.php @@ -76,7 +76,7 @@ protected function formatValidList($list) public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( - 'label' => $this->translator->trans('Name', [], 'AdminGlobal'), + 'label' => $this->translator->trans('Name', [], 'Admin.Global'), 'required' => false, 'attr' => ['placeholder' => $this->translator->trans('Category name', [], 'Admin.Catalog.Feature'), 'class' => 'ajax'], 'constraints' => $options['ajax'] ? [] : array( diff --git a/src/PrestaShopBundle/Form/Admin/Feature/ProductFeature.php b/src/PrestaShopBundle/Form/Admin/Feature/ProductFeature.php index 37ddbff9fbb08..bd7c0ce3700e0 100644 --- a/src/PrestaShopBundle/Form/Admin/Feature/ProductFeature.php +++ b/src/PrestaShopBundle/Form/Admin/Feature/ProductFeature.php @@ -69,7 +69,7 @@ public function __construct($translator, $legacyContext, $router, $featureDataPr public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('feature', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Feature', [], 'AdminProducts'), + 'label' => $this->translator->trans('Feature', [], 'Admin.Catalog.Feature'), 'choices' => $this->features, 'choices_as_values' => true, 'required' => false, @@ -80,7 +80,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ) )) ->add('value', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Pre-defined value', [], 'AdminProducts'), + 'label' => $this->translator->trans('Pre-defined value', [], 'Admin.Catalog.Feature'), 'required' => false, 'choices_as_values' => true, 'attr' => array('class' => 'feature-value-selector') @@ -91,7 +91,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'locales' => $this->locales, 'hideTabs' => true, 'required' => false, - 'label' => $this->translator->trans('OR Customized value', [], 'AdminProducts'), + 'label' => $this->translator->trans('OR Customized value', [], 'Admin.Catalog.Feature'), )); $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { @@ -109,7 +109,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ); $form->add('value', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Pre-defined value', [], 'AdminProducts'), + 'label' => $this->translator->trans('Pre-defined value', [], 'Admin.Catalog.Feature'), 'choices' => $choices, 'choices_as_values' => true, 'required' => false, @@ -133,7 +133,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ); $form->add('value', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Pre-defined value', [], 'AdminProducts'), + 'label' => $this->translator->trans('Pre-defined value', [], 'Admin.Catalog.Feature'), 'required' => false, 'attr' => array('class' => 'feature-value-selector'), 'choices' => $choices, diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductAttachement.php b/src/PrestaShopBundle/Form/Admin/Product/ProductAttachement.php index 2c48b89d7cdf0..4dab3227c6e8d 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductAttachement.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductAttachement.php @@ -63,26 +63,26 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', array( 'required' => false, - 'label' => $this->translator->trans('File', [], 'AdminProducts'), + 'label' => $this->translator->trans('File', [], 'Admin.Global'), 'constraints' => array( - new Assert\NotNull(array('message' => $this->translator->trans('Please select a file', [], 'AdminProducts'))), + new Assert\NotNull(array('message' => $this->translator->trans('Please select a file', [], 'Admin.Catalog.Feature'))), new Assert\File(array('maxSize' => $this->configuration->get('PS_ATTACHMENT_MAXIMUM_SIZE').'M')), ) )) ->add('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( - 'label' => $this->translator->trans('Filename', [], 'AdminProducts'), - 'attr' => ['placeholder' => $this->translator->trans('Title', [], 'AdminProducts')], + 'label' => $this->translator->trans('Filename', [], 'Admin.Global'), + 'attr' => ['placeholder' => $this->translator->trans('Title', [], 'Admin.Global')], 'constraints' => array( new Assert\NotBlank(), new Assert\Length(array('min' => 2)) ) )) ->add('description', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( - 'label' => $this->translator->trans('Description', [], 'AdminProducts'), - 'attr' => ['placeholder' => $this->translator->trans('Description', [], 'AdminProducts')], + 'label' => $this->translator->trans('Description', [], 'Admin.Global'), + 'attr' => ['placeholder' => $this->translator->trans('Description', [], 'Admin.Global')], )) ->add('add', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', array( - 'label' => $this->translator->trans('Add', [], 'AdminProducts'), + 'label' => $this->translator->trans('Add', [], 'Admin.Actions'), 'attr' => ['class' => 'btn-primary-outline pull-right'] )); diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductCombination.php b/src/PrestaShopBundle/Form/Admin/Product/ProductCombination.php index ac63132fad276..b43b26be5727e 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductCombination.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductCombination.php @@ -68,48 +68,48 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('attribute_reference', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('Reference', [], 'AdminProducts') + 'label' => $this->translator->trans('Reference', [], 'Admin.Global') )) ->add('attribute_ean13', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, 'error_bubbling' => true, - 'label' => $this->translator->trans('EAN-13 or JAN barcode', [], 'AdminProducts'), + 'label' => $this->translator->trans('EAN-13 or JAN barcode', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\Regex("/^[0-9]{0,13}$/"), ) )) ->add('attribute_isbn', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('ISBN code', [], 'AdminProducts') + 'label' => $this->translator->trans('ISBN code', [], 'Admin.Catalog.Feature') )) ->add('attribute_upc', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('UPC barcode', [], 'AdminProducts'), + 'label' => $this->translator->trans('UPC barcode', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\Regex("/^[0-9]{0,12}$/"), ) )) ->add('attribute_wholesale_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Cost price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Cost price', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )) ->add('attribute_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Impact on price (tax excl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on price (tax excl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'attr' => ['class' => 'attribute_priceTE'] )) ->add('attribute_priceTI', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, 'mapped' => false, - 'label' => $this->translator->trans('Impact on price (tax incl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on price (tax incl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'attr' => ['class' => 'attribute_priceTI'] )) ->add('attribute_ecotax', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Ecotax', [], 'AdminProducts'), + 'label' => $this->translator->trans('Ecotax', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'constraints' => array( new Assert\NotBlank(), @@ -118,16 +118,16 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('attribute_weight', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Impact on weight', [], 'AdminProducts') + 'label' => $this->translator->trans('Impact on weight', [], 'Admin.Catalog.Feature') )) ->add('attribute_unity', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Impact on price per unit (tax excl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on price per unit (tax excl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )) ->add('attribute_minimal_quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Min. quantity for sale', [], 'AdminProducts'), + 'label' => $this->translator->trans('Min. quantity for sale', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')), @@ -135,17 +135,17 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('available_date_attribute', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( 'required' => false, - 'label' => $this->translator->trans('Availability date', [], 'AdminProducts'), + 'label' => $this->translator->trans('Availability date', [], 'Admin.Catalog.Feature'), 'attr' => ['class' => 'date', 'placeholder' => 'YYYY-MM-DD'] )) ->add('attribute_default', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Set as default combination', [], 'AdminProducts'), + 'label' => $this->translator->trans('Set as default combination', [], 'Admin.Catalog.Feature'), 'required' => false, 'attr' => array('class' => 'attribute_default_checkbox'), )) ->add('attribute_quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => true, - 'label' => $this->translator->trans('Quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Quantity', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')), @@ -157,12 +157,12 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'required' => false, 'expanded' => true, 'multiple' => true, - 'label' => $this->translator->trans('Select images of this combination:', [], 'AdminProducts'), + 'label' => $this->translator->trans('Select images of this combination:', [], 'Admin.Catalog.Feature'), 'attr' => array('class' => 'images'), )) ->add('final_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Final price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Final price', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )); diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductCombinationBulk.php b/src/PrestaShopBundle/Form/Admin/Product/ProductCombinationBulk.php index 807648388bc4c..937039f78478a 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductCombinationBulk.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductCombinationBulk.php @@ -52,41 +52,41 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => true, - 'label' => $this->translator->trans('Quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Quantity', [], 'Admin.Catalog.Feature'), )) ->add('cost_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Cost Price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Cost Price', [], 'Admin.Catalog.Feature'), 'attr' => ['data-display-price-precision' => $this->priceDisplayPrecision], 'currency' => $this->isoCode, )) ->add('impact_on_weight', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Impact on weight', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on weight', [], 'Admin.Catalog.Feature'), )) ->add('impact_on_price_te', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Impact on price (tax excl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on price (tax excl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->isoCode, )) ->add('impact_on_price_ti', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, 'mapped' => false, - 'label' => $this->translator->trans('Impact on price (tax incl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Impact on price (tax incl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->isoCode, )) ->add('date_availability', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( 'required' => false, - 'label' => $this->translator->trans('Availability date', [], 'AdminProducts'), + 'label' => $this->translator->trans('Availability date', [], 'Admin.Catalog.Feature'), 'attr' => ['class' => 'date', 'placeholder' => 'YYYY-MM-DD'], )) ->add('reference', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('Reference', [], 'AdminProducts'), + 'label' => $this->translator->trans('Reference', [], 'Admin.Catalog.Feature'), )) ->add('minimal_quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Minimum quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Minimum quantity', [], 'Admin.Catalog.Feature'), )); } diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductCustomField.php b/src/PrestaShopBundle/Form/Admin/Product/ProductCustomField.php index 0fac0781c1553..d57b64dcd0b16 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductCustomField.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductCustomField.php @@ -65,13 +65,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) )], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Label', [], 'AdminProducts') + 'label' => $this->translator->trans('Label', [], 'Admin.Global') )) ->add('type', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Type', [], 'AdminProducts'), + 'label' => $this->translator->trans('Type', [], 'Admin.Catalog.Feature'), 'choices' => array( - $this->translator->trans('Text', [], 'AdminProducts') => 1, - $this->translator->trans('File', [], 'AdminProducts') => 0, + $this->translator->trans('Text', [], 'Admin.Global') => 1, + $this->translator->trans('File', [], 'Admin.Global') => 0, ), 'attr' => array( 'class' => 'c-select', @@ -79,7 +79,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices_as_values' => true, 'required' => true ))->add('require', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Required', [], 'AdminProducts'), + 'label' => $this->translator->trans('Required', [], 'Admin.Global'), 'required' => false, )); } diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php b/src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php index f1de3833e9eed..7966f5b47838b 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductInformation.php @@ -92,19 +92,19 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('type_product', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('Standard product', [], 'AdminProducts') => 0, - $this->translator->trans('Pack of existing products', [], 'AdminProducts') => 1, - $this->translator->trans('Virtual product (services, booking, downloadable products, etc.)', [], 'AdminProducts') => 2, + $this->translator->trans('Standard product', [], 'Admin.Catalog.Feature') => 0, + $this->translator->trans('Pack of products', [], 'Admin.Catalog.Feature') => 1, + $this->translator->trans('Virtual product', [], 'Admin.Catalog.Feature') => 2, ), 'choices_as_values' => true, - 'label' => $this->translator->trans('Type', [], 'AdminProducts'), + 'label' => $this->translator->trans('Type', [], 'Admin.Catalog.Feature'), 'required' => true, )) ->add('inputPackItems', 'PrestaShopBundle\Form\Admin\Type\TypeaheadProductPackCollectionType', array( 'remote_url' => $this->context->getAdminLink('', false).'ajax_products_list.php?forceJson=1&excludeVirtuals=1&limit=20&q=%QUERY', 'mapping_value' => 'id', 'mapping_name' => 'name', - 'placeholder' => $this->translator->trans('Search for a product', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('Search for a product', [], 'Admin.Catalog.Help'), 'template_collection' => '

%s

REF: %s
@@ -112,7 +112,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ', 'required' => false, - 'label' => $this->translator->trans('Add product in your pack', [], 'AdminProducts'), + 'label' => $this->translator->trans('Add products to your pack', [], 'Admin.Catalog.Feature'), )) ->add('name', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', @@ -120,11 +120,11 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'constraints' => array( new Assert\NotBlank(), new Assert\Length(array('min' => 3, 'max' => 128)) - ), 'attr' => ['placeholder' => $this->translator->trans('Enter your product name', [], 'AdminProducts'), 'class' => 'edit js-edit'] + ), 'attr' => ['placeholder' => $this->translator->trans('Enter your product name', [], 'Admin.Catalog.Help'), 'class' => 'edit js-edit'] ], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Name', [], 'AdminProducts') + 'label' => $this->translator->trans('Name', [], 'Admin.Global') )) ->add('description', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextareaType', @@ -134,7 +134,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Description', [], 'AdminProducts'), + 'label' => $this->translator->trans('Description', [], 'Admin.Global'), 'required' => false )) ->add('description_short', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( @@ -142,7 +142,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'options' => [ 'attr' => array( 'class' => 'autoload_rte', - 'placeholder' => $this->translator->trans('The summary is a short sentence describing your product.
It will appears at the top of your shop\'s product page, in product lists, and in search engines\' results page (so it\'s important for SEO). To give more details about your product, use the « Description » tab.', [], 'AdminProducts') + 'placeholder' => $this->translator->trans('The summary is a short sentence describing your product.
It will appears at the top of your shop\'s product page, in product lists, and in search engines\' results page (so it\'s important for SEO). To give more details about your product, use the "Description" tab.', [], 'Admin.Catalog.Help') ), 'constraints' => array( new Assert\Callback(function ($str, ExecutionContextInterface $context) { @@ -151,8 +151,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) if (strlen($str) > $limit) { $context->addViolation( - $this->translator->trans('This value is too long. It should have {{ limit }} characters or less.', [], 'AdminProducts'), - array('{{ limit }}' => $limit) + $this->translator->trans('This value is too long. It should have %limit% characters or less.', [], 'Admin.Catalog.Notification'), + array('%limit%' => $limit) ); } }), @@ -161,7 +161,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Short description', [], 'AdminProducts'), + 'label' => $this->translator->trans('Short description', [], 'Admin.Catalog.Feature'), 'required' => false )) @@ -176,17 +176,17 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices' => $this->manufacturers, 'choices_as_values' => true, 'required' => false, - 'label' => $this->translator->trans('Manufacturer', [], 'AdminProducts') + 'label' => $this->translator->trans('Brand', [], 'Admin.Catalog.Feature') )) //RIGHT COL ->add('active', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Enabled', [], 'AdminProducts'), + 'label' => $this->translator->trans('Enabled', [], 'Admin.Global'), 'required' => false, )) ->add('price_shortcut', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Pre-tax retail price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Pre-tax retail price', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'constraints' => array( new Assert\NotBlank(), @@ -196,20 +196,20 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('price_ttc_shortcut', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Retail price with tax', [], 'AdminProducts'), + 'label' => $this->translator->trans('Retail price with tax', [], 'Admin.Catalog.Feature'), 'mapped' => false, 'currency' => $this->currency->iso_code, )) ->add('qty_0_shortcut', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Quantity', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')) ) )) ->add('categories', 'PrestaShopBundle\Form\Admin\Type\ChoiceCategoriesTreeType', array( - 'label' => $this->translator->trans('Associated categories', [], 'AdminProducts'), + 'label' => $this->translator->trans('Associated categories', [], 'Admin.Catalog.Feature'), 'list' => $this->nested_categories, 'valid_list' => $this->categories, 'multiple' => true, @@ -220,14 +220,14 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'expanded' => true, 'multiple' => false, 'required' => true, - 'label' => $this->translator->trans('Default category', [], 'AdminProducts') + 'label' => $this->translator->trans('Default category', [], 'Admin.Catalog.Feature') )) ->add('new_category', 'PrestaShopBundle\Form\Admin\Category\SimpleCategory', array( 'ajax' => true, 'required' => false, 'mapped' => false, 'constraints' => [], - 'label' => $this->translator->trans('Add a new category', [], 'AdminProducts'), + 'label' => $this->translator->trans('Add a new category', [], 'Admin.Catalog.Feature'), )) ->add('ignore', null, [ 'mapped' => false @@ -236,10 +236,10 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'remote_url' => $this->context->getAdminLink('', false).'ajax_products_list.php?forceJson=1&disableCombination=1&exclude_packs=0&excludeVirtuals=0&limit=20&q=%QUERY', 'mapping_value' => 'id', 'mapping_name' => 'name', - 'placeholder' => $this->translator->trans('Search and add a related product', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('Search and add a related product', [], 'Admin.Catalog.Help'), 'template_collection' => '%sclear', 'required' => false, - 'label' => $this->translator->trans('Accessories', [], 'AdminProducts') + 'label' => $this->translator->trans('Accessories', [], 'Admin.Catalog.Feature') )); $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { @@ -249,7 +249,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) if ($data['type_product'] == 1) { if (!isset($data['inputPackItems']) || empty($data['inputPackItems']['data'])) { $form = $event->getForm(); - $error = $this->translator->trans('This pack is empty. You must add at least one product item.', [], 'AdminProducts'); + $error = $this->translator->trans('This pack is empty. You must add at least one product item.', [], 'Admin.Catalog.Notification'); $form->get('inputPackItems')->addError(new FormError($error)); } } diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php b/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php index 72bd9bfedbfb1..5236cdc9cb55e 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductOptions.php @@ -86,44 +86,44 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('visibility', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('Everywhere', [], 'AdminProducts') => 'both', - $this->translator->trans('Catalog only', [], 'AdminProducts') => 'catalog', - $this->translator->trans('Search only', [], 'AdminProducts') => 'search', - $this->translator->trans('Nowhere', [], 'AdminProducts') => 'none', + $this->translator->trans('Everywhere', [], 'Admin.Catalog.Feature') => 'both', + $this->translator->trans('Catalog only', [], 'Admin.Catalog.Feature') => 'catalog', + $this->translator->trans('Search only', [], 'Admin.Catalog.Feature') => 'search', + $this->translator->trans('Nowhere', [], 'Admin.Catalog.Feature') => 'none', ), 'choices_as_values' => true, 'required' => true, - 'label' => $this->translator->trans('Visibility', [], 'AdminProducts'), + 'label' => $this->translator->trans('Visibility', [], 'Admin.Catalog.Feature'), )) ->add('tags', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', 'options' => [ 'attr' => [ 'class' => 'tokenfield', - 'placeholder' => $this->translator->trans('Use a comma to create seperate tags. E.g.: dress, cotton, party dresses.', [], 'AdminProducts') + 'placeholder' => $this->translator->trans('Use a comma to create seperate tags. E.g.: dress, cotton, party dresses.', [], 'Admin.Catalog.Help') ] ], 'locales' => $this->locales, - 'label' => $this->translator->trans('Tags', [], 'AdminProducts') + 'label' => $this->translator->trans('Tags', [], 'Admin.Catalog.Feature') )) ->add( - $builder->create('display_options', 'Symfony\Component\Form\Extension\Core\Type\FormType', array('required' => false, 'label' => $this->translator->trans('Display options', [], 'AdminProducts'))) + $builder->create('display_options', 'Symfony\Component\Form\Extension\Core\Type\FormType', array('required' => false, 'label' => $this->translator->trans('Display options', [], 'Admin.Catalog.Feature'))) ->add('available_for_order', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Available for order', [], 'AdminProducts'), + 'label' => $this->translator->trans('Available for order', [], 'Admin.Catalog.Feature'), 'required' => false, )) ->add('show_price', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Show price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Show price', [], 'Admin.Catalog.Feature'), 'required' => false, )) ->add('online_only', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Web only (not sold in your retail store)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Web only (not sold in your retail store)', [], 'Admin.Catalog.Feature'), 'required' => false, )) ) ->add('upc', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('UPC barcode', [], 'AdminProducts'), + 'label' => $this->translator->trans('UPC barcode', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\Regex("/^[0-9]{0,12}$/"), ) @@ -131,32 +131,32 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('ean13', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, 'error_bubbling' => true, - 'label' => $this->translator->trans('EAN-13 or JAN barcode', [], 'AdminProducts'), + 'label' => $this->translator->trans('EAN-13 or JAN barcode', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\Regex("/^[0-9]{0,13}$/"), ) )) ->add('isbn', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('ISBN', [], 'AdminProducts') + 'label' => $this->translator->trans('ISBN', [], 'Admin.Catalog.Feature') )) ->add('reference', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('Reference', [], 'AdminProducts') + 'label' => $this->translator->trans('Reference', [], 'Admin.Global') )) ->add('show_condition', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( 'required' => false, - 'label' => $this->translator->trans('Display condition on product page', [], 'AdminProducts'), + 'label' => $this->translator->trans('Display condition on product page', [], 'Admin.Catalog.Feature'), )) ->add('condition', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('New', [], 'AdminProducts') => 'new', - $this->translator->trans('Used', [], 'AdminProducts') => 'used', - $this->translator->trans('Refurbished', [], 'AdminProducts') => 'refurbished' + $this->translator->trans('New', [], 'Admin.Catalog.Feature') => 'new', + $this->translator->trans('Used', [], 'Admin.Catalog.Feature') => 'used', + $this->translator->trans('Refurbished', [], 'Admin.Catalog.Feature') => 'refurbished' ), 'choices_as_values' => true, 'required' => true, - 'label' => $this->translator->trans('Condition', [], 'AdminProducts') + 'label' => $this->translator->trans('Condition', [], 'Admin.Catalog.Feature') )) ->add('suppliers', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => $this->suppliers, @@ -164,13 +164,13 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'expanded' => true, 'multiple' => true, 'required' => false, - 'label' => $this->translator->trans('Suppliers', [], 'AdminProducts') + 'label' => $this->translator->trans('Suppliers', [], 'Admin.Global') )) ->add('default_supplier', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => $this->suppliers, 'choices_as_values' => true, 'required' => true, - 'label' => $this->translator->trans('Default suppliers', [], 'AdminProducts') + 'label' => $this->translator->trans('Default suppliers', [], 'Admin.Catalog.Feature') )); foreach ($this->suppliers as $supplier => $id) { @@ -188,7 +188,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('custom_fields', 'Symfony\Component\Form\Extension\Core\Type\CollectionType', array( 'entry_type' =>'PrestaShopBundle\Form\Admin\Product\ProductCustomField', - 'label' => $this->translator->trans('Customization', [], 'AdminProducts'), + 'label' => $this->translator->trans('Customization', [], 'Admin.Catalog.Feature'), 'prototype' => true, 'allow_add' => true, 'allow_delete' => true @@ -197,7 +197,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) //Add product attachment form $builder->add('attachment_product', 'PrestaShopBundle\Form\Admin\Product\ProductAttachement', array( 'required' => false, - 'label' => $this->translator->trans('Attachment', [], 'AdminProducts'), + 'label' => $this->translator->trans('Attachment', [], 'Admin.Catalog.Feature'), 'attr' => ['data-action' => $this->router->generate('admin_product_attachement_add_action')] )); @@ -209,7 +209,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices_as_values' => true, 'required' => false, 'attr' => ['data' => $this->fullAttachmentList], - 'label' => $this->translator->trans('Attachments for this product:', [], 'AdminProducts') + 'label' => $this->translator->trans('Attachments for this product:', [], 'Admin.Catalog.Feature') )); $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductPrice.php b/src/PrestaShopBundle/Form/Admin/Product/ProductPrice.php index 20e41e1c480c6..fc3c1453b99b8 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductPrice.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductPrice.php @@ -82,7 +82,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Price - Tax excluded', [], 'AdminProducts'), + 'label' => $this->translator->trans('Price (tax excl.)', [], 'Admin.Catalog.Feature'), 'attr' => ['data-display-price-precision' => $this->configuration->get('_PS_PRICE_DISPLAY_PRECISION_')], 'currency' => $this->currency->iso_code, 'constraints' => array( @@ -93,12 +93,12 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('price_ttc', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, 'mapped' => false, - 'label' => $this->translator->trans('Price - Tax included', [], 'AdminProducts'), + 'label' => $this->translator->trans('Price (tax incl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )) ->add('ecotax', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Ecotax (tax incl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Ecotax (tax incl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'constraints' => array( new Assert\NotBlank(), @@ -116,38 +116,38 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'data-computation-method' => $this->tax_rules_rates[$val]['computation_method'], ]; }, - 'label' => $this->translator->trans('Tax rule', [], 'AdminProducts'), + 'label' => $this->translator->trans('Tax rule', [], 'Admin.Catalog.Feature'), )) ->add('on_sale', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( 'required' => false, - 'label' => $this->translator->trans('Display the "On sale!" flag on the product page, and on product listings.', [], 'AdminProducts'), + 'label' => $this->translator->trans('Display the "On sale!" flag on the product page, and on product listings.', [], 'Admin.Catalog.Feature'), )) ->add('wholesale_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Price - Tax excluded', [], 'AdminProducts'), + 'label' => $this->translator->trans('Price (tax excl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )) ->add('unit_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Price per unit - Tax excluded', [], 'AdminProducts'), + 'label' => $this->translator->trans('Price per unit (tax excl.)', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, )) ->add('unity', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'attr' => ['placeholder' => $this->translator->trans('Per kilo, per litre', [], 'AdminProducts')] + 'attr' => ['placeholder' => $this->translator->trans('Per kilo, per litre', [], 'Admin.Catalog.Help')] )) ->add('specific_price', 'PrestaShopBundle\Form\Admin\Product\ProductSpecificPrice') ->add('specificPricePriorityToAll', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( 'required' => false, - 'label' => $this->translator->trans('Apply to all products', [], 'AdminProducts'), + 'label' => $this->translator->trans('Apply to all products', [], 'Admin.Catalog.Feature'), )); //generates fields for price priority $specificPricePriorityChoices = [ - $this->translator->trans('Shop', [], 'AdminProducts') => 'id_shop', - $this->translator->trans('Currency', [], 'AdminProducts') => 'id_currency', - $this->translator->trans('Country', [], 'AdminProducts') => 'id_country', - $this->translator->trans('Group', [], 'AdminProducts') => 'id_group', + $this->translator->trans('Shop', [], 'Admin.Global') => 'id_shop', + $this->translator->trans('Currency', [], 'Admin.Global') => 'id_currency', + $this->translator->trans('Country', [], 'Admin.Global') => 'id_country', + $this->translator->trans('Group', [], 'Admin.Global') => 'id_group', ]; for ($i=0; $i < count($specificPricePriorityChoices); $i++) { diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductQuantity.php b/src/PrestaShopBundle/Form/Admin/Product/ProductQuantity.php index d90756b2c603b..32ebd405697a1 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductQuantity.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductQuantity.php @@ -69,21 +69,21 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'attr' => [ 'class' => 'tokenfield', 'data-minLength' => 1, - 'placeholder' => $this->translator->trans('Combine several attributes, e.g.: "Size: all", "Color: red".', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('Combine several attributes, e.g.: "Size: all", "Color: red".', [], 'Admin.Catalog.Help'), 'data-prefetch' => $this->router->generate('admin_attribute_get_all'), 'data-action' => $this->router->generate('admin_attribute_generator'), ], - 'label' => $this->translator->trans('Create combinations', [], 'AdminProducts') + 'label' => $this->translator->trans('Create combinations', [], 'Admin.Catalog.Feature') )) ->add('advanced_stock_management', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( 'required' => false, - 'label' => $this->translator->trans('I want to use the advanced stock management system for this product.', [], 'AdminProducts'), + 'label' => $this->translator->trans('I want to use the advanced stock management system for this product.', [], 'Admin.Catalog.Feature'), )) ->add('pack_stock_type', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', ['choices_as_values' => true, ]) //see eventListener for details ->add('depends_on_stock', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('The available quantities for the current product and its combinations are based on the stock in your warehouse (using the advanced stock management system). ', [], 'AdminProducts') => 1, - $this->translator->trans('I want to specify available quantities manually.', [], 'AdminProducts') => 0, + $this->translator->trans('The available quantities for the current product and its combinations are based on the stock in your warehouse (using the advanced stock management system). ', [], 'Admin.Catalog.Feature') => 1, + $this->translator->trans('I want to specify available quantities manually.', [], 'Admin.Catalog.Feature') => 0, ), 'choices_as_values' => true, 'expanded' => true, @@ -92,7 +92,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('qty_0', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => true, - 'label' => $this->translator->trans('Quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Quantity', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')), @@ -108,7 +108,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('minimal_quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => true, - 'label' => $this->translator->trans('Minimum quantity', [], 'AdminProducts'), + 'label' => $this->translator->trans('Minimum quantity', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')), @@ -119,71 +119,71 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'options' => [], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Label when in stock', [], 'AdminProducts') + 'label' => $this->translator->trans('Label when in stock', [], 'Admin.Catalog.Feature') )) ->add('available_later', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', 'options' => [], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Label when out of stock', [], 'AdminProducts') + 'label' => $this->translator->trans('Label when out of stock', [], 'Admin.Catalog.Feature') )) ->add('available_date', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( 'required' => false, - 'label' => $this->translator->trans('Availability date', [], 'AdminProducts'), + 'label' => $this->translator->trans('Availability date', [], 'Admin.Catalog.Feature'), 'attr' => ['placeholder' => 'YYYY-MM-DD'] )) ->add('virtual_product', 'PrestaShopBundle\Form\Admin\Product\ProductVirtual', array( 'required' => false, - 'label' => $this->translator->trans('Does this product have an associated file?', [], 'AdminProducts'), + 'label' => $this->translator->trans('Does this product have an associated file?', [], 'Admin.Catalog.Feature'), )); $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { $form = $event->getForm(); //Manage out_of_stock field with contextual values/label - $defaultChoiceLabel = $this->translator->trans('Use default behavior', [], 'AdminProducts').' ('; + $defaultChoiceLabel = $this->translator->trans('Use default behavior', [], 'Admin.Catalog.Feature').' ('; $defaultChoiceLabel .= $this->configuration->get('PS_ORDER_OUT_OF_STOCK') == 1 ? - $this->translator->trans('allow', [], 'AdminProducts') : - $this->translator->trans('deny', [], 'AdminProducts'); + $this->translator->trans('Allow orders', [], 'Admin.Catalog.Feature') : + $this->translator->trans('Deny orders', [], 'Admin.Catalog.Feature'); $defaultChoiceLabel .= ')'; $form->add('out_of_stock', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('Deny orders', [], 'AdminProducts') => '0', - $this->translator->trans('Allow orders', [], 'AdminProducts') => '1', + $this->translator->trans('Deny orders', [], 'Admin.Catalog.Feature') => '0', + $this->translator->trans('Allow orders', [], 'Admin.Catalog.Feature') => '1', $defaultChoiceLabel => '2', ), 'choices_as_values' => true, 'expanded' => true, 'required' => false, 'placeholder' => false, - 'label' => $this->translator->trans('When out of stock', [], 'AdminProducts') + 'label' => $this->translator->trans('When out of stock', [], 'Admin.Catalog.Feature') )); //Manage out_of_stock field with contextual values/label $pack_stock_type = $this->configuration->get('PS_PACK_STOCK_TYPE'); - $defaultChoiceLabel = $this->translator->trans('Default', [], 'AdminProducts').': '; + $defaultChoiceLabel = $this->translator->trans('Default', [], 'Admin.Global').': '; if ($pack_stock_type == 0) { - $defaultChoiceLabel .= $this->translator->trans('Decrement pack only.', [], 'AdminProducts'); + $defaultChoiceLabel .= $this->translator->trans('Decrement pack only.', [], 'Admin.Catalog.Feature'); } elseif ($pack_stock_type == 1) { - $defaultChoiceLabel .= $this->translator->trans('Decrement products in pack only.', [], 'AdminProducts'); + $defaultChoiceLabel .= $this->translator->trans('Decrement products in pack only.', [], 'Admin.Catalog.Feature'); } else { - $defaultChoiceLabel .= $this->translator->trans('Decrement both.', [], 'AdminProducts'); + $defaultChoiceLabel .= $this->translator->trans('Decrement both.', [], 'Admin.Catalog.Feature'); } $form->add('pack_stock_type', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('Decrement pack only.', [], 'AdminProducts') => '0', - $this->translator->trans('Decrement products in pack only.', [], 'AdminProducts') => '1', - $this->translator->trans('Decrement both.', [], 'AdminProducts') => '2', + $this->translator->trans('Decrement pack only.', [], 'Admin.Catalog.Feature') => '0', + $this->translator->trans('Decrement products in pack only.', [], 'Admin.Catalog.Feature') => '1', + $this->translator->trans('Decrement both.', [], 'Admin.Catalog.Feature') => '2', $defaultChoiceLabel => '3', ), 'choices_as_values' => true, 'expanded' => false, 'required' => true, 'placeholder' => false, - 'label' => $this->translator->trans('Pack quantities', [], 'AdminProducts') + 'label' => $this->translator->trans('Pack quantities', [], 'Admin.Catalog.Feature') )); }); } diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductSeo.php b/src/PrestaShopBundle/Form/Admin/Product/ProductSeo.php index 3a8ca1cfab0f4..af8a304ff580b 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductSeo.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductSeo.php @@ -60,23 +60,23 @@ public function buildForm(FormBuilderInterface $builder, array $options) $builder->add('meta_title', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextType', 'options' => [ - 'attr' => ['placeholder' => $this->translator->trans('To have a different title from the product name, enter it here.', [], 'AdminProducts')], + 'attr' => ['placeholder' => $this->translator->trans('To have a different title from the product name, enter it here.', [], 'Admin.Catalog.Help')], 'required' => false ], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Meta title', [], 'AdminProducts'), + 'label' => $this->translator->trans('Meta title', [], 'Admin.Catalog.Feature'), 'required' => false )) ->add('meta_description', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( 'type' => 'Symfony\Component\Form\Extension\Core\Type\TextareaType', 'options' => [ - 'attr' => ['placeholder' => $this->translator->trans('To have a different description than your product summary in search results pages, write it here.', [], 'AdminProducts')], + 'attr' => ['placeholder' => $this->translator->trans('To have a different description than your product summary in search results pages, write it here.', [], 'Admin.Catalog.Help')], 'required' => false ], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Meta description', [], 'AdminProducts'), + 'label' => $this->translator->trans('Meta description', [], 'Admin.Catalog.Feature'), 'required' => false )) ->add('link_rewrite', 'PrestaShopBundle\Form\Admin\Type\TranslateType', array( @@ -84,27 +84,27 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'options' => [], 'locales' => $this->locales, 'hideTabs' => true, - 'label' => $this->translator->trans('Friendly URL', [], 'AdminProducts'), + 'label' => $this->translator->trans('Friendly URL', [], 'Admin.Catalog.Feature'), )) ->add('redirect_type', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('No redirection (404)', [], 'AdminProducts') => '404', - $this->translator->trans('Permanent redirection (301)', [], 'AdminProducts') => '301', - $this->translator->trans('Temporary redirection (302)', [], 'AdminProducts') => '302', + $this->translator->trans('No redirection (404)', [], 'Admin.Catalog.Feature') => '404', + $this->translator->trans('Permanent redirection (301)', [], 'Admin.Catalog.Feature') => '301', + $this->translator->trans('Temporary redirection (302)', [], 'Admin.Catalog.Feature') => '302', ), 'choices_as_values' => true, 'required' => true, - 'label' => $this->translator->trans('Redirection when offline', [], 'AdminProducts'), + 'label' => $this->translator->trans('Redirection when offline', [], 'Admin.Catalog.Feature'), )) ->add('id_product_redirected', 'PrestaShopBundle\Form\Admin\Type\TypeaheadProductCollectionType', array( 'remote_url' => $this->context->getAdminLink('', false).'ajax_products_list.php?forceJson=1&disableCombination=1&exclude_packs=0&excludeVirtuals=0&limit=20&q=%QUERY', 'mapping_value' => 'id', 'mapping_name' => 'name', - 'placeholder' => $this->translator->trans('To which product the page should redirect?', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('To which product the page should redirect?', [], 'Admin.Catalog.Help'), 'template_collection' => '%sclear', 'limit' => 1, 'required' => false, - 'label' => $this->translator->trans('Target product', [], 'AdminProducts') + 'label' => $this->translator->trans('Target product', [], 'Admin.Catalog.Feature') )); } diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductShipping.php b/src/PrestaShopBundle/Form/Admin/Product/ProductShipping.php index 4f8faf46f5f25..fe0fe94b1a078 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductShipping.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductShipping.php @@ -71,7 +71,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('width', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Width', [], 'AdminProducts'), + 'label' => $this->translator->trans('Width', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')) @@ -79,7 +79,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('height', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Height', [], 'AdminProducts'), + 'label' => $this->translator->trans('Height', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')) @@ -87,7 +87,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('depth', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Depth', [], 'AdminProducts'), + 'label' => $this->translator->trans('Depth', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')) @@ -95,7 +95,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('weight', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Weight', [], 'AdminProducts'), + 'label' => $this->translator->trans('Weight', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')) @@ -103,7 +103,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('additional_shipping_cost', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Shipping fees', [], 'AdminProducts'), + 'label' => $this->translator->trans('Shipping fees', [], 'Admin.Catalog.Feature'), 'currency' => $this->currency->iso_code, 'constraints' => array( new Assert\NotBlank(), @@ -116,7 +116,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'expanded' => true, 'multiple' => true, 'required' => false, - 'label' => $this->translator->trans('Available carriers', [], 'AdminProducts') + 'label' => $this->translator->trans('Available carriers', [], 'Admin.Catalog.Feature') )); foreach ($this->warehouses as $warehouse) { diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductSpecificPrice.php b/src/PrestaShopBundle/Form/Admin/Product/ProductSpecificPrice.php index 34a80522836f7..5e216f004e72b 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductSpecificPrice.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductSpecificPrice.php @@ -91,7 +91,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices_as_values' => true, 'required' => false, 'label' => false, - 'placeholder' => $this->translator->trans('All shops', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('All shops', [], 'Admin.Global'), )); } @@ -100,53 +100,53 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'choices_as_values' => true, 'required' => false, 'label' => false, - 'placeholder' => $this->translator->trans('All currencies', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('All currencies', [], 'Admin.Global'), )) ->add('sp_id_country', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => $this->countries, 'choices_as_values' => true, 'required' => false, 'label' => false, - 'placeholder' => $this->translator->trans('All countries', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('All countries', [], 'Admin.Global'), )) ->add('sp_id_group', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => $this->groups, 'choices_as_values' => true, 'required' => false, 'label' => false, - 'placeholder' => $this->translator->trans('All groups', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('All groups', [], 'Admin.Global'), )) ->add('sp_id_customer', 'PrestaShopBundle\Form\Admin\Type\TypeaheadCustomerCollectionType', array( 'remote_url' => $this->context->getAdminLink('AdminCustomers', true).'&sf2=1&ajax=1&tab=AdminCustomers&action=searchCustomers&customer_search=%QUERY', 'mapping_value' => 'id_customer', 'mapping_name' => 'fullname_and_email', - 'placeholder' => $this->translator->trans('All customers', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('All customers', [], 'Admin.Global'), 'template_collection' => '
%s
', 'limit' => 1, 'required' => false, - 'label' => $this->translator->trans('Add customer', [], 'AdminProducts'), + 'label' => $this->translator->trans('Add customer', [], 'Admin.Catalog.Feature'), )) ->add('sp_id_product_attribute', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => [], 'choices_as_values' => true, 'required' => false, - 'placeholder' => $this->translator->trans('Apply to all combinations', [], 'AdminProducts'), - 'label' => $this->translator->trans('Combinations', [], 'AdminProducts'), + 'placeholder' => $this->translator->trans('Apply to all combinations', [], 'Admin.Catalog.Feature'), + 'label' => $this->translator->trans('Combinations', [], 'Admin.Catalog.Feature'), 'attr' => ['data-action' => $this->router->generate('admin_get_product_combinations')], )) ->add('sp_from', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( 'required' => false, - 'label' => $this->translator->trans('Available from', [], 'AdminProducts'), + 'label' => $this->translator->trans('Available from', [], 'Admin.Catalog.Feature'), 'attr' => ['placeholder' => 'YYYY-MM-DD'] )) ->add('sp_to', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( 'required' => false, - 'label' => $this->translator->trans('to', [], 'AdminProducts'), + 'label' => $this->translator->trans('to', [], 'Admin.Global'), 'attr' => ['placeholder' => 'YYYY-MM-DD'] )) ->add('sp_from_quantity', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( 'required' => false, - 'label' => $this->translator->trans('Starting at', [], 'AdminProducts'), + 'label' => $this->translator->trans('Starting at', [], 'Admin.Catalog.Feature'), 'constraints' => array( new Assert\NotBlank(), new Assert\Type(array('type' => 'numeric')), @@ -154,43 +154,43 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('sp_price', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( 'required' => false, - 'label' => $this->translator->trans('Product price (tax excl.)', [], 'AdminProducts'), + 'label' => $this->translator->trans('Product price (tax excl.)', [], 'Admin.Catalog.Feature'), 'attr' => ['class' => 'price'], 'currency' => $this->currency->iso_code, )) ->add('leave_bprice', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( - 'label' => $this->translator->trans('Leave initial price', [], 'AdminProducts'), + 'label' => $this->translator->trans('Leave initial price', [], 'Admin.Catalog.Feature'), 'required' => false, )) ->add('sp_reduction', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', array( - 'label' => $this->translator->trans('Reduction', [], 'AdminProducts'), + 'label' => $this->translator->trans('Reduction', [], 'Admin.Catalog.Feature'), 'required' => false, 'currency' => $this->currency->iso_code, )) ->add('sp_reduction_type', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Reduction type', [], 'AdminProducts'), + 'label' => $this->translator->trans('Reduction type', [], 'Admin.Catalog.Feature'), 'choices' => array( '€' => 'amount', - $this->translator->trans('%', [], 'AdminProducts') => 'percentage', + $this->translator->trans('%', [], 'Admin.Global') => 'percentage', ), 'choices_as_values' => true, 'required' => true, )) ->add('sp_reduction_tax', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - 'label' => $this->translator->trans('Reduction tax', [], 'AdminProducts'), + 'label' => $this->translator->trans('Reduction tax', [], 'Admin.Catalog.Feature'), 'choices' => array( - $this->translator->trans('Tax excluded', [], 'AdminProducts') => '0', - $this->translator->trans('Tax included', [], 'AdminProducts') => '1', + $this->translator->trans('Tax excluded', [], 'Admin.Catalog.Feature') => '0', + $this->translator->trans('Tax included', [], 'Admin.Catalog.Feature') => '1', ), 'choices_as_values' => true, 'required' => true, )) ->add('save', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', array( - 'label' => $this->translator->trans('Apply', [], 'AdminProducts'), + 'label' => $this->translator->trans('Apply', [], 'Admin.Actions'), 'attr' => array('class' => 'btn-primary-outline js-save'), )) ->add('cancel', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', array( - 'label' => $this->translator->trans('Cancel', [], 'AdminProducts'), + 'label' => $this->translator->trans('Cancel', [], 'Admin.Actions'), 'attr' => array('class' => 'btn-default-outline js-cancel'), )); diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductVirtual.php b/src/PrestaShopBundle/Form/Admin/Product/ProductVirtual.php index 1537ced65dabc..4f5225c090b2b 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductVirtual.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductVirtual.php @@ -64,8 +64,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('is_virtual_file', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array( - $this->translator->trans('Yes', [], 'AdminProducts') => 1, - $this->translator->trans('No', [], 'AdminProducts') => 0, + $this->translator->trans('Yes', [], 'Admin.Global') => 1, + $this->translator->trans('No', [], 'Admin.Global') => 0, ), 'choices_as_values' => true, 'expanded' => true, @@ -74,38 +74,38 @@ public function buildForm(FormBuilderInterface $builder, array $options) )) ->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType', array( 'required' => false, - 'label' => $this->translator->trans('File', [], 'AdminProducts'), + 'label' => $this->translator->trans('File', [], 'Admin.Global'), 'constraints' => array( new Assert\File(array('maxSize' => $this->configuration->get('PS_ATTACHMENT_MAXIMUM_SIZE').'M')), ) )) ->add('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( - 'label' => $this->translator->trans('Filename', [], 'AdminProducts'), + 'label' => $this->translator->trans('Filename', [], 'Admin.Global'), 'constraints' => array( new Assert\NotBlank(), ), )) ->add('nb_downloadable', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( - 'label' => $this->translator->trans('Number of allowed downloads', [], 'AdminProducts'), + 'label' => $this->translator->trans('Number of allowed downloads', [], 'Admin.Catalog.Feature'), 'required' => false, 'constraints' => array( new Assert\Type(array('type' => 'numeric')), ), )) ->add('expiration_date', 'PrestaShopBundle\Form\Admin\Type\DatePickerType', array( - 'label' => $this->translator->trans('Expiration date', [], 'AdminProducts'), + 'label' => $this->translator->trans('Expiration date', [], 'Admin.Catalog.Feature'), 'required' => false, 'attr' => ['placeholder' => 'YYYY-MM-DD'] )) ->add('nb_days', 'Symfony\Component\Form\Extension\Core\Type\NumberType', array( - 'label' => $this->translator->trans('Number of days', [], 'AdminProducts'), + 'label' => $this->translator->trans('Number of days', [], 'Admin.Catalog.Feature'), 'required' => false, 'constraints' => array( new Assert\Type(array('type' => 'numeric')), ) )) ->add('save', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', array( - 'label' => $this->translator->trans('Save', [], 'AdminProducts'), + 'label' => $this->translator->trans('Save', [], 'Admin.Action'), 'attr' => ['class' => 'btn-primary pull-right'] )); diff --git a/src/PrestaShopBundle/Form/Admin/Product/ProductWarehouseCombination.php b/src/PrestaShopBundle/Form/Admin/Product/ProductWarehouseCombination.php index 007e2de53cc6b..16f6cbda6e347 100644 --- a/src/PrestaShopBundle/Form/Admin/Product/ProductWarehouseCombination.php +++ b/src/PrestaShopBundle/Form/Admin/Product/ProductWarehouseCombination.php @@ -60,14 +60,14 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('activated', 'Symfony\Component\Form\Extension\Core\Type\CheckboxType', array( 'required' => false, - 'label' => $this->translator->trans('Stored', [], 'AdminProducts') + 'label' => $this->translator->trans('Stored', [], 'Admin.Catalog.Feature') )) ->add('id_product_attribute', 'Symfony\Component\Form\Extension\Core\Type\HiddenType') ->add('product_id', 'Symfony\Component\Form\Extension\Core\Type\HiddenType') ->add('warehouse_id', 'Symfony\Component\Form\Extension\Core\Type\HiddenType') ->add('location', 'Symfony\Component\Form\Extension\Core\Type\TextType', array( 'required' => false, - 'label' => $this->translator->trans('Location (optional)', [], 'AdminProducts') + 'label' => $this->translator->trans('Location (optional)', [], 'Admin.Catalog.Feature') )); //set default minimal values for collection prototype diff --git a/src/PrestaShopBundle/Resources/views/Admin/Product/Include/form_shipping.html.twig b/src/PrestaShopBundle/Resources/views/Admin/Product/Include/form_shipping.html.twig index b6b7bd1f9e49e..6f9f71fcbdc32 100644 --- a/src/PrestaShopBundle/Resources/views/Admin/Product/Include/form_shipping.html.twig +++ b/src/PrestaShopBundle/Resources/views/Admin/Product/Include/form_shipping.html.twig @@ -1,8 +1,8 @@ {% set dimension_unit, weight_unit = 'PS_DIMENSION_UNIT'|configuration, 'PS_WEIGHT_UNIT'|configuration %}
-

{{ 'Package dimension'|trans({}, 'Admin.Catalog.Features') }}

-

{{ 'Adjust your shipping costs by filling in the product dimensions.'|trans({}, 'Admin.Catalog.Features') }}

+

{{ 'Package dimension'|trans({}, 'Admin.Catalog.Feature') }}

+

{{ 'Adjust your shipping costs by filling in the product dimensions.'|trans({}, 'Admin.Catalog.Feature') }}

diff --git a/src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig b/src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig index d8484fde51b00..33a4a08c1d729 100644 --- a/src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig +++ b/src/PrestaShopBundle/Resources/views/Admin/Product/form.html.twig @@ -48,7 +48,7 @@ id="product_form_open_quicknav" > list - {{ 'Product list'|trans({}, 'Admin.Catalog.Features') }} + {{ 'Product list'|trans({}, 'Admin.Catalog.Feature') }}