@vtex/faststore-plugin-buyer-portal 2.0.13 → 2.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/cms/b2b/components/.gitkeep +0 -0
  3. package/cms/b2b/pages/cms_content_type__i18n.jsonc +36 -0
  4. package/cypress/integration/localization.test.ts +482 -0
  5. package/cypress/support/commands.ts +8 -0
  6. package/docs/i18n/i18n-messages-format.md +391 -0
  7. package/docs/i18n/locales.json +701 -0
  8. package/docs/i18n/migration-inventory.md +959 -0
  9. package/package.json +3 -3
  10. package/specs/custom-localization-system.md +711 -0
  11. package/specs/multi-locale-e2e-validation.md +277 -0
  12. package/src/__mocks__/discovery.config.ts +12 -0
  13. package/src/features/accounting-fields/components/AccountingConfirmDelete/AccountingConfirmDelete.tsx +14 -4
  14. package/src/features/accounting-fields/components/AccountingFieldConfirmEdit/AccountingFieldConfirmEdit.tsx +11 -6
  15. package/src/features/accounting-fields/components/AccountingFieldDropdown/AccountingFieldDropdown.tsx +5 -3
  16. package/src/features/accounting-fields/components/AccountingFieldForm/AccountingFieldForm.tsx +33 -23
  17. package/src/features/accounting-fields/components/AccountingValueConfirmEdit/AccountingValueConfirmEdit.tsx +10 -6
  18. package/src/features/accounting-fields/components/AccountingValueDropdown/AccountingValueDropdown.tsx +19 -9
  19. package/src/features/accounting-fields/components/AccountingValueForm/AccountingValueForm.tsx +21 -10
  20. package/src/features/accounting-fields/components/CreateAccountingFieldDrawer/CreateAccountingFieldDrawer.tsx +11 -8
  21. package/src/features/accounting-fields/components/CreateAccountingValueDrawer/CreateAccountingValueDrawer.tsx +18 -7
  22. package/src/features/accounting-fields/components/DeleteAccountingFieldDrawer/DeleteAccountingFieldDrawer.tsx +14 -12
  23. package/src/features/accounting-fields/components/DeleteAccountingValueDrawer/DeleteAccountingValueDrawer.tsx +20 -10
  24. package/src/features/accounting-fields/components/EditAccountingFieldDrawer/EditAccountingFieldDrawer.tsx +5 -3
  25. package/src/features/accounting-fields/components/EditAccountingValueDrawer/EditAccountingValueDrawer.tsx +13 -6
  26. package/src/features/accounting-fields/components/RemoveValueFromUnitDrawer/RemoveValueFromUnitDrawer.tsx +19 -8
  27. package/src/features/accounting-fields/layouts/AccountingFieldLayout/AccountingFieldLayout.tsx +11 -9
  28. package/src/features/addresses/components/AddRecipientsDrawer/AddRecipientsDrawer.tsx +13 -7
  29. package/src/features/addresses/components/AddressDropdownMenu/AddressDropdownMenu.tsx +22 -20
  30. package/src/features/addresses/components/AddressForm/AddressForm.tsx +33 -22
  31. package/src/features/addresses/components/AddressLine/AddressLine.tsx +29 -25
  32. package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +15 -6
  33. package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +9 -4
  34. package/src/features/addresses/components/AddressesCard/AddressesCard.tsx +8 -5
  35. package/src/features/addresses/components/CreateAddressDrawer/CreateAddressDrawer.tsx +27 -14
  36. package/src/features/addresses/components/CreateAddressSettingsDrawer/CreateAddressSettingsDrawer.tsx +26 -21
  37. package/src/features/addresses/components/DeleteAddressDrawer/DeleteAddressDrawer.tsx +20 -16
  38. package/src/features/addresses/components/DeleteAddressLocationDrawer/DeleteAddressLocationDrawer.tsx +26 -14
  39. package/src/features/addresses/components/DeleteRecipientAddressDrawer/DeleteRecipientAddressDrawer.tsx +20 -17
  40. package/src/features/addresses/components/EditAddressDrawer/EditAddressDrawer.tsx +12 -6
  41. package/src/features/addresses/components/EditAddressLocationDrawer/EditAddressLocationDrawer.tsx +24 -17
  42. package/src/features/addresses/components/EditRecipientAddressDrawer/EditRecipientAddressDrawer.tsx +17 -15
  43. package/src/features/addresses/components/LocationForm/LocationField/LocationField.tsx +8 -5
  44. package/src/features/addresses/components/LocationForm/LocationForm.tsx +9 -3
  45. package/src/features/addresses/components/LocationsDrawer/LocationsDrawer.tsx +15 -9
  46. package/src/features/addresses/components/RecipientsForm/RecipientItem/RecipientItem.tsx +55 -46
  47. package/src/features/addresses/components/RecipientsForm/RecipientsForm.tsx +4 -1
  48. package/src/features/addresses/components/RemoveAddressDrawer/RemoveAddressDrawer.tsx +21 -14
  49. package/src/features/addresses/layouts/AddressDetailsLayout/AddressDetailsLayout.tsx +16 -9
  50. package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +11 -8
  51. package/src/features/b2b-agent/layouts/B2BAgentLayout/B2BAgentLayout.tsx +3 -1
  52. package/src/features/budgets/components/BudgetAddForm/BudgetAddForm.tsx +14 -12
  53. package/src/features/budgets/components/BudgetAddSuccess/BudgetAddSuccess.tsx +16 -14
  54. package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +8 -5
  55. package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +9 -6
  56. package/src/features/budgets/components/BudgetDeleteDrawer/BudgetDeleteDrawer.tsx +23 -17
  57. package/src/features/budgets/components/BudgetEditNotificationDrawer/BudgetEditNotificationDrawer.tsx +13 -6
  58. package/src/features/budgets/components/BudgetNotificationForm/BudgetNotificationForm.tsx +31 -24
  59. package/src/features/budgets/components/BudgetNotificationsInfo/BudgetNotificationsInfo.tsx +15 -9
  60. package/src/features/budgets/components/BudgetRemainingBalance/BudgetRemainingBalance.tsx +6 -2
  61. package/src/features/budgets/components/BudgetSettingsInfo/BudgetSettingsInfo.tsx +27 -10
  62. package/src/features/budgets/components/BudgetUsersTable/BudgetUsersTable.tsx +14 -7
  63. package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +11 -8
  64. package/src/features/budgets/components/CreateBudgetAllocationDrawer/CreateBudgetAllocationDrawer.tsx +8 -5
  65. package/src/features/budgets/components/CreateBudgetDrawer/CreateBudgetDrawer.tsx +31 -18
  66. package/src/features/budgets/components/DeleteBudgetAllocationDrawer/DeleteBudgetAllocationDrawer.tsx +17 -12
  67. package/src/features/budgets/components/EditBudgetDrawer/EditBudgetDrawer.tsx +14 -8
  68. package/src/features/budgets/components/EmptyState.tsx/EmptyState.tsx +4 -1
  69. package/src/features/budgets/layouts/BudgetsDetailsLayout/BudgetsDetailsLayout.tsx +7 -5
  70. package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +5 -3
  71. package/src/features/budgets/messages/budgetNotifications.ts +5 -5
  72. package/src/features/budgets/utils/handleBudgetError.tsx +5 -8
  73. package/src/features/budgets/utils/handleBudgetError.types.ts +3 -0
  74. package/src/features/buying-policies/components/AccountingFieldCriteriaSelector/AccountingFieldCriteriaSelector.tsx +5 -3
  75. package/src/features/buying-policies/components/AccountingFieldCriteriaSelector/AccountingValueCriteriaSelector.tsx +20 -9
  76. package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx +8 -5
  77. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/BasicBuyingPolicyDrawer.tsx +49 -33
  78. package/src/features/buying-policies/components/BudgetCriteriaSelector/BudgetCriteriaSelector.tsx +8 -2
  79. package/src/features/buying-policies/components/BuyingPolicyDropdownMenu/BuyingPolicyDropdownMenu.tsx +5 -3
  80. package/src/features/buying-policies/components/DeleteBuyingPolicyDrawer/DeleteBuyingPolicyDrawer.tsx +28 -24
  81. package/src/features/buying-policies/components/UpdateBuyingPolicyDrawer/UpdateBuyingPolicyDrawer.tsx +10 -7
  82. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +11 -4
  83. package/src/features/buying-policies/layouts/BuyingPolicyDetailsLayout/BuyingPolicyDetailsLayout.tsx +26 -9
  84. package/src/features/buying-policies/utils/accountingFieldCriteriaHelpers.ts +2 -2
  85. package/src/features/buying-policies/utils/buyingPoliciesWorkflowTypes.ts +3 -3
  86. package/src/features/buying-policies/utils/orderFieldsCriteriaOptions.ts +8 -8
  87. package/src/features/buying-policies/utils/spendingLimitsCriteriaOptions.ts +6 -6
  88. package/src/features/contracts/components/ContractsCard/ContractsCard.tsx +7 -5
  89. package/src/features/contracts/layouts/ContractsLayout/ContractsLayout.tsx +9 -4
  90. package/src/features/credit-cards/components/CreateCreditCardDrawer/CreateCreditCardDrawer.tsx +17 -11
  91. package/src/features/credit-cards/components/CreditCardDropdownMenu/CreditCardDropdownMenu.tsx +17 -11
  92. package/src/features/credit-cards/components/CreditCardForm/CreditCardForm.tsx +8 -5
  93. package/src/features/credit-cards/components/CreditCardSettingsDrawer/CreditCardSettingsDrawer.tsx +10 -8
  94. package/src/features/credit-cards/components/DeleteCreditCardDrawer/DeleteCreditCardDrawer.tsx +19 -14
  95. package/src/features/credit-cards/components/EditCreditCardDrawer/EditCreditCardDrawer.tsx +14 -13
  96. package/src/features/credit-cards/components/RemoveCreditCardDrawer/RemoveCreditCardDrawer.tsx +18 -15
  97. package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +10 -4
  98. package/src/features/order-entry/layouts/OrderEntryLayout.tsx +3 -1
  99. package/src/features/org-units/components/AddAllToOrgUnitDropdown/AddAllToOrgUnitDropdown.tsx +11 -9
  100. package/src/features/org-units/components/AuthSetupDrawer/AuthSetupDrawer.tsx +28 -16
  101. package/src/features/org-units/components/CreateOrgUnitDrawer/CreateOrgUnitDrawer.tsx +18 -12
  102. package/src/features/org-units/components/DeleteOrgUnitDrawer/DeleteOrgUnitDrawer.tsx +28 -29
  103. package/src/features/org-units/components/OrgUnitBreadcrumb/OrgUnitBreadcrumbLink.tsx +4 -4
  104. package/src/features/org-units/components/OrgUnitDetailsDropdownMenu/OrgUnitDetailsDropdownMenu.tsx +4 -2
  105. package/src/features/org-units/components/OrgUnitDetailsNavbar/OrgUnitDetailsNavbar.tsx +23 -5
  106. package/src/features/org-units/components/OrgUnitDetailsNavbar/org-unit-details-navbar.scss +18 -2
  107. package/src/features/org-units/components/OrgUnitsDropdownMenu/OrgUnitsDropdownMenu.tsx +6 -4
  108. package/src/features/org-units/components/OrgUnitsHierarchyTree/OrgUnitsHierarchyTree.tsx +9 -6
  109. package/src/features/org-units/components/OrganizationalUnitsCard/OrganizationalUnitsCard.tsx +15 -7
  110. package/src/features/org-units/components/UpdateOrgUnitDrawer/UpdateOrgUnitDrawer.tsx +15 -9
  111. package/src/features/org-units/layouts/OrgUnitDetailsLayout/OrgUnitDetailsLayout.tsx +27 -26
  112. package/src/features/org-units/layouts/OrgUnitsLayout/OrgUnitsLayout.tsx +8 -3
  113. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +29 -18
  114. package/src/features/payment-methods/components/PaymentMethodSettingsDrawer/PaymentMethodSettingsDrawer.tsx +13 -9
  115. package/src/features/payment-methods/components/RemoveMethodButton/RemoveMethodButton.tsx +5 -2
  116. package/src/features/payment-methods/components/RemovePaymentMethodsDrawer/RemovePaymentMethodsDrawer.tsx +10 -7
  117. package/src/features/payment-methods/hooks/useRemovePaymentMethodSubmit.ts +6 -4
  118. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +21 -15
  119. package/src/features/product-assortment/components/ProductAssortmentTable/ProductAssortmentTable.tsx +11 -7
  120. package/src/features/product-assortment/layouts/ProductAssortmentLayout/ProductAssortmentLayout.tsx +9 -6
  121. package/src/features/profile/components/ProfileCard/ProfileCard.tsx +8 -5
  122. package/src/features/profile/components/ProfileSummary/ProfileSummary.tsx +13 -6
  123. package/src/features/profile/layouts/ProfileLayout/ProfileLayout.tsx +16 -6
  124. package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +4 -2
  125. package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +5 -3
  126. package/src/features/shared/components/BasicCard/BasicCard.tsx +6 -4
  127. package/src/features/shared/components/BasicCard/BasicCardLine.tsx +5 -4
  128. package/src/features/shared/components/CustomerSwitch/CustomerSwitchDrawer.tsx +10 -2
  129. package/src/features/shared/components/CustomerSwitch/CustomerSwitchSearch.tsx +4 -1
  130. package/src/features/shared/components/DropdownFilter/DropdownFilter.tsx +11 -7
  131. package/src/features/shared/components/Error/Error.tsx +13 -6
  132. package/src/features/shared/components/HeaderInside/HeaderInside.tsx +5 -2
  133. package/src/features/shared/components/InternalSearch/InternalSearch.tsx +4 -1
  134. package/src/features/shared/components/InternalTopbar/InternalTopbar.tsx +7 -5
  135. package/src/features/shared/components/MainLinksDropdownMenu/MainLinksDropdownMenu.tsx +23 -8
  136. package/src/features/shared/components/OrgUnitInputSearch/OrgUnitInputSearch.tsx +7 -2
  137. package/src/features/shared/components/Pagination/Pagination.tsx +6 -2
  138. package/src/features/shared/components/Paginator/Counter.tsx +11 -5
  139. package/src/features/shared/components/Paginator/Interval.tsx +4 -3
  140. package/src/features/shared/components/Paginator/NextPageButton.tsx +6 -2
  141. package/src/features/shared/components/SettingsDrawer/SettingsDrawer.tsx +6 -4
  142. package/src/features/shared/components/SettingsDrawer/SettingsDrawerListType.tsx +11 -10
  143. package/src/features/shared/components/SettingsDrawer/listTypeOptions.ts +10 -7
  144. package/src/features/shared/components/SortFilter/SortFilter.tsx +15 -8
  145. package/src/features/shared/components/Table/TableRow/TableRow.tsx +5 -1
  146. package/src/features/shared/components/VerticalNav/VerticalNavLink.tsx +7 -3
  147. package/src/features/shared/layouts/BaseTabsLayout/Navbar.tsx +28 -4
  148. package/src/features/shared/layouts/BaseTabsLayout/about-drawer/AboutDrawer.tsx +15 -5
  149. package/src/features/shared/layouts/BaseTabsLayout/base-tabs-layout.scss +24 -9
  150. package/src/features/shared/layouts/BaseTabsLayout/sidebar-drawer/SidebarDrawer.tsx +5 -2
  151. package/src/features/shared/layouts/ContractTabsLayout/ContractTabsLayout.tsx +10 -5
  152. package/src/features/shared/layouts/ErrorTabsLayout/ErrorTabsLayout.tsx +7 -4
  153. package/src/features/shared/layouts/FinanceTabsLayout/FinanceTabsLayout.tsx +9 -4
  154. package/src/features/shared/layouts/LoadingTabsLayout/LoadingTabsLayout.tsx +7 -4
  155. package/src/features/shared/layouts/OrgUnitTabsLayout/OrgUnitTabLayout.tsx +3 -0
  156. package/src/features/shared/layouts/SumaPageLayout/FullSidebarNav.tsx +13 -7
  157. package/src/features/shared/layouts/SumaPageLayout/SumaSidebar.tsx +9 -5
  158. package/src/features/shared/localization/LocalizationContext.tsx +35 -0
  159. package/src/features/shared/localization/__tests__/createLocalize.test.ts +166 -0
  160. package/src/features/shared/localization/__tests__/get-localization-labels.service.test.ts +202 -0
  161. package/src/features/shared/localization/clients/LocalizationClient.ts +19 -0
  162. package/src/features/shared/localization/constants.ts +31 -0
  163. package/src/features/shared/localization/createLocalize.ts +78 -0
  164. package/src/features/shared/localization/services/get-localization-labels.service.ts +76 -0
  165. package/src/features/shared/localization/types.ts +66 -0
  166. package/src/features/shared/localization/withLocalization.tsx +22 -0
  167. package/src/features/shared/types/AuthRouteProps.ts +5 -0
  168. package/src/features/shared/types/LoaderData.ts +1 -0
  169. package/src/features/shared/utils/addresLabelToPropMapping.ts +10 -10
  170. package/src/features/shared/utils/constants.ts +1 -4
  171. package/src/features/shared/utils/getContractSettingsLinks.ts +17 -12
  172. package/src/features/shared/utils/getFinanceSettingsLinks.ts +14 -9
  173. package/src/features/shared/utils/getKeyByValue.ts +2 -2
  174. package/src/features/shared/utils/getOrganizationSettingsLinks.ts +13 -3
  175. package/src/features/shared/utils/getSumaListingSidebarLinks.ts +15 -10
  176. package/src/features/shared/utils/index.ts +2 -0
  177. package/src/features/shared/utils/routeLayoutMapping.ts +30 -30
  178. package/src/features/shared/utils/search.tsx +10 -0
  179. package/src/features/shared/utils/withAuth.tsx +6 -0
  180. package/src/features/shared/utils/withAuthLoader.ts +11 -0
  181. package/src/features/shared/utils/withLoaderErrorBoundary.ts +9 -0
  182. package/src/features/shared/utils/withProviders.tsx +13 -2
  183. package/src/features/users/components/CreateUserDrawer/CreateUserDrawer.tsx +39 -27
  184. package/src/features/users/components/CreateUserDrawerWithUsername/CreateUserDrawerWithUsername.tsx +41 -39
  185. package/src/features/users/components/DeleteUserDrawer/DeleteUserDrawer.tsx +27 -23
  186. package/src/features/users/components/EmailTransactionalSection/EmailTransactionalSection.tsx +6 -8
  187. package/src/features/users/components/LoginField/LoginField.tsx +4 -4
  188. package/src/features/users/components/ReassignOrgUnitDrawer/ReassignOrgUnitDrawer.tsx +22 -19
  189. package/src/features/users/components/ResetPasswordDrawer/ResetPasswordDrawer.tsx +16 -21
  190. package/src/features/users/components/UpdateUserDrawer/UpdateUserDrawer.tsx +26 -15
  191. package/src/features/users/components/UpdateUserDrawerWithUsername/UpdateUserDrawerWithUsername.tsx +22 -8
  192. package/src/features/users/components/UserDropdownMenu/UserDropdownMenu.tsx +7 -5
  193. package/src/features/users/components/UserFormFields/UserFormFields.tsx +9 -8
  194. package/src/features/users/components/UsersCard/UsersCard.tsx +4 -2
  195. package/src/features/users/layouts/UserDetailsLayout/UserDetailsLayout.tsx +26 -10
  196. package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +12 -8
  197. package/src/pages/accounting-field.tsx +28 -15
  198. package/src/pages/address-details.tsx +37 -26
  199. package/src/pages/addresses.tsx +27 -12
  200. package/src/pages/budgets-details.tsx +25 -15
  201. package/src/pages/budgets.tsx +31 -17
  202. package/src/pages/buyer-organization-manager.tsx +23 -12
  203. package/src/pages/buying-policies.tsx +38 -20
  204. package/src/pages/buying-policy-details.tsx +20 -19
  205. package/src/pages/contracts.tsx +15 -1
  206. package/src/pages/credit-cards.tsx +30 -17
  207. package/src/pages/order-entry.tsx +26 -15
  208. package/src/pages/org-unit-details.tsx +20 -6
  209. package/src/pages/org-units.tsx +20 -6
  210. package/src/pages/payment-groups.tsx +15 -12
  211. package/src/pages/productAssortment.tsx +10 -1
  212. package/src/pages/profile.tsx +14 -1
  213. package/src/pages/role-details.tsx +19 -6
  214. package/src/pages/roles.tsx +27 -14
  215. package/src/pages/user-details.tsx +29 -17
  216. package/src/pages/users.tsx +11 -0
  217. package/vitest.config.ts +13 -0
  218. package/src/features/addresses/constants/messages.ts +0 -8
  219. package/src/features/credit-cards/constants/messages.ts +0 -6
