From 7b0e98827e22b39d10395709504a4a31c3c81b9a Mon Sep 17 00:00:00 2001 From: TomW1605 Date: Sat, 31 Aug 2024 08:16:02 +0800 Subject: [PATCH] add double {{}} explanation to help text and example --- client/public/locales/en/common.json | 2 +- client/src/pages/printing/spoolQrCodePrintingDialog.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/public/locales/en/common.json b/client/public/locales/en/common.json index f5873796..e0959254 100644 --- a/client/public/locales/en/common.json +++ b/client/public/locales/en/common.json @@ -106,7 +106,7 @@ "button": "Print Labels", "title": "Label Printing", "template": "Label Template", - "templateHelp": "Use {} to insert values of the spool object as text. For example {id} will be replaced with the spool id, or {filament.material} will be replaced with the material of the spool. Enclose text with double asterix ** to make it bold. Click the button to view a list of all available tags.", + "templateHelp": "Use {} to insert values of the spool object as text. For example, {id} will be replaced with the spool id, or {filament.material} will be replaced with the material of the spool. if a value is missing it will be replaced with \"?\". A second set of {} can be used to remove this. In addition, any text between the sets of {} will be removed if the value is missing. For example, {Lot Nr: {lot_nr}} will only show the label if the spool has a lot number. Enclose text with double asterix ** to make it bold. Click the button to view a list of all available tags.", "textSize": "Label Text Size", "showContent": "Print Label", "showQRCode": "Print QR Code", diff --git a/client/src/pages/printing/spoolQrCodePrintingDialog.tsx b/client/src/pages/printing/spoolQrCodePrintingDialog.tsx index f3e4e655..07784ba1 100644 --- a/client/src/pages/printing/spoolQrCodePrintingDialog.tsx +++ b/client/src/pages/printing/spoolQrCodePrintingDialog.tsx @@ -150,10 +150,10 @@ const SpoolQRCodePrintingDialog: React.FC = ({ spoolI `**{filament.vendor.name} - {filament.name} #{id} - {filament.material}** Spool Weight: {filament.spool_weight} g -ET: {filament.settings_extruder_temp} °C -BT: {filament.settings_bed_temp} °C -Lot Nr: {lot_nr} -{comment} +{ET: {filament.settings_extruder_temp} °C} +{BT: {filament.settings_bed_temp} °C} +{Lot Nr: {lot_nr}} +{{comment}} {filament.comment} {filament.vendor.comment}`;