From 9886e6503f9f911a7e22e143a78c5ec0a511da0b Mon Sep 17 00:00:00 2001 From: Axel DENEU Date: Sat, 11 May 2019 17:29:07 +0200 Subject: [PATCH] Solving non numerical value error and adding french translations --- src/QueryBuilder/HasPriceBetweenQueryBuilder.php | 2 +- src/Resources/translations/messages.fr.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/Resources/translations/messages.fr.yml diff --git a/src/QueryBuilder/HasPriceBetweenQueryBuilder.php b/src/QueryBuilder/HasPriceBetweenQueryBuilder.php index ac048ca0..fad8a8c9 100644 --- a/src/QueryBuilder/HasPriceBetweenQueryBuilder.php +++ b/src/QueryBuilder/HasPriceBetweenQueryBuilder.php @@ -89,6 +89,6 @@ private function resolveBasePrice(string $price): int private function convertFromString(string $price): int { - return (int) round($price * 100, 2); + return (int) round((int) $price * 100, 2); } } diff --git a/src/Resources/translations/messages.fr.yml b/src/Resources/translations/messages.fr.yml new file mode 100644 index 00000000..7bbc2b90 --- /dev/null +++ b/src/Resources/translations/messages.fr.yml @@ -0,0 +1,13 @@ +bitbag_sylius_elasticsearch_plugin: + ui: + min_price: Prix min + max_price: Prix max + filter_results: Filtrer les résultats + filter: Filtrer + sort: Trier par + bestsellers: Meilleures ventes + newest: Plus récent en premier + oldest: Plus ancien en primier + most_expensive: Plus cher en premier + cheapest: Moins cher en primier + per_page: Nombre de résultats