From f854c63398d31d23bbadce33bf8922e40f2f3de1 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Mon, 15 Apr 2024 11:02:22 +0200 Subject: [PATCH] Add `reserveWithMaterialType` --- src/apps/material/material.dev.tsx | 5 +++++ src/apps/material/material.entry.tsx | 1 + .../material-buttons/physical/MaterialButtonPhysical.tsx | 4 +++- .../physical/MaterialButtonReservableFromAnotherLibrary.tsx | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/apps/material/material.dev.tsx b/src/apps/material/material.dev.tsx index 6064947617..c5c3afec8a 100644 --- a/src/apps/material/material.dev.tsx +++ b/src/apps/material/material.dev.tsx @@ -84,6 +84,11 @@ export default { defaultValue: "Reserve", control: { type: "text" } }, + reserveWithMaterialTypeText: { + name: "Reserve", + defaultValue: "Reserve @materialType", + control: { type: "text" } + }, reservableFromAnotherLibraryText: { name: "Reservable on another library", defaultValue: "Ordered from another library.", diff --git a/src/apps/material/material.entry.tsx b/src/apps/material/material.entry.tsx index 91a5817f70..0d9c9c136a 100644 --- a/src/apps/material/material.entry.tsx +++ b/src/apps/material/material.entry.tsx @@ -153,6 +153,7 @@ interface MaterialEntryTextProps { reservationSuccesTitleText: string; reserveBookText: string; reserveText: string; + reserveWithMaterialTypeText: string; reviewsText: string; saveButtonText: string; seeOnlineText: string; diff --git a/src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx b/src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx index d655f673cc..985d5ec739 100644 --- a/src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx +++ b/src/components/material/material-buttons/physical/MaterialButtonPhysical.tsx @@ -39,7 +39,9 @@ const MaterialButtonPhysical: FC = ({ label={ size === "small" ? t("reserveText") - : `${t("reserveText")} ${manifestationMaterialType}` + : `${t("reserveWithMaterialTypeText", { + placeholders: { "@materialType": manifestationMaterialType } + })}` } buttonType="none" variant="filled" diff --git a/src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx b/src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx index 7d6174474f..6c978fba86 100644 --- a/src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx +++ b/src/components/material/material-buttons/physical/MaterialButtonReservableFromAnotherLibrary.tsx @@ -41,7 +41,9 @@ const MaterialButtonReservableFromAnotherLibrary: FC< label={ size === "small" ? t("reserveText") - : `${t("reserveText")} ${manifestationMaterialType}` + : `${t("reserveWithMaterialTypeText", { + placeholders: { "@materialType": manifestationMaterialType } + })}` } buttonType="none" variant="filled"