[-] FO : #PSCFV-2150 : Translations of modules are connected width sprintf()
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15304 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -166,9 +166,9 @@ class ReferralProgram extends Module
|
||||
$this->_errors[] = $this->displayError($this->l('Discount value is invalid.'));
|
||||
foreach (Tools::getValue('discount_value') AS $id_currency => $discount_value)
|
||||
if ($discount_value == '')
|
||||
$this->_errors[] = $this->displayError($this->l('Discount value for the currency #').$id_currency.$this->l(' is empty.'));
|
||||
$this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is empty.'), $id_currency));
|
||||
elseif (!Validate::isUnsignedFloat($discount_value))
|
||||
$this->_errors[] = $this->displayError($this->l('Discount value for the currency #').$id_currency.$this->l(' is invalid.'));
|
||||
$this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is invalid.'), $id_currency));
|
||||
if (!(int)(Tools::getValue('discount_type')) OR Tools::getValue('discount_type') < 1 OR Tools::getValue('discount_type') > 2)
|
||||
$this->_errors[] = $this->displayError($this->l('Discount type is required/invalid.'));
|
||||
if (!(int)(Tools::getValue('nb_friends')) OR Tools::getValue('nb_friends') < 0)
|
||||
@@ -370,11 +370,11 @@ class ReferralProgram extends Module
|
||||
if (!Validate::isLoadedObject($cartRule))
|
||||
return false;
|
||||
|
||||
if ($cartRule->checkValidity($this->context) === false)
|
||||
{
|
||||
//if ($cartRule->checkValidity($this->context) === false)
|
||||
//{
|
||||
$this->smarty->assign(array('discount_display' => ReferralProgram::displayDiscount($cartRule->reduction_percent ? $cartRule->reduction_percent : $cartRule->reduction_amount, $cartRule->reduction_percent ? 1 : 2, new Currency($params['cookie']->id_currency)), 'discount' => $cartRule));
|
||||
return $this->display(__FILE__, 'shopping-cart.tpl');
|
||||
}
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ class ReferralProgram extends Module
|
||||
</table>';
|
||||
}
|
||||
else
|
||||
$html.= $customer->firstname.' '.$customer->lastname.' '.$this->l('has not sponsored any friends yet.');
|
||||
$html.= sprintf($this->l('%1$s %2$s has not sponsored any friends yet.'), $customer->firstname, $customer->lastname);
|
||||
return $html.'<br/><br/>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user