From d6db8c23ce3c73cba430e5cf083ddb10634fdc53 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:40:29 +0000 Subject: [PATCH 1/2] fixed broken translate string --- frontend/components/Domain/Recipe/RecipeLastMade.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/Domain/Recipe/RecipeLastMade.vue b/frontend/components/Domain/Recipe/RecipeLastMade.vue index 6a9e5393c9e1..abfac00a6c37 100644 --- a/frontend/components/Domain/Recipe/RecipeLastMade.vue +++ b/frontend/components/Domain/Recipe/RecipeLastMade.vue @@ -133,7 +133,7 @@ export default defineComponent({ const domMadeThisForm = ref(); const newTimelineEvent = ref({ // @ts-expect-error - TS doesn't like the $auth global user attribute - subject: i18n.tc("recipe.user-made-this", { user: $auth.user.fullName }), + subject: i18n.t("recipe.user-made-this", { user: $auth.user.fullName }), eventType: "comment", eventMessage: "", timestamp: undefined, From ae74e0d71c0c741107a3c7748fa72c2998b8c9bf Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sun, 3 Mar 2024 22:41:25 +0000 Subject: [PATCH 2/2] moved subject calculation --- frontend/components/Domain/Recipe/RecipeLastMade.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipeLastMade.vue b/frontend/components/Domain/Recipe/RecipeLastMade.vue index abfac00a6c37..49323407c72d 100644 --- a/frontend/components/Domain/Recipe/RecipeLastMade.vue +++ b/frontend/components/Domain/Recipe/RecipeLastMade.vue @@ -132,8 +132,7 @@ export default defineComponent({ const { $auth, i18n } = useContext(); const domMadeThisForm = ref(); const newTimelineEvent = ref({ - // @ts-expect-error - TS doesn't like the $auth global user attribute - subject: i18n.t("recipe.user-made-this", { user: $auth.user.fullName }), + subject: "", eventType: "comment", eventMessage: "", timestamp: undefined, @@ -178,6 +177,8 @@ export default defineComponent({ } newTimelineEvent.value.recipeId = props.recipe.id + // @ts-expect-error - TS doesn't like the $auth global user attribute + newTimelineEvent.value.subject = i18n.t("recipe.user-made-this", { user: $auth.user.fullName }) // the user only selects the date, so we set the time to end of day local time // we choose the end of day so it always comes after "new recipe" events