@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
@@ -22,6 +22,7 @@ import {
22
22
  useQueryParams,
23
23
  } from "../../../shared/hooks";
24
24
  import { ContractTabsLayout, GlobalLayout } from "../../../shared/layouts";
25
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
25
26
  import { getValidPage } from "../../../shared/utils";
26
27
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
27
28
  import {
@@ -48,6 +49,7 @@ const PAGE_SIZE = 25;
48
49
  export const AccountingFieldLayout = ({
49
50
  accountingField,
50
51
  }: AccountingFieldLayoutProps) => {
52
+ const { t } = useLocalization();
51
53
  const router = useRouter();
52
54
  const { setQueryStrings } = useQueryParams();
53
55
  const [page, setPage] = useState(getValidPage(router.query.page));
@@ -104,10 +106,11 @@ export const AccountingFieldLayout = ({
104
106
  const columns = getTableColumns({
105
107
  actionsLength: 2,
106
108
  nameColumnSize: "14.5rem",
109
+ nameColumnLabel: t("accountingFields.table.columnName"),
107
110
  extraColumns: [
108
111
  {
109
112
  key: "description",
110
- label: "Description",
113
+ label: t("accountingFields.table.columnDescription"),
111
114
  align: "left",
112
115
  size: "100%",
113
116
  hideOnScreenSize: "tablet",
@@ -164,7 +167,7 @@ export const AccountingFieldLayout = ({
164
167
  orgUnitId={orgUnit?.id ?? ""}
165
168
  contractName={contract?.name ?? ""}
166
169
  contractId={contract?.id ?? ""}
167
- pageName="Contract"
170
+ pageName={t("shared.labels.contract")}
168
171
  >
169
172
  <div data-fs-bp-accounting-field-container>
170
173
  <HeaderInside
@@ -198,14 +201,13 @@ export const AccountingFieldLayout = ({
198
201
  {checkAccountingFieldIsEmpty(accountingField!) && (
199
202
  <AccountingFieldEmptyAlert flexContent>
200
203
  <span data-fs-bp-accounting-field-empty-alert-message>
201
- Due to the field settings, at least one value is required for
202
- buyers to complete checkout.
204
+ {t("accountingFields.messages.emptyValueRequired")}
203
205
  </span>
204
206
  <button
205
207
  data-fs-bp-accounting-field-empty-alert-btn
206
208
  onClick={openCreateAccountingValueDrawer}
207
209
  >
208
- Add value
210
+ {t("accountingFields.buttons.addValue")}
209
211
  </button>
210
212
  </AccountingFieldEmptyAlert>
211
213
  )}
@@ -214,12 +216,12 @@ export const AccountingFieldLayout = ({
214
216
  <Paginator.Interval {...intervalData} />
215
217
  </div>
216
218
  {!listAccountingValuesLoading && intervalData.total === 0 ? (
217
- <EmptyState title="No values yet">
219
+ <EmptyState title={t("accountingFields.empty.noValuesTitle")}>
218
220
  <button
219
221
  data-fs-bp-accounting-field-empty-state-btn
220
222
  onClick={openCreateAccountingValueDrawer}
221
223
  >
222
- Add
224
+ {t("shared.buttons.add")}
223
225
  </button>
224
226
  </EmptyState>
225
227
  ) : (
@@ -261,14 +263,14 @@ export const AccountingFieldLayout = ({
261
263
  onClick={previousPage}
262
264
  disabled={isLoading || page <= 1}
263
265
  >
264
- Previous Page
266
+ {t("shared.pagination.previousPage")}
265
267
  </Paginator.NextPageButton>
266
268
  <Paginator.NextPageButton
267
269
  data-fs-bp-accounting-field-next-page
268
270
  onClick={nextPage}
269
271
  disabled={isLoading || page >= totalPages}
270
272
  >
271
- Next Page
273
+ {t("shared.pagination.nextPage")}
272
274
  </Paginator.NextPageButton>
273
275
  <Paginator.Interval {...intervalData} />
274
276
  </div>
@@ -7,9 +7,9 @@ import { useUI } from "@faststore/ui";
7
7
  import { RecipientsForm } from "..";
8
8
  import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
9
9
  import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
10
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
10
11
  import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
11
12
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
12
- import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
13
13
  import { useAddRecipientsToAddress } from "../../hooks/useAddRecipientsToAddress";
14
14
 
15
15
  import type { RecipientInput } from "../../types";
@@ -32,6 +32,7 @@ export const AddRecipientsDrawer = ({
32
32
  const router = useRouter();
33
33
  const { pushToast } = useUI();
34
34
  const { currentOrgUnit } = useBuyerPortal();
35
+ const { t } = useLocalization();
35
36
  const { trackEvent, trackEntityCreateError } = useAnalytics({
36
37
  entityType: "recipient",
37
38
  defaultTimerName: "recipient_creation",
@@ -51,7 +52,9 @@ export const AddRecipientsDrawer = ({
51
52
  });
52
53
 
53
54
  pushToast({
54
- message: `Recipients added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
55
+ message: `${t("addresses.toasts.recipientsAdded")}\n${t(
56
+ "shared.messages.changesTimeout"
57
+ )}`,
55
58
  status: "INFO",
56
59
  icon: (
57
60
  <button
@@ -67,7 +70,7 @@ export const AddRecipientsDrawer = ({
67
70
  router.push(`${url}?tab=recipient-tab`);
68
71
  }}
69
72
  >
70
- View
73
+ {t("shared.buttons.view")}
71
74
  </button>
72
75
  ),
73
76
  });
@@ -84,7 +87,7 @@ export const AddRecipientsDrawer = ({
84
87
  });
85
88
 
86
89
  pushToast({
87
- message: "An error occurred while adding recipients",
90
+ message: t("addresses.errors.recipientsAdd"),
88
91
  status: "ERROR",
89
92
  });
90
93
  },
@@ -111,14 +114,17 @@ export const AddRecipientsDrawer = ({
111
114
 
112
115
  return (
113
116
  <BasicDrawer data-fs-bp-create-address-drawer close={close} {...props}>
114
- <BasicDrawer.Heading title="Add Recipients" onClose={close} />
117
+ <BasicDrawer.Heading
118
+ title={t("addresses.drawers.addRecipients")}
119
+ onClose={close}
120
+ />
115
121
  <BasicDrawer.Body>
116
122
  <RecipientsForm recipients={recipients} setRecipients={setRecipients} />
117
123
  </BasicDrawer.Body>
118
124
 
119
125
  <BasicDrawer.Footer>
120
126
  <BasicDrawer.Button variant="ghost" onClick={close}>
121
- Cancel
127
+ {t("shared.buttons.cancel")}
122
128
  </BasicDrawer.Button>
123
129
  <BasicDrawer.Button
124
130
  variant="confirm"
@@ -126,7 +132,7 @@ export const AddRecipientsDrawer = ({
126
132
  onClick={handleConfirmClick}
127
133
  disabled={!isConfirmButtonEnabled}
128
134
  >
129
- Save
135
+ {t("shared.buttons.save")}
130
136
  </BasicDrawer.Button>
131
137
  </BasicDrawer.Footer>
132
138
  </BasicDrawer>
@@ -11,8 +11,7 @@ import {
11
11
  } from "..";
12
12
  import { BasicDropdownMenu, Icon } from "../../../shared/components";
13
13
  import { useDrawerProps } from "../../../shared/hooks";
14
- import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
15
- import { ADDRESS_MESSAGES } from "../../constants/messages";
14
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
16
15
  import { useSetDefaultAddress } from "../../hooks/useSetDefaultAddress";
17
16
  import { useUnsetDefaultAddress } from "../../hooks/useUnsetDefaultAddress";
18
17
 
@@ -29,7 +28,7 @@ export type AddressDropdownMenuProps = {
29
28
  };
30
29
 
31
30
  export const AddressDropdownMenu = ({
32
- locationsLabel = "Locations",
31
+ locationsLabel,
33
32
  currentAddress,
34
33
  onUpdate,
35
34
  onOpen,
@@ -37,13 +36,18 @@ export const AddressDropdownMenu = ({
37
36
  }: AddressDropdownMenuProps) => {
38
37
  const router = useRouter();
39
38
  const { pushToast } = useUI();
39
+ const { t } = useLocalization();
40
+
41
+ const resolvedLocationsLabel =
42
+ locationsLabel ?? t("addresses.labels.locations");
40
43
 
41
44
  const orgUnitId = router.query.orgUnitId as string;
42
45
  const customerId = router.query.contractId as string;
43
46
 
44
47
  const handleCreateNewAddressSuccess = () => {
45
48
  pushToast({
46
- message: `${ADDRESS_MESSAGES.defaultSaved}\n${CHANGES_TIMEOUT_MESSAGE}`,
49
+ message: `${t("addresses.toasts.defaultSaved")}
50
+ ${t("shared.messages.changesTimeout")}`,
47
51
  status: "INFO",
48
52
  });
49
53
  onUpdate?.();
@@ -51,7 +55,8 @@ export const AddressDropdownMenu = ({
51
55
 
52
56
  const handleRemoveDefaultAddressSuccess = () => {
53
57
  pushToast({
54
- message: `${ADDRESS_MESSAGES.defaultUnset}\n${CHANGES_TIMEOUT_MESSAGE}`,
58
+ message: `${t("addresses.toasts.defaultUnset")}
59
+ ${t("shared.messages.changesTimeout")}`,
55
60
  status: "INFO",
56
61
  });
57
62
  onUpdate?.();
@@ -61,7 +66,7 @@ export const AddressDropdownMenu = ({
61
66
  onSuccess: handleRemoveDefaultAddressSuccess,
62
67
  onError: () => {
63
68
  pushToast({
64
- message: ADDRESS_MESSAGES.defaultUnsetError,
69
+ message: t("addresses.errors.defaultUnsetError"),
65
70
  status: "ERROR",
66
71
  });
67
72
  },
@@ -71,7 +76,7 @@ export const AddressDropdownMenu = ({
71
76
  onSuccess: handleCreateNewAddressSuccess,
72
77
  onError: () => {
73
78
  pushToast({
74
- message: ADDRESS_MESSAGES.defaultError,
79
+ message: t("addresses.errors.defaultError"),
75
80
  status: "ERROR",
76
81
  });
77
82
  },
@@ -79,7 +84,7 @@ export const AddressDropdownMenu = ({
79
84
 
80
85
  const handleSetAsDefault = () => {
81
86
  pushToast({
82
- message: "Setting the default address...",
87
+ message: t("addresses.toasts.settingDefault"),
83
88
  status: "INFO",
84
89
  icon: <Icon name="LoadingIndicator" data-fs-icon-loading="true" />,
85
90
  });
@@ -100,7 +105,7 @@ export const AddressDropdownMenu = ({
100
105
 
101
106
  const handleUnsetAsDefault = () => {
102
107
  pushToast({
103
- message: "Unsetting the default address...",
108
+ message: t("addresses.toasts.unsettingDefault"),
104
109
  status: "INFO",
105
110
  icon: <Icon name="LoadingIndicator" data-fs-icon-loading="true" />,
106
111
  });
@@ -117,9 +122,6 @@ export const AddressDropdownMenu = ({
117
122
  onOpen?.();
118
123
  };
119
124
 
120
- // const idsPath = currentOrgUnit?.path?.ids?.split("/") ?? [];
121
- // const isRootLevelOrgUnit = idsPath.length === 2;
122
-
123
125
  const {
124
126
  open: openEditDrawerProps,
125
127
  isOpen: isEditDrawerOpen,
@@ -161,31 +163,31 @@ export const AddressDropdownMenu = ({
161
163
  </DropdownItem>
162
164
  <DropdownItem onClick={openEditDrawerProps}>
163
165
  <Icon name="Edit" {...sizeProps} />
164
- Edit details
166
+ {t("addresses.dropdown.editDetails")}
165
167
  </DropdownItem>
166
168
  <DropdownItem
167
169
  data-fs-bp-testid="dropdown-item-add-location"
168
170
  onClick={openLocationDrawer}
169
171
  >
170
172
  <UIIcon name="PlusCircle" {...sizeProps} />
171
- Add {locationsLabel}
173
+ {t("addresses.actions.addLocations", [resolvedLocationsLabel])}
172
174
  </DropdownItem>
173
175
  <DropdownItem
174
176
  data-fs-bp-testid="dropdown-item-add-recipient"
175
177
  onClick={openRecipientsDrawer}
176
178
  >
177
179
  <UIIcon name="PlusCircle" {...sizeProps} />
178
- Add Recipients
180
+ {t("addresses.actions.addRecipients")}
179
181
  </DropdownItem>
180
182
  {currentAddress.isDefault ? (
181
183
  <DropdownItem onClick={handleUnsetAsDefault}>
182
184
  <Icon name="BookmarkRemove" {...sizeProps} />
183
- Unset as default
185
+ {t("addresses.actions.unsetAsDefault")}
184
186
  </DropdownItem>
185
187
  ) : (
186
188
  <DropdownItem onClick={handleSetAsDefault}>
187
189
  <Icon name="BookmarkAdd" {...sizeProps} />
188
- Set as default
190
+ {t("addresses.actions.setAsDefault")}
189
191
  </DropdownItem>
190
192
  )}
191
193
 
@@ -195,7 +197,7 @@ export const AddressDropdownMenu = ({
195
197
  data-fs-bp-dropdown-menu-item-disabled={isSyncMode}
196
198
  >
197
199
  <UIIcon name="MinusCircle" {...sizeProps} />
198
- Remove from Unit
200
+ {t("addresses.actions.removeFromUnit")}
199
201
  </DropdownItem>
200
202
  {/* Remove validation while we reevaluate the rule */}
201
203
  {/* {isRootLevelOrgUnit && ( */}
@@ -204,7 +206,7 @@ export const AddressDropdownMenu = ({
204
206
  data-fs-bp-dropdown-menu-item-mode="danger"
205
207
  >
206
208
  <Icon name="Delete" {...sizeProps} data-fs-bp-delete-address />
207
- <span data-fs-bp-delete-address>Delete</span>
209
+ <span data-fs-bp-delete-address>{t("shared.buttons.delete")}</span>
208
210
  </DropdownItem>
209
211
  {/* )} */}
210
212
  </BasicDropdownMenu>
@@ -222,7 +224,7 @@ export const AddressDropdownMenu = ({
222
224
  {...locationDrawerProps}
223
225
  isOpen={isOpenLocationDrawer}
224
226
  addressId={currentAddress.id}
225
- locationsLabel={locationsLabel}
227
+ locationsLabel={resolvedLocationsLabel}
226
228
  />
227
229
  )}
228
230
  {isOpenRecipientsDrawer && (
@@ -8,6 +8,7 @@ import {
8
8
  Icon,
9
9
  } from "../../../shared/components";
10
10
  import { useBuyerPortal } from "../../../shared/hooks";
11
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
11
12
  import { maskPostalCode } from "../../../shared/utils/postalCode";
12
13
  import { CountryOptions, type CountryOption } from "../../data/countries";
13
14
  import { useDebouncedSearchAddress } from "../../hooks/useDebouncedSearchAddress";
@@ -47,7 +48,10 @@ export const AddressForm = ({
47
48
  setCompletedAddress,
48
49
  fixedType = false,
49
50
  }: AddressFormProps) => {
51
+ const { t } = useLocalization();
52
+
50
53
  const addressTypeOptions = ["Shipping", "Billing"];
54
+
51
55
  const { currentOrgUnit } = useBuyerPortal();
52
56
  const [selectedState, setSelectedState] = useState(
53
57
  address.state
@@ -61,6 +65,13 @@ export const AddressForm = ({
61
65
  currentOrgUnit?.id ?? ""
62
66
  );
63
67
 
68
+ const countryTranslations: Record<string, string> = {
69
+ BRA: t("addresses.forms.country.brazil"),
70
+ USA: t("addresses.forms.country.usa"),
71
+ CAN: t("addresses.forms.country.canada"),
72
+ MEX: t("addresses.forms.country.mexico"),
73
+ };
74
+
64
75
  const cleanCompletedAddress = () => {
65
76
  if (setCompletedAddress && setUseExistingAddress) {
66
77
  setCompletedAddress({} as AddressData);
@@ -91,12 +102,12 @@ export const AddressForm = ({
91
102
  <>
92
103
  {!useExistingAddress ? (
93
104
  <div data-fs-create-address-form>
94
- {!hideLabel && <span>Fill in the address details</span>}
105
+ {!hideLabel && <span>{t("addresses.forms.fillInDetails")}</span>}
95
106
 
96
107
  <div key="country">
97
108
  <AutocompleteDropdown
98
109
  data-fs-bp-create-address-country-selector
99
- label="Country"
110
+ label={t("addresses.forms.country")}
100
111
  className="address-country"
101
112
  value={address.country}
102
113
  options={CountryOptions}
@@ -114,7 +125,7 @@ export const AddressForm = ({
114
125
  handleCountrySelect(option);
115
126
  }}
116
127
  >
117
- {option?.name}
128
+ {countryTranslations[option.id] ?? option.name}
118
129
  {address.country === option?.name && (
119
130
  <Icon name="Check" width={12} height={12} />
120
131
  )}
@@ -126,7 +137,7 @@ export const AddressForm = ({
126
137
  {address.countryCode === "BRA" && (
127
138
  <div key="zipCode">
128
139
  <InputText
129
- label="Postal Code"
140
+ label={t("addresses.forms.postalCode")}
130
141
  value={address.zip}
131
142
  className="address-postal-code"
132
143
  hasError={isTouched && !address.zip?.trim()}
@@ -135,7 +146,7 @@ export const AddressForm = ({
135
146
  />
136
147
  <ErrorMessage
137
148
  show={isTouched && !address.zip?.trim()}
138
- message="Postal Code is required"
149
+ message={t("addresses.validation.postalCodeRequired")}
139
150
  />
140
151
  </div>
141
152
  )}
@@ -143,7 +154,7 @@ export const AddressForm = ({
143
154
  <div key="addressName">
144
155
  {isEdit ? (
145
156
  <InputText
146
- label="Address Name"
157
+ label={t("addresses.forms.addressName")}
147
158
  value={address.name}
148
159
  className="address-name"
149
160
  hasError={isTouched && !address.name?.trim()}
@@ -153,13 +164,13 @@ export const AddressForm = ({
153
164
  />
154
165
  ) : (
155
166
  <AutocompleteDropdown
156
- label="Address Name"
167
+ label={t("addresses.forms.addressName")}
157
168
  value={autoCompleteAddressName}
158
169
  className="address-name"
159
170
  options={searchedAddresses}
160
171
  shouldCloseOnSelect
161
172
  shouldShowArrowDown={false}
162
- placeholder="Already in the contract — select to add"
173
+ placeholder={t("addresses.placeholders.selectExistingAddress")}
163
174
  onChange={(event) => {
164
175
  setAutoCompleteAddressName(event.currentTarget.value);
165
176
  setAddress({ ...address, name: event.target.value });
@@ -196,7 +207,7 @@ export const AddressForm = ({
196
207
 
197
208
  <div key="streetAddress">
198
209
  <InputText
199
- label="Street Address"
210
+ label={t("addresses.forms.streetAddress")}
200
211
  value={address.streetAddress}
201
212
  className="street-address"
202
213
  hasError={isTouched && !address.streetAddress?.trim()}
@@ -206,7 +217,7 @@ export const AddressForm = ({
206
217
  />
207
218
  <ErrorMessage
208
219
  show={isTouched && !address.streetAddress?.trim()}
209
- message="Street Address is required"
220
+ message={t("addresses.validation.streetAddressRequired")}
210
221
  />
211
222
  </div>
212
223
 
@@ -215,7 +226,7 @@ export const AddressForm = ({
215
226
  <div key="streetNumber">
216
227
  <InputText
217
228
  type="number"
218
- label="Number"
229
+ label={t("addresses.forms.number")}
219
230
  value={address.streetNumber || ""}
220
231
  className="address-number"
221
232
  hasError={isTouched && !address.streetNumber?.trim()}
@@ -225,13 +236,13 @@ export const AddressForm = ({
225
236
  />
226
237
  <ErrorMessage
227
238
  show={isTouched && !address.streetNumber?.trim()}
228
- message="Number is required"
239
+ message={t("addresses.validation.numberRequired")}
229
240
  />
230
241
  </div>
231
242
 
232
243
  <div key="neighborhood">
233
244
  <InputText
234
- label="Neighborhood"
245
+ label={t("addresses.forms.neighborhood")}
235
246
  value={address.neighborhood || ""}
236
247
  className="address-neighborhood"
237
248
  hasError={isTouched && !address.neighborhood?.trim()}
@@ -241,7 +252,7 @@ export const AddressForm = ({
241
252
  />
242
253
  <ErrorMessage
243
254
  show={isTouched && !address.neighborhood?.trim()}
244
- message="Neighborhood is required"
255
+ message={t("addresses.validation.neighborhoodRequired")}
245
256
  />
246
257
  </div>
247
258
  </>
@@ -249,7 +260,7 @@ export const AddressForm = ({
249
260
 
250
261
  <div key="streetAddress2">
251
262
  <InputText
252
- label="Apt, Suite, Building (optional)"
263
+ label={t("addresses.forms.aptSuiteBuilding")}
253
264
  className="street-address2"
254
265
  value={address.streetAddress2}
255
266
  onChange={(event) =>
@@ -260,7 +271,7 @@ export const AddressForm = ({
260
271
 
261
272
  <div key="city">
262
273
  <InputText
263
- label="City"
274
+ label={t("addresses.forms.city")}
264
275
  className="address-city"
265
276
  value={address.city}
266
277
  hasError={isTouched && !address.city?.trim()}
@@ -270,14 +281,14 @@ export const AddressForm = ({
270
281
  />
271
282
  <ErrorMessage
272
283
  show={isTouched && !address.city?.trim()}
273
- message="City is required"
284
+ message={t("addresses.validation.cityRequired")}
274
285
  />
275
286
  </div>
276
287
 
277
288
  <div key="state">
278
289
  <AutocompleteDropdown
279
290
  data-fs-bp-create-address-state-selector
280
- label="State"
291
+ label={t("addresses.forms.state")}
281
292
  className="address-state"
282
293
  value={selectedState}
283
294
  options={getStateDisplayOptions(address.countryCode || "")}
@@ -332,7 +343,7 @@ export const AddressForm = ({
332
343
  {address.countryCode !== "BRA" && (
333
344
  <div key="zipCode">
334
345
  <InputText
335
- label="Postal Code"
346
+ label={t("addresses.forms.postalCode")}
336
347
  value={address.zip}
337
348
  className="address-postal-code"
338
349
  hasError={isTouched && !address.zip?.trim()}
@@ -341,7 +352,7 @@ export const AddressForm = ({
341
352
  />
342
353
  <ErrorMessage
343
354
  show={isTouched && !address.zip?.trim()}
344
- message="Postal Code is required"
355
+ message={t("addresses.validation.postalCodeRequired")}
345
356
  />
346
357
  </div>
347
358
  )}
@@ -349,7 +360,7 @@ export const AddressForm = ({
349
360
  {isEdit && (
350
361
  <div key="geoCoordinates">
351
362
  <InputText
352
- label="Geo coordinates (Optional)"
363
+ label={t("addresses.forms.geoCoordinates")}
353
364
  value={address.geoCoordinates}
354
365
  onChange={(event) =>
355
366
  setAddress({ ...address, geoCoordinates: event.target.value })
@@ -361,7 +372,7 @@ export const AddressForm = ({
361
372
  {!fixedType && (
362
373
  <div key="addressType">
363
374
  <AutocompleteDropdown
364
- label="Address Type"
375
+ label={t("addresses.forms.addressType")}
365
376
  value={address?.types.length > 0 ? address.types : ""}
366
377
  className="address-type"
367
378
  options={addressTypeOptions}
@@ -1,6 +1,5 @@
1
- import Link from "next/link";
2
-
3
- import { Dropdown } from "@faststore/ui";
1
+ import { useLink_unstable as useLink } from "@faststore/core/experimental";
2
+ import { Dropdown, Link } from "@faststore/ui";
4
3
 
5
4
  import { AddressDropdownMenu } from "..";
6
5
  import { BasicDropdownMenu, Icon, Tag } from "../../../shared/components";
@@ -21,27 +20,32 @@ export const AddressLine = ({
21
20
  types,
22
21
  href,
23
22
  currentAddress,
24
- }: AddressLineProps) => (
25
- <li data-fs-addresses-line>
26
- <Link href={href} data-fs-addresses-line-link>
27
- <Icon
28
- name="LocalPostOffice"
29
- width={20}
30
- height={20}
31
- data-fs-addresses-line-icon
32
- />
33
- <span title={name} data-fs-addresses-line-name>
34
- {name}
35
- </span>
23
+ }: AddressLineProps) => {
24
+ const { resolveLink } = useLink();
25
+ const resolvedHref = resolveLink(href);
26
+
27
+ return (
28
+ <li data-fs-addresses-line>
29
+ <Link href={resolvedHref} data-fs-addresses-line-link>
30
+ <Icon
31
+ name="LocalPostOffice"
32
+ width={20}
33
+ height={20}
34
+ data-fs-addresses-line-icon
35
+ />
36
+ <span title={name} data-fs-addresses-line-name>
37
+ {name}
38
+ </span>
36
39
 
37
- {types.map((type) => (
38
- <Tag key={type}>{type}</Tag>
39
- ))}
40
- </Link>
40
+ {types.map((type) => (
41
+ <Tag key={type}>{type}</Tag>
42
+ ))}
43
+ </Link>
41
44
 
42
- <Dropdown>
43
- <BasicDropdownMenu.Trigger />
44
- <AddressDropdownMenu currentAddress={currentAddress} />
45
- </Dropdown>
46
- </li>
47
- );
45
+ <Dropdown>
46
+ <BasicDropdownMenu.Trigger />
47
+ <AddressDropdownMenu currentAddress={currentAddress} />
48
+ </Dropdown>
49
+ </li>
50
+ );
51
+ };
@@ -18,6 +18,7 @@ import {
18
18
  usePageItems,
19
19
  } from "../../../shared/hooks";
20
20
  import { PAGE_PARAMS, SEARCH_PARAMS } from "../../../shared/hooks/usePageItems";
21
+ import { useLocalization } from "../../../shared/localization/LocalizationContext";
21
22
  import { useAddressLocationList } from "../../hooks";
22
23
  import { DeleteAddressLocationDrawer } from "../DeleteAddressLocationDrawer/DeleteAddressLocationDrawer";
23
24
  import { EditAddressLocationDrawer } from "../EditAddressLocationDrawer/EditAddressLocationDrawer";
@@ -47,11 +48,16 @@ export const AddressLocationsList = forwardRef<
47
48
  total = 0,
48
49
  search = "",
49
50
  page = 1,
50
- locationsLabel = "Locations",
51
+ locationsLabel,
51
52
  onOpenAddDrawer,
52
53
  }: AddressLocationsListProps,
53
54
  ref
54
55
  ) => {
56
+ const { t } = useLocalization();
57
+
58
+ const resolvedLocationsLabel =
59
+ locationsLabel ?? t("addresses.labels.locations");
60
+
55
61
  const {
56
62
  isLoading,
57
63
  items: locations,
@@ -114,6 +120,7 @@ export const AddressLocationsList = forwardRef<
114
120
 
115
121
  const columns = getTableColumns({
116
122
  actionsLength: 2,
123
+ nameColumnLabel: t("shared.labels.name"),
117
124
  });
118
125
 
119
126
  return (
@@ -132,14 +139,14 @@ export const AddressLocationsList = forwardRef<
132
139
  <EmptyState
133
140
  iconName="EmptyState"
134
141
  iconSize={56}
135
- title="No results found"
142
+ title={t("addresses.empty.noResults")}
136
143
  >
137
144
  <Button
138
145
  variant="primary"
139
146
  onClick={() => onOpenAddDrawer?.()}
140
147
  data-fs-bp-address-tabs-empty-state
141
148
  >
142
- Add locations
149
+ {t("addresses.buttons.addLocations")}
143
150
  </Button>
144
151
  </EmptyState>
145
152
  ) : (
@@ -188,7 +195,7 @@ export const AddressLocationsList = forwardRef<
188
195
  isOpen={isOpenEditLocation}
189
196
  location={selectedLocation}
190
197
  onEditSuccess={handleRefreshLocations}
191
- locationsLabel={locationsLabel}
198
+ locationsLabel={resolvedLocationsLabel}
192
199
  {...editLocationProps}
193
200
  />
194
201
  )}
@@ -198,7 +205,7 @@ export const AddressLocationsList = forwardRef<
198
205
  isOpen={isOpenDeleteLocation}
199
206
  location={selectedLocation}
200
207
  onDeleteSuccess={handleRefreshLocations}
201
- locationsLabel={locationsLabel}
208
+ locationsLabel={resolvedLocationsLabel}
202
209
  {...deleteLocationProps}
203
210
  />
204
211
  )}
@@ -208,7 +215,9 @@ export const AddressLocationsList = forwardRef<
208
215
  onClick={increasePage}
209
216
  disabled={isLoading}
210
217
  >
211
- {isLoading ? "Loading" : "Load More"}
218
+ {isLoading
219
+ ? t("shared.labels.loading")
220
+ : t("shared.buttons.loadMore")}
212
221
  </Paginator.NextPageButton>
213
222
  )}
214
223