Add Translator on all controllers & forms text strings
This commit is contained in:
@@ -226,4 +226,6 @@ return array(
|
||||
'Tax list is not valid JSON' => 'Tax list is not valid JSON',
|
||||
'Bad tax list JSON' => 'Bad tax list JSON',
|
||||
'Tax ID not found in tax list JSON' => 'Tax ID not found in tax list JSON',
|
||||
'Please check your input: %s' => 'Please check your input: %s',
|
||||
'Sorry, an error occured: %s' => 'Sorry, an error occured: %s',
|
||||
);
|
||||
|
||||
@@ -225,4 +225,6 @@ return array(
|
||||
'Tax list is not valid JSON' => 'Le JSON de la liste des taxes n\'est pas valide',
|
||||
'Bad tax list JSON' => 'Mauvais JSON de la liste des taxes',
|
||||
'Tax ID not found in tax list JSON' => 'ID de la taxe non trouvé dans le JSON de la liste des taxes',
|
||||
'Please check your input: %s' => 'Veuillez vérifier votre saisie: %s',
|
||||
'Sorry, an error occured: %s' => 'Désolé, une erreur est survenue: %s',
|
||||
);
|
||||
|
||||
@@ -109,7 +109,7 @@ class CartAdd extends BaseForm
|
||||
$product = ProductQuery::create()->findPk($value);
|
||||
|
||||
if (is_null($product) || $product->getVisible() == 0) {
|
||||
throw new ProductNotFoundException(Translator::getInstance()->trans(sprintf("this product id does not exists : %d", $value)));
|
||||
throw new ProductNotFoundException(sprintf(Translator::getInstance()->trans("this product id does not exists : %d"), $value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class CartAdd extends BaseForm
|
||||
->count();
|
||||
|
||||
if ($productSaleElements == 0) {
|
||||
throw new StockNotFoundException(Translator::getInstance()->trans(sprintf("This product_sale_elements_id does not exists for this product : %d", $value)));
|
||||
throw new StockNotFoundException(sprintf(Translator::getInstance()->trans("This product_sale_elements_id does not exists for this product : %d"), $value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class OrderDelivery extends BaseForm
|
||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
||||
if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
|
||||
$context->addViolation(
|
||||
Translator::getInstance()->trans(sprintf("delivery module %s is not a Thelia\Module\DeliveryModuleInterface", $module->getCode()))
|
||||
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ class OrderPayment extends BaseForm
|
||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
||||
if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
|
||||
$context->addViolation(
|
||||
Translator::getInstance()->trans(sprintf("delivery module %s is not a Thelia\Module\PaymentModuleInterface", $module->getCode()))
|
||||
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user