gaiterjones / magento-buy-x-get-y-free

Magento Buy X Get Y Free Module
43 stars 21 forks source link

feature: improve translations when using variables #7

Closed m-overlund closed 9 years ago

m-overlund commented 9 years ago

Would like to suggest a change in the translations in Cartcontroller.php. Instead of splitting up the translations when using variables, like this:

$this->__('Your'). ' '. $productYDesc. ' '. $this->__('has been removed from your cart.')

It would be a lot easier to translate by inserting the variables into the sentences, like this:

$this->__('Your %s has been removed from your cart.', $productYDesc)

Same goes for the translations in csv files:

"Your","Your"
"has been removed from your cart.","has been removed from your cart."

Could be a single line instead:

"Your %s has been removed from your cart.","Your %s has been removed from your cart."
gaiterjones commented 9 years ago

Yes I was a bit lazy here, I will also update the translation strings as you have suggested.

m-overlund commented 9 years ago

Great, thank you :-)