From 50bd3d613d7a3bd5bf793a6d8302bf1dc416db2a Mon Sep 17 00:00:00 2001 From: djfm Date: Thu, 26 Sep 2013 16:29:40 +0000 Subject: [PATCH 1/3] // fix PSCFV-8260, currency format containing spaces and RTL languages --- classes/Tools.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/classes/Tools.php b/classes/Tools.php index 9a68d7685..343eb070b 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -494,6 +494,20 @@ class ToolsCore if (($is_negative = ($price < 0))) $price *= -1; $price = Tools::ps_round($price, $c_decimals); + + /* + * If the language is RTL and the selected currency format contains spaces as thousands separator + * then the number will be printed in reverse since the space is interpreted as separating words. + * To avoid this we replace the currency format containing a space with the one containing a comma (,) as thousand + * separator when the language is RTL. + * + * TODO: This is not ideal, a currency format should probably be tied to a language, not to a currency. + */ + if(($c_format == 2) && ($context->language->is_rtl == 1)) + { + $c_format = 4; + } + switch ($c_format) { /* X 0,000.00 */ From 66435cbf4a4ec76557fe6da8caf52c1552b6a82c Mon Sep 17 00:00:00 2001 From: djfm Date: Fri, 27 Sep 2013 08:35:48 +0000 Subject: [PATCH 2/3] // grammar --- .../default/template/controllers/groups/helpers/view/view.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl index e2503c9a6..96908c212 100755 --- a/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl @@ -58,7 +58,7 @@

{l s='Members of this customer group'}

-

{l s='Limited to the 100th first customers.'} {l s='Please use filters to narrow your search.'}

+

{l s='Limited to the first 100 customers.'} {l s='Please use filters to narrow your search.'}

{$customerList} -{/block} \ No newline at end of file +{/block} From 1cce312aaacd4f509ae04f40dc6a9d3c7ffb4bd7 Mon Sep 17 00:00:00 2001 From: djfm Date: Mon, 30 Sep 2013 16:15:53 +0000 Subject: [PATCH 3/3] // orthograph --- admin-dev/themes/default/template/controllers/orders/form.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index e8de6bf14..e0a57766d 100755 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -984,7 +984,7 @@
-

{l s='Search a customer by tapping the first letters of his/her name'}

+

{l s='Search a customer by typing the first letters of his/her name'}

{l s='Add new customer'} @@ -999,7 +999,7 @@
-

{l s='Search a product by tapping the first letters of his/her name.'}

+

{l s='Search a product by typing the first letters of his/her name.'}