Skip to content

Commit 40e00b8

Browse files
committed
fix: update translations for error messages in English and Italian
1 parent 41dcea9 commit 40e00b8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@
10631063
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "Test link",
10641064
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "https://example.com",
10651065
"__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "This item has some errors",
1066+
"__PLAN_PAGE_PURCHASE_SUCCESS": "Purchase successfully completed",
10661067
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "Cancel",
10671068
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "Save template",
10681069
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONTINUE_SETUP": "Continue setup",

src/locales/it/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@
10931093
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_LABEL": "",
10941094
"__PLAN_PAGE_MODULE_TOUCHPOINTS_TOUCHPOINT_WEB_LINK_PLACEHOLDER": "",
10951095
"__PLAN_PAGE_NAV_GENERIC_MODULE_ERROR": "",
1096+
"__PLAN_PAGE_PURCHASE_SUCCESS": "",
10961097
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CANCEL": "",
10971098
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONFIRM": "",
10981099
"__PLAN_PAGE_SAVE_AS_TEMPLATE_MODAL_BUTTON_CONTINUE_SETUP": "",

src/pages/Plan/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { useToast, Notification } from '@appquality/unguess-design-system';
12
import { useEffect, useState } from 'react';
23
import { useTranslation } from 'react-i18next';
34
import {
@@ -28,6 +29,7 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
2829
const { t } = useTranslation();
2930
const { activeTab, setActiveTab } = usePlanContext();
3031
const [search] = useSearchParams();
32+
const { addToast } = useToast();
3133

3234
useEffect(() => {
3335
if (!plan) return;
@@ -39,7 +41,17 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
3941

4042
useEffect(() => {
4143
if (search && search.get('payment') === 'success') {
42-
alert('Urrà');
44+
addToast(
45+
({ close }) => (
46+
<Notification
47+
onClose={close}
48+
type="success"
49+
message={t('__PLAN_PAGE_PURCHASE_SUCCESS')}
50+
isPrimary
51+
/>
52+
),
53+
{ placement: 'top' }
54+
);
4355
}
4456

4557
const url = window.location.origin + window.location.pathname;

0 commit comments

Comments
 (0)