From 1ad0360e42a42a7fae65846a1563c08376af2df9 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sun, 11 Jul 2021 10:55:29 +0200 Subject: [PATCH] Fixed untranslated string --- localization/strings.pot | 4 ++++ public/viewjs/components/productcard.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/localization/strings.pot b/localization/strings.pot index 30897797..cc8ae0c6 100644 --- a/localization/strings.pot +++ b/localization/strings.pot @@ -2150,3 +2150,7 @@ msgstr "" msgid "Product description" msgstr "" + +# Example: *3.21 USD* per *Pack* +msgid "%1$s per %2$s" +msgstr "" diff --git a/public/viewjs/components/productcard.js b/public/viewjs/components/productcard.js index f9bf3215..a6402804 100644 --- a/public/viewjs/components/productcard.js +++ b/public/viewjs/components/productcard.js @@ -84,7 +84,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) if (productDetails.last_price !== null) { - $('#productcard-product-last-price').text(Number.parseFloat(productDetails.last_price).toLocaleString() + ' ' + Grocy.Currency + ' per ' + productDetails.quantity_unit_stock.name); + $('#productcard-product-last-price').text(__t("%1$s per %2$s", Number.parseFloat(productDetails.last_price).toLocaleString() + ' ' + Grocy.Currency, productDetails.quantity_unit_stock.name)); } else { @@ -93,7 +93,7 @@ Grocy.Components.ProductCard.Refresh = function(productId) if (productDetails.avg_price !== null) { - $('#productcard-product-average-price').text(Number.parseFloat(productDetails.avg_price).toLocaleString() + ' ' + Grocy.Currency + ' per ' + productDetails.quantity_unit_stock.name); + $('#productcard-product-average-price').text(__t("%1$s per %2$s", Number.parseFloat(productDetails.avg_price).toLocaleString() + ' ' + Grocy.Currency, productDetails.quantity_unit_stock.name)); } else {