[-] FO : #PSCFV-2151 : Translations of errors are connected width sprintf()

This commit is contained in:
lLefevre
2012-05-14 11:45:41 +00:00
parent 97a37ff566
commit 83703dc4ee
21 changed files with 830 additions and 761 deletions
+1 -1
View File
@@ -228,7 +228,7 @@ class CartControllerCore extends FrontController
{
// If product has attribute, minimal quantity is set with minimal quantity of attribute
$minimal_quantity = ($this->id_product_attribute) ? Attribute::getAttributeMinimalQty($this->id_product_attribute) : $product->minimal_quantity;
$this->errors[] = Tools::displayError('You must add', false).' '.$minimal_quantity.' '.Tools::displayError('Minimum quantity', false);
$this->errors[] = sprintf(Tools::displayError('You must add %d minimum quantity', false), $minimal_quantity);
}
elseif (!$updateQuantity)
$this->errors[] = Tools::displayError('You already have the maximum quantity available for this product.', false);
+4 -2
View File
@@ -58,8 +58,10 @@ class OrderControllerCore extends ParentOrderController
if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimal_purchase && $this->step != -1)
{
$this->step = 0;
$this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimal_purchase, $currency).
' '.Tools::displayError('is required in order to validate your order.');
$this->errors[] = sprintf(
Tools::displayError('A minimum purchase total of %d is required in order to validate your order.'),
Tools::displayPrice($minimal_purchase, $currency)
);
}
if (!$this->context->customer->isLogged(true) && in_array($this->step, array(1, 2, 3)))
+4 -2
View File
@@ -436,8 +436,10 @@ class OrderOpcControllerCore extends ParentOrderController
$minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency);
if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase)
return '<p class="warning">'.Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency).
' '.Tools::displayError('is required in order to validate your order.').'</p>';
return '<p class="warning">'.sprintf(
Tools::displayError('A minimum purchase total of %d is required in order to validate your order.'),
Tools::displayPrice($minimalPurchase, $currency)
).'</p>';
/* Bypass payment step if total is 0 */
if ($this->context->cart->getOrderTotal() <= 0)
+4 -1
View File
@@ -48,7 +48,10 @@ class PasswordControllerCore extends FrontController
else
{
if ((strtotime($customer->last_passwd_gen.'+'.(int)($min_time = Configuration::get('PS_PASSWD_TIME_FRONT')).' minutes') - time()) > 0)
$this->errors[] = Tools::displayError('You can regenerate your password only every').' '.(int)($min_time).' '.Tools::displayError('minute(s)');
$this->errors[] = sprintf(
Tools::displayError('You can regenerate your password only every %d minute(s)'),
(int)$min_time
);
else
{
if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'),