@@ -6,8 +6,8 @@ import { useUI } from "@faststore/ui";
6
6
 
7
7
  import { BasicDrawer, type BasicDrawerProps } from "../../../shared/components";
8
8
  import { useBuyerPortal } from "../../../shared/hooks";
9
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
9
10
  import { parseAmount } from "../../../shared/utils/budgetAmountParse";
10
- import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
11
11
  import { useUpdateBudget } from "../../hooks";
12
12
  import { BUDGET_NOTIFICATION_BLOCK_MESSAGES } from "../../messages/budgetNotifications";
13
13
  import { handleBudgetError } from "../../utils";
@@ -37,6 +37,7 @@ export function BudgetEditNotificationDrawer({
37
37
  contractId,
38
38
  ...props
39
39
  }: BudgetEditNotificationDrawerProps) {
40
+ const { t } = useLocalization();
40
41
  const { pushToast } = useUI();
41
42
  const { clientContext } = useBuyerPortal();
42
43
  const router = useRouter();
@@ -59,7 +60,9 @@ export function BudgetEditNotificationDrawer({
59
60
  options: {
60
61
  onSuccess: () => {
61
62
  pushToast({
62
- message: `Budget updated successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
63
+ message: `${t("budgets.toasts.budgetUpdated")}\n${t(
64
+ "shared.messages.changesTimeout"
65
+ )}`,
63
66
  status: "INFO",
64
67
  });
65
68
  close();
@@ -70,6 +73,7 @@ export function BudgetEditNotificationDrawer({
70
73
  error,
71
74
  orgUnitId,
72
75
  onNavigateToUser: (path) => router.push(path),
76
+ t,
73
77
  });
74
78
 
75
79
  pushToast(toastConfig);
@@ -98,7 +102,7 @@ export function BudgetEditNotificationDrawer({
98
102
  setShowNotificationsEmailError(true);
99
103
  }
100
104
  pushToast({
101
- message: BUDGET_NOTIFICATION_BLOCK_MESSAGES[notifState.reason],
105
+ message: t(BUDGET_NOTIFICATION_BLOCK_MESSAGES[notifState.reason]),
102
106
  status: "ERROR",
103
107
  });
104
108
  return;
@@ -130,7 +134,10 @@ export function BudgetEditNotificationDrawer({
130
134
  size="large"
131
135
  {...props}
132
136
  >
133
- <BasicDrawer.Heading title="Edit notifications" onClose={close} />
137
+ <BasicDrawer.Heading
138
+ title={t("budgets.edit.notificationsTitle")}
139
+ onClose={close}
140
+ />
134
141
 
135
142
  <BasicDrawer.Body>
136
143
  <BudgetNotificationForm
@@ -148,7 +155,7 @@ export function BudgetEditNotificationDrawer({
148
155
 
149
156
  <BasicDrawer.Footer data-fs-bp-budget-notifications-drawer-footer>
150
157
  <BasicDrawer.Button variant="ghost" onClick={close}>
151
- Cancel
158
+ {t("shared.buttons.cancel")}
152
159
  </BasicDrawer.Button>
153
160
  <BasicDrawer.Button
154
161
  variant="confirm"
@@ -156,7 +163,7 @@ export function BudgetEditNotificationDrawer({
156
163
  disabled={isLoading}
157
164
  isLoading={isLoading}
158
165
  >
159
- Save
166
+ {t("shared.buttons.save")}
160
167
  </BasicDrawer.Button>
161
168
  </BasicDrawer.Footer>
162
169
  </BasicDrawer>
@@ -8,6 +8,7 @@ import {
8
8
  Table,
9
9
  } from "../../../shared/components";
10
10
  import { useBuyerPortal } from "../../../shared/hooks";
11
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
11
12
  import { CurrencyType, LocaleType } from "../../../shared/types";
12
13
  import { useDebouncedSearchBudgetNotification } from "../../hooks/useDebouncedSearchBudgetNotification";
13
14
  import {
@@ -59,6 +60,7 @@ export const BudgetNotificationForm = ({
59
60
  showUsersError = false,
60
61
  showInvalidEmailError = false,
61
62
  }: BudgetNotificationFormProps) => {
63
+ const { t } = useLocalization();
62
64
  const { currentUser } = useBuyerPortal();
63
65
  const { pushToast } = useUI();
64
66
 
@@ -161,12 +163,15 @@ export const BudgetNotificationForm = ({
161
163
  unitId,
162
164
  search: inputValue,
163
165
  });
164
- const loadingObject: UserOption = { id: "loading", name: "Loading..." };
166
+ const loadingObject: UserOption = {
167
+ id: "loading",
168
+ name: t("shared.labels.loading"),
169
+ };
165
170
 
166
171
  useEffect(() => {
167
172
  const mapped: UserOption[] = (usersResponse?.users ?? []).map((u) => ({
168
173
  id: String(u.userId),
169
- name: String(u.name ?? "Usuário"),
174
+ name: String(u.name ?? t("budgets.labels.defaultUserName")),
170
175
  email: u.email,
171
176
  }));
172
177
 
@@ -176,7 +181,9 @@ export const BudgetNotificationForm = ({
176
181
  ? {
177
182
  id: String(currentUser.id),
178
183
  email: currentUser.email ?? "",
179
- name: currentUser.name ? `${currentUser.name} (You)` : "You",
184
+ name: currentUser.name
185
+ ? `${currentUser.name} ${t("budgets.labels.youSuffix")}`
186
+ : t("budgets.labels.you"),
180
187
  }
181
188
  : null;
182
189
 
@@ -185,7 +192,7 @@ export const BudgetNotificationForm = ({
185
192
  );
186
193
 
187
194
  setOptions(selfOption ? [selfOption, ...withEmail] : withEmail);
188
- }, [usersResponse, currentUser]);
195
+ }, [usersResponse, currentUser, t]);
189
196
 
190
197
  const addUserIfNotExists = (opt: UserOption) => {
191
198
  const exists = selectedUsers.some((u) => u.userId === opt.id);
@@ -193,8 +200,7 @@ export const BudgetNotificationForm = ({
193
200
 
194
201
  if (!isValidNotificationUserEmail(opt.email)) {
195
202
  pushToast({
196
- message:
197
- "This user has no valid email on file and cannot receive budget notifications.",
203
+ message: t("budgets.errors.userNoValidEmail"),
198
204
  status: "ERROR",
199
205
  });
200
206
  return;
@@ -229,6 +235,7 @@ export const BudgetNotificationForm = ({
229
235
  );
230
236
  };
231
237
 
238
+ const removeThresholdLabel = t("budgets.actions.removeThreshold");
232
239
  const sizeProps = { width: 20, height: 20 };
233
240
  const disableRows = readonly || !enabled;
234
241
  const isLoading = isLoadingUsers || isDebouncing;
@@ -242,9 +249,9 @@ export const BudgetNotificationForm = ({
242
249
  selectedUsers.some((u) => !isValidNotificationUserEmail(u.userEmail));
243
250
 
244
251
  const addUsersAutocompleteHelperLabel = showNoUsersError
245
- ? BUDGET_NOTIFICATION_FORM_HELPER_NO_USERS
252
+ ? t(BUDGET_NOTIFICATION_FORM_HELPER_NO_USERS)
246
253
  : showEmailFieldError
247
- ? BUDGET_NOTIFICATION_FORM_HELPER_INVALID_EMAIL
254
+ ? t(BUDGET_NOTIFICATION_FORM_HELPER_INVALID_EMAIL)
248
255
  : undefined;
249
256
 
250
257
  return (
@@ -253,7 +260,9 @@ export const BudgetNotificationForm = ({
253
260
  data-fs-bp-budget-notification-row-section
254
261
  data-fs-bp-budget-notification-renew
255
262
  >
256
- <span data-fs-bp-budget-notification-renew-label>Notifications</span>
263
+ <span data-fs-bp-budget-notification-renew-label>
264
+ {t("budgets.notificationsForm.title")}
265
+ </span>
257
266
  <div data-fs-bp-budget-notification-row-section-action>
258
267
  <Toggle
259
268
  id="notificationsToggle"
@@ -265,10 +274,7 @@ export const BudgetNotificationForm = ({
265
274
  </div>
266
275
 
267
276
  <div data-fs-bp-budget-notification-section-label>
268
- <span>
269
- Set up to {MAX_THRESHOLDS} thresholds and notify users when the total
270
- amount reaches specific percentages
271
- </span>
277
+ <span>{t("budgets.notificationsForm.thresholdsDescription")}</span>
272
278
  </div>
273
279
 
274
280
  {enabled && (
@@ -278,16 +284,20 @@ export const BudgetNotificationForm = ({
278
284
  <Table layoutFixed>
279
285
  <Table.Head
280
286
  columns={[
281
- { key: "threshold", label: "Threshold", size: "medium" },
287
+ {
288
+ key: "threshold",
289
+ label: t("budgets.table.threshold"),
290
+ size: "medium",
291
+ },
282
292
  {
283
293
  key: "consumed",
284
- label: "Consumed",
294
+ label: t("budgets.table.consumed"),
285
295
  size: "medium",
286
296
  align: "right",
287
297
  },
288
298
  {
289
299
  key: "remaining",
290
- label: "Remaining",
300
+ label: t("budgets.table.remaining"),
291
301
  size: "large",
292
302
  align: "right",
293
303
  },
@@ -325,8 +335,8 @@ export const BudgetNotificationForm = ({
325
335
  data-fs-bp-budget-notification-remove-button
326
336
  type="button"
327
337
  onClick={() => removeThreshold(idx)}
328
- aria-label="Remove threshold"
329
- title="Remove threshold"
338
+ aria-label={removeThresholdLabel}
339
+ title={removeThresholdLabel}
330
340
  disabled={disableRows}
331
341
  >
332
342
  <Icon
@@ -364,21 +374,18 @@ export const BudgetNotificationForm = ({
364
374
  thresholds.length >= MAX_THRESHOLDS
365
375
  }
366
376
  >
367
- Add threshold
377
+ {t("budgets.notificationsForm.addThreshold")}
368
378
  </button>
369
379
  </div>
370
380
  </div>
371
381
 
372
382
  <div data-fs-bp-budget-notification-section-user>
373
383
  <div data-fs-bp-budget-notification-section-label>
374
- <span>
375
- Add users to be notified by email. At least one user must be
376
- added
377
- </span>
384
+ <span>{t("budgets.notificationsForm.addUsersDescription")}</span>
378
385
  </div>
379
386
 
380
387
  <AutocompleteDropdown
381
- label="Add users"
388
+ label={t("budgets.forms.addUsers")}
382
389
  value={inputValue}
383
390
  shouldOpenOnFocus={false}
384
391
  autoComplete="off"
@@ -2,6 +2,7 @@ import { Badge } from "@faststore/ui";
2
2
 
3
3
  import { EmptyState } from "../../../shared/components";
4
4
  import { useDrawerProps } from "../../../shared/hooks";
5
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
5
6
  import { BudgetEditNotificationDrawer } from "../BudgetEditNotificationDrawer/BudgetEditNotificationDrawer";
6
7
 
7
8
  import type {
@@ -21,12 +22,13 @@ type BudgetNotificationsInfoProps = {
21
22
  const DetailRow = ({
22
23
  label,
23
24
  notifications,
25
+ isUsers,
24
26
  }: {
25
27
  label: string;
26
28
  notifications: BudgetNotification;
29
+ isUsers?: boolean;
27
30
  }) => {
28
- const isUserLabel = label === "Users";
29
- const list = isUserLabel
31
+ const list = isUsers
30
32
  ? (notifications.users as NotificationUsers[])
31
33
  : (notifications.thresholds as NotificationThresholds[]);
32
34
 
@@ -37,7 +39,7 @@ const DetailRow = ({
37
39
  <span data-fs-bp-budget-notifications-details-row-value>
38
40
  {list.map((item, index) => (
39
41
  <Badge key={index} size="big">
40
- {isUserLabel
42
+ {isUsers
41
43
  ? (item as NotificationUsers).userName
42
44
  : `${(item as NotificationThresholds).value}%`}
43
45
  </Badge>
@@ -55,6 +57,7 @@ export const BudgetNotificationsInfo = ({
55
57
  orgUnitId,
56
58
  contractId,
57
59
  }: BudgetNotificationsInfoProps) => {
60
+ const { t } = useLocalization();
58
61
  const {
59
62
  open: openNotificationsDrawerProps,
60
63
  isOpen: isEditDrawerOpen,
@@ -66,13 +69,15 @@ export const BudgetNotificationsInfo = ({
66
69
  <div data-fs-bp-budget-notifications>
67
70
  <div data-fs-bp-budget-notifications-details>
68
71
  <div data-fs-budget-notifications-edit-line>
69
- <span data-fs-budget-notifications-edit-title>Notifications</span>
72
+ <span data-fs-budget-notifications-edit-title>
73
+ {t("budgets.notificationsForm.title")}
74
+ </span>
70
75
  <button
71
76
  type="button"
72
77
  data-fs-budget-notifications-edit-button
73
78
  onClick={openNotificationsDrawerProps}
74
79
  >
75
- Edit
80
+ {t("shared.buttons.edit")}
76
81
  </button>
77
82
  </div>
78
83
 
@@ -81,20 +86,21 @@ export const BudgetNotificationsInfo = ({
81
86
  <hr data-fs-bp-budget-notifications-divider />
82
87
  <DetailRow
83
88
  key="Thresholds"
84
- label="Thresholds"
89
+ label={t("budgets.notificationsForm.thresholds")}
85
90
  notifications={initialBudget.notifications}
86
91
  />
87
92
  <DetailRow
88
93
  key="Users"
89
- label="Users"
94
+ label={t("budgets.notificationsForm.users")}
90
95
  notifications={initialBudget.notifications}
96
+ isUsers
91
97
  />
92
98
  </>
93
99
  ) : (
94
100
  <div data-fs-bp-budget-notifications-empty>
95
101
  <EmptyState
96
- title="No notifications"
97
- description="Set up to 5 thresholds and notify users when the total amount reaches specific percentages."
102
+ title={t("budgets.empty.noNotifications")}
103
+ description={t("budgets.empty.noNotificationsDescription")}
98
104
  />
99
105
  </div>
100
106
  )}
@@ -1,3 +1,4 @@
1
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
1
2
  import { formatCurrency } from "../../../shared/utils";
2
3
  import { BudgetProgressBar } from "../BudgetProgressBar/BudgetProgressBar";
3
4
 
@@ -10,11 +11,14 @@ export const BudgetRemainingBalance = ({
10
11
  remaining,
11
12
  total,
12
13
  }: BudgetRemainingBalanceFormProps) => {
14
+ const { t } = useLocalization();
13
15
  const used = total - remaining;
14
16
 
15
17
  return (
16
18
  <div data-fs-bp-budget-remaining-balance>
17
- <p data-fs-bp-budget-remaining-balance-header>Remaining balance</p>
19
+ <p data-fs-bp-budget-remaining-balance-header>
20
+ {t("budgets.labels.remainingBalance")}
21
+ </p>
18
22
  <div data-fs-bp-budget-remaining-balance-header-content>
19
23
  <span data-fs-bp-budget-remaining-balance-label-remaining>
20
24
  {formatCurrency(remaining)}
@@ -22,7 +26,7 @@ export const BudgetRemainingBalance = ({
22
26
  <span data-fs-bp-budget-remaining-balance-label-used>
23
27
  {formatCurrency(Math.abs(used))}{" "}
24
28
  <span data-fs-bp-budget-remaining-balance-label-used-total>
25
- of {formatCurrency(total)} used
29
+ {t("budgets.labels.ofTotalUsed", [formatCurrency(total)])}
26
30
  </span>
27
31
  </span>
28
32
  <BudgetProgressBar
@@ -1,4 +1,5 @@
1
1
  import { useDrawerProps } from "../../../shared/hooks";
2
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
2
3
  import { formatCurrency } from "../../../shared/utils";
3
4
  import { formatDateToWET } from "../../../shared/utils/formatDateToWet";
4
5
  import { EditBudgetDrawer } from "../EditBudgetDrawer/EditBudgetDrawer";
@@ -28,11 +29,12 @@ export const BudgetSettingsInfoBalance = ({
28
29
  orgUnitId,
29
30
  budgetId,
30
31
  }: BudgetSettingsInfoProps) => {
32
+ const { t } = useLocalization();
31
33
  const formattedAmount = `${formatCurrency(Number(initialBudget?.amount))}`;
32
34
 
33
- const formattedPeriod = `${formatDateToWET(
34
- initialBudget.startDate
35
- )} to ${formatDateToWET(initialBudget.expirationDate ?? "")}`;
35
+ const formattedPeriod = `${formatDateToWET(initialBudget.startDate)}${t(
36
+ "budgets.labels.dateRangeSeparator"
37
+ )}${formatDateToWET(initialBudget.expirationDate ?? "")}`;
36
38
 
37
39
  const {
38
40
  open: openEditDrawerProps,
@@ -45,23 +47,38 @@ export const BudgetSettingsInfoBalance = ({
45
47
  <div data-fs-bp-budget-settings>
46
48
  <div data-fs-bp-budget-settings-details>
47
49
  <div data-fs-budget-settings-edit-line>
48
- <span data-fs-budget-settings-edit-title>Settings</span>
50
+ <span data-fs-budget-settings-edit-title>
51
+ {t("budgets.settingsInfo.title")}
52
+ </span>
49
53
  <button
50
54
  type="button"
51
55
  data-fs-budget-settings-edit-button
52
56
  onClick={openEditDrawerProps}
53
57
  >
54
- Edit
58
+ {t("shared.buttons.edit")}
55
59
  </button>
56
60
  </div>
57
61
  <hr data-fs-bp-budget-settings-divider />
58
62
 
59
- <DetailRow label="Name" value={initialBudget.name} />
60
- <DetailRow label="Amount" value={formattedAmount} />
61
- <DetailRow label="Period" value={formattedPeriod} />
62
63
  <DetailRow
63
- label="Automatic renewal"
64
- value={initialBudget.autoResetOnPeriodEnd ? "Active" : "Inactive"}
64
+ label={t("budgets.settingsInfo.name")}
65
+ value={initialBudget.name}
66
+ />
67
+ <DetailRow
68
+ label={t("budgets.settingsInfo.amount")}
69
+ value={formattedAmount}
70
+ />
71
+ <DetailRow
72
+ label={t("budgets.settingsInfo.period")}
73
+ value={formattedPeriod}
74
+ />
75
+ <DetailRow
76
+ label={t("budgets.settingsInfo.automaticRenewal")}
77
+ value={
78
+ initialBudget.autoResetOnPeriodEnd
79
+ ? t("budgets.labels.active")
80
+ : t("budgets.labels.inactive")
81
+ }
65
82
  />
66
83
  </div>
67
84
  </div>
@@ -4,6 +4,7 @@ import { Icon, Tooltip } from "@faststore/ui";
4
4
 
5
5
  import { Table } from "../../../shared/components";
6
6
  import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
7
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
7
8
 
8
9
  type UserRow = {
9
10
  userId: string;
@@ -23,19 +24,21 @@ type BudgetUsersTableProps = {
23
24
  function BudgetUsersTableBase({
24
25
  users,
25
26
  onRemove,
26
- emptyMessage = "No users found",
27
+ emptyMessage,
27
28
  className,
28
29
  disabled = false,
29
30
  }: BudgetUsersTableProps) {
31
+ const { t } = useLocalization();
32
+ const resolvedEmptyMessage = emptyMessage ?? t("budgets.empty.noUsersFound");
30
33
  const columns = getTableColumns({
31
34
  actionsLength: onRemove ? 1 : 0,
32
- nameColumnLabel: "User name",
35
+ nameColumnLabel: t("budgets.table.userName"),
33
36
  nameColumnKey: "name",
34
37
  nameColumnSize: "medium",
35
38
  extraColumns: [
36
39
  {
37
40
  key: "email",
38
- label: "Email",
41
+ label: t("budgets.table.email"),
39
42
  align: "left",
40
43
  size: "100%",
41
44
  hideOnScreenSize: "phonemid",
@@ -54,7 +57,7 @@ function BudgetUsersTableBase({
54
57
 
55
58
  <Table.Body>
56
59
  {users.length === 0 ? (
57
- <Table.Row title={emptyMessage} enabled={false}>
60
+ <Table.Row title={resolvedEmptyMessage} enabled={false}>
58
61
  <Table.Cell />
59
62
  </Table.Row>
60
63
  ) : (
@@ -70,10 +73,14 @@ function BudgetUsersTableBase({
70
73
  <button
71
74
  type="button"
72
75
  data-fs-bp-users-remove
73
- aria-label={`Remove ${u.userName}`}
76
+ aria-label={t("budgets.actions.removeUser", [u.userName])}
74
77
  disabled={rowDisabled}
75
78
  onClick={() => onRemove?.(u.userId)}
76
- title={rowDisabled ? undefined : `Remove ${u.userName}`}
79
+ title={
80
+ rowDisabled
81
+ ? undefined
82
+ : t("budgets.actions.removeUser", [u.userName])
83
+ }
77
84
  >
78
85
  <Icon name="MinusCircle" width={20} height={20} />
79
86
  </button>
@@ -82,7 +89,7 @@ function BudgetUsersTableBase({
82
89
  return rowDisabled && users.length === 1 ? (
83
90
  <Tooltip
84
91
  placement="left-center"
85
- content="At least one user must be notified. Add another user before removing this one."
92
+ content={t("budgets.tooltips.atLeastOneUserRequired")}
86
93
  >
87
94
  {button}
88
95
  </Tooltip>
@@ -6,6 +6,7 @@ import { Icon, Table } from "../../../shared/components";
6
6
  import { BasicDropdownMenu } from "../../../shared/components/BasicDropdownMenu/BasicDropdownMenu";
7
7
  import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
8
8
  import { useBuyerPortal } from "../../../shared/hooks";
9
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
9
10
  import { formatCurrency } from "../../../shared/utils";
10
11
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
11
12
  import { BudgetProgressBar } from "../BudgetProgressBar/BudgetProgressBar";
@@ -31,6 +32,7 @@ export function BudgetsTable({
31
32
  loading,
32
33
  onClickCreateNotification,
33
34
  }: IBudgetsTable) {
35
+ const { t } = useLocalization();
34
36
  const budgets = data;
35
37
  const route = useRouter();
36
38
  const { currentOrgUnit: orgUnit, currentContract: contract } =
@@ -46,23 +48,24 @@ export function BudgetsTable({
46
48
  const columns = getTableColumns({
47
49
  nameColumnSize: "18.625rem",
48
50
  actionsLength: 1.75,
51
+ nameColumnLabel: t("shared.labels.name"),
49
52
  extraColumns: [
50
53
  {
51
- label: "Remaining",
54
+ label: t("budgets.table.remaining"),
52
55
  key: "remaining",
53
56
  size: "100%",
54
57
  hideOnScreenSize: "phonemid",
55
58
  align: "left",
56
59
  },
57
60
  {
58
- label: "Expiration date",
61
+ label: t("budgets.table.expirationDate"),
59
62
  key: "date",
60
63
  size: "8.75rem",
61
64
  hideOnScreenSize: "phonemid",
62
65
  align: "right",
63
66
  },
64
67
  {
65
- label: "Total (USD)",
68
+ label: t("budgets.table.totalUsd"),
66
69
  key: "total",
67
70
  size: "8.75rem",
68
71
  hideOnScreenSize: "tablet",
@@ -92,21 +95,21 @@ export function BudgetsTable({
92
95
  onClick={() => route.push(detailsRoute(item.id))}
93
96
  >
94
97
  <Icon name="OpenInNew" width={20} height={20} />
95
- <span>Open</span>
98
+ <span>{t("shared.buttons.open")}</span>
96
99
  </DropdownItem>
97
100
  <DropdownItem
98
101
  data-fs-bp-testid="dropdown-budget-edit"
99
102
  onClick={() => onClickEditBudget(item.id)}
100
103
  >
101
104
  <Icon name="Edit" width={20} height={20} />
102
- <span>Edit settings</span>
105
+ <span>{t("budgets.dropdown.editSettings")}</span>
103
106
  </DropdownItem>
104
107
  {onClickCreateNotification && (
105
108
  <DropdownItem
106
109
  onClick={() => onClickCreateNotification(item.id)}
107
110
  >
108
111
  <Icon name="Edit" width={20} height={20} />
109
- <span>Edit notifications</span>
112
+ <span>{t("budgets.dropdown.editNotifications")}</span>
110
113
  </DropdownItem>
111
114
  )}
112
115
  <DropdownItem
@@ -114,7 +117,7 @@ export function BudgetsTable({
114
117
  onClick={() => onClickAllocationPage(item.id)}
115
118
  >
116
119
  <Icon name="Add" width={20} height={20} />
117
- <span>Add allocations</span>
120
+ <span>{t("budgets.dropdown.addAllocations")}</span>
118
121
  </DropdownItem>
119
122
  <BasicDropdownMenu.Separator />
120
123
  <DropdownItem
@@ -123,7 +126,7 @@ export function BudgetsTable({
123
126
  onClick={() => openDeleteDrawer(item.id)}
124
127
  >
125
128
  <Icon name="Delete" width={20} height={20} />
126
- <span>Delete</span>
129
+ <span>{t("shared.buttons.delete")}</span>
127
130
  </DropdownItem>
128
131
  </BasicDropdownMenu>
129
132
  }
@@ -10,11 +10,11 @@ import {
10
10
  Icon,
11
11
  type BasicDrawerProps,
12
12
  } from "../../../shared/components";
13
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
13
14
  import {
14
15
  sortingOptionsAllocations,
15
16
  type Dictionary,
16
17
  } from "../../../shared/utils";
17
- import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
18
18
  import { getKeyByValue } from "../../../shared/utils/getKeyByValue";
19
19
  import { useAddAllocations } from "../../hooks/useAddAllocations";
20
20
  import { useGetAllocations } from "../../hooks/useGetAllocations";
@@ -38,6 +38,7 @@ export const CreateBudgetAllocationDrawer = ({
38
38
  budgetId,
39
39
  ...props
40
40
  }: CreateBudgetAllocationDrawerProps) => {
41
+ const { t } = useLocalization();
41
42
  const router = useRouter();
42
43
  const { pushToast } = useUI();
43
44
 
@@ -90,7 +91,9 @@ export const CreateBudgetAllocationDrawer = ({
90
91
  options: {
91
92
  onSuccess: () => {
92
93
  pushToast({
93
- message: `Allocation successfully added\n${CHANGES_TIMEOUT_MESSAGE}`,
94
+ message: `${t("budgets.toasts.allocationAdded")}\n${t(
95
+ "shared.messages.changesTimeout"
96
+ )}`,
94
97
  status: "INFO",
95
98
  });
96
99
  close();
@@ -135,7 +138,7 @@ export const CreateBudgetAllocationDrawer = ({
135
138
  title={
136
139
  <div data-fs-bp-create-budget-drawer-header-arrow>
137
140
  <Icon name="ArrowPointLeft" onClick={close} />
138
- <span>Add budget allocations</span>
141
+ <span>{t("budgets.create.addBudgetAllocations")}</span>
139
142
  </div>
140
143
  }
141
144
  onClose={close}
@@ -166,14 +169,14 @@ export const CreateBudgetAllocationDrawer = ({
166
169
 
167
170
  <BasicDrawer.Footer>
168
171
  <BasicDrawer.Button variant="ghost" onClick={close}>
169
- Cancel
172
+ {t("shared.buttons.cancel")}
170
173
  </BasicDrawer.Button>
171
174
  <BasicDrawer.Button
172
175
  variant="confirm"
173
176
  onClick={handleSave}
174
177
  isLoading={isFetchLoading || isLoadingAddAllocationsToBudget}
175
178
  >
176
- Save
179
+ {t("shared.buttons.save")}
177
180
  </BasicDrawer.Button>
178
181
  </BasicDrawer.Footer>
179
182
  </BasicDrawer>