diff --git a/packages/app-elements/i18n.d.ts b/packages/app-elements/i18n.d.ts deleted file mode 100644 index 926ea0a8..00000000 --- a/packages/app-elements/i18n.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import 'i18next' -import type translation from './src/locales/en.json' - -declare module 'i18next' { - interface CustomTypeOptions { - defaultNS: 'translation' - resources: { - translation: typeof translation - } - } -} diff --git a/packages/app-elements/src/dictionaries/customers.ts b/packages/app-elements/src/dictionaries/customers.ts index 8f58fff5..7c8236d9 100644 --- a/packages/app-elements/src/dictionaries/customers.ts +++ b/packages/app-elements/src/dictionaries/customers.ts @@ -10,35 +10,35 @@ export function getCustomerDisplayStatus( switch (customerObj.status) { case 'prospect': return { - label: t('common.resources.customers.status.prospect'), + label: t('resources.customers.attributes.status.prospect'), icon: 'chatCircle', color: 'orange', - task: t('common.resources.customers.status.prospect') + task: t('resources.customers.attributes.status.prospect') } case 'acquired': return { - label: t('common.resources.customers.status.acquired'), + label: t('resources.customers.attributes.status.acquired'), icon: 'check', color: 'orange', - task: t('common.resources.customers.status.acquired') + task: t('resources.customers.attributes.status.acquired') } case 'repeat': return { - label: t('common.resources.customers.status.repeat'), + label: t('resources.customers.attributes.status.repeat'), icon: 'arrowUpRight', color: 'orange', - task: t('common.resources.customers.status.repeat') + task: t('resources.customers.attributes.status.repeat') } } } export function getCustomerStatusName(status: Customer['status']): string { const dictionary: Record = { - prospect: t('common.resources.customers.status.prospect'), - acquired: t('common.resources.customers.status.acquired'), - repeat: t('common.resources.customers.status.repeat') + prospect: t('resources.customers.attributes.status.prospect'), + acquired: t('resources.customers.attributes.status.acquired'), + repeat: t('resources.customers.attributes.status.repeat') } return dictionary[status] diff --git a/packages/app-elements/src/dictionaries/orders.ts b/packages/app-elements/src/dictionaries/orders.ts index da0d6349..b986c72e 100644 --- a/packages/app-elements/src/dictionaries/orders.ts +++ b/packages/app-elements/src/dictionaries/orders.ts @@ -15,10 +15,10 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { if (order.status === 'editing') { return { - label: t('common.resources.orders.status.editing'), + label: t('resources.orders.attributes.status.editing'), icon: 'pencilSimple', color: 'orange', - task: t('common.resources.orders.status.editing') + task: t('resources.orders.attributes.status.editing') } } @@ -32,49 +32,49 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { case 'placed:free:unfulfilled': case 'placed:free:not_required': return { - label: t('common.resources.orders.status.placed'), + label: t('resources.orders.attributes.status.placed'), icon: 'arrowDown', color: 'orange', - task: t('common.resources.orders.task.awaiting_approval') + task: t('apps.orders.task.awaiting_approval') } case 'placed:unpaid:unfulfilled': return { - label: t('common.resources.orders.status.placed'), + label: t('resources.orders.attributes.status.placed'), icon: 'x', color: 'red', - task: t('common.resources.orders.task.error_to_cancel') + task: t('apps.orders.task.error_to_cancel') } case 'approved:authorized:unfulfilled': case 'approved:authorized:not_required': return { - label: t('common.resources.orders.status.approved'), + label: t('resources.orders.attributes.status.approved'), icon: 'creditCard', color: 'orange', - task: t('common.resources.orders.task.payment_to_capture') + task: t('apps.orders.task.payment_to_capture') } case 'approved:paid:in_progress': case 'approved:partially_refunded:in_progress': return { - label: t('common.resources.orders.status.in_progress'), + label: t('resources.orders.attributes.status.in_progress'), icon: 'arrowClockwise', color: 'orange', - task: t('common.resources.orders.task.fulfillment_in_progress') + task: t('apps.orders.task.fulfillment_in_progress') } case 'approved:authorized:in_progress': return { - label: t('common.resources.orders.status.in_progress_manual'), + label: t('apps.orders.display_status.in_progress_manual'), icon: 'arrowClockwise', color: 'orange', - task: t('common.resources.orders.task.fulfillment_in_progress') + task: t('apps.orders.task.fulfillment_in_progress') } case 'approved:paid:fulfilled': return { - label: t('common.resources.orders.fulfillment_status.fulfilled'), + label: t('resources.orders.attributes.fulfillment_status.fulfilled'), icon: 'check', color: 'green' } @@ -82,7 +82,7 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { // TODO: This could be a gift-card and what If i do return? case 'approved:free:fulfilled': return { - label: t('common.resources.orders.fulfillment_status.fulfilled'), + label: t('resources.orders.attributes.fulfillment_status.fulfilled'), icon: 'check', color: 'green' } @@ -90,21 +90,23 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { case 'approved:paid:not_required': case 'approved:partially_refunded:not_required': return { - label: t('common.resources.orders.status.approved'), + label: t('resources.orders.attributes.status.approved'), icon: 'check', color: 'green' } case 'approved:free:not_required': return { - label: t('common.resources.orders.status.approved'), + label: t('resources.orders.attributes.status.approved'), icon: 'check', color: 'green' } case 'approved:partially_refunded:fulfilled': return { - label: t('common.resources.orders.payment_status.partially_refunded'), + label: t( + 'resources.orders.attributes.payment_status.partially_refunded' + ), icon: 'check', color: 'green' } @@ -115,14 +117,14 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { case 'cancelled:unpaid:unfulfilled': case 'cancelled:free:unfulfilled': return { - label: t('common.resources.orders.status.cancelled'), + label: t('resources.orders.attributes.status.cancelled'), icon: 'x', color: 'gray' } case 'cancelled:refunded:fulfilled': return { - label: t('common.resources.orders.status.cancelled'), + label: t('resources.orders.attributes.status.cancelled'), icon: 'x', color: 'gray' } @@ -131,14 +133,14 @@ export function getOrderDisplayStatus(order: Order): OrderDisplayStatus { case 'pending:authorized:unfulfilled': case 'pending:free:unfulfilled': return { - label: t('common.resources.orders.status.pending'), + label: t('resources.orders.attributes.status.pending'), icon: 'shoppingBag', color: 'white' } default: return { - label: `${t('common.resources.common.status.not_handled')}: (${combinedStatus})`, + label: `${t('common.not_handled')}: (${combinedStatus})`, icon: 'warning', color: 'white' } @@ -169,13 +171,13 @@ export function getOrderTransactionName( export function getOrderStatusName(status: Order['status']): string { const dictionary: Record = { - approved: t('common.resources.orders.status.approved'), - cancelled: t('common.resources.orders.status.cancelled'), - draft: t('common.resources.orders.status.draft'), - editing: t('common.resources.orders.status.editing'), - pending: t('common.resources.orders.status.pending'), - placed: t('common.resources.orders.status.placed'), - placing: t('common.resources.orders.status.placing') + approved: t('resources.orders.attributes.status.approved'), + cancelled: t('resources.orders.attributes.status.cancelled'), + draft: t('resources.orders.attributes.status.draft'), + editing: t('resources.orders.attributes.status.editing'), + pending: t('resources.orders.attributes.status.pending'), + placed: t('resources.orders.attributes.status.placed'), + placing: t('resources.orders.attributes.status.placing') } return dictionary[status] @@ -185,21 +187,23 @@ export function getOrderPaymentStatusName( status: Order['payment_status'] ): string { const dictionary: Record = { - authorized: t('common.resources.orders.payment_status.authorized'), - paid: t('common.resources.orders.payment_status.paid'), - unpaid: t('common.resources.orders.payment_status.unpaid'), - free: t('common.resources.orders.payment_status.free'), - voided: t('common.resources.orders.payment_status.voided'), - refunded: t('common.resources.orders.payment_status.refunded'), + authorized: t('resources.orders.attributes.payment_status.authorized'), + paid: t('resources.orders.attributes.payment_status.paid'), + unpaid: t('resources.orders.attributes.payment_status.unpaid'), + free: t('resources.orders.attributes.payment_status.free'), + voided: t('resources.orders.attributes.payment_status.voided'), + refunded: t('resources.orders.attributes.payment_status.refunded'), partially_authorized: t( - 'common.resources.orders.payment_status.partially_authorized' + 'resources.orders.attributes.payment_status.partially_authorized' + ), + partially_paid: t( + 'resources.orders.attributes.payment_status.partially_paid' ), - partially_paid: t('common.resources.orders.payment_status.partially_paid'), partially_refunded: t( - 'common.resources.orders.payment_status.partially_refunded' + 'resources.orders.attributes.payment_status.partially_refunded' ), partially_voided: t( - 'common.resources.orders.payment_status.partially_voided' + 'resources.orders.attributes.payment_status.partially_voided' ) } @@ -210,10 +214,16 @@ export function getOrderFulfillmentStatusName( status: Order['fulfillment_status'] ): string { const dictionary: Record = { - unfulfilled: t('common.resources.orders.fulfillment_status.unfulfilled'), - in_progress: t('common.resources.orders.fulfillment_status.in_progress'), - fulfilled: t('common.resources.orders.fulfillment_status.fulfilled'), - not_required: t('common.resources.orders.fulfillment_status.not_required') + unfulfilled: t( + 'resources.orders.attributes.fulfillment_status.unfulfilled' + ), + in_progress: t( + 'resources.orders.attributes.fulfillment_status.in_progress' + ), + fulfilled: t('resources.orders.attributes.fulfillment_status.fulfilled'), + not_required: t( + 'resources.orders.attributes.fulfillment_status.not_required' + ) } return dictionary[status] diff --git a/packages/app-elements/src/dictionaries/promotions.ts b/packages/app-elements/src/dictionaries/promotions.ts index 85d5824a..8690468f 100644 --- a/packages/app-elements/src/dictionaries/promotions.ts +++ b/packages/app-elements/src/dictionaries/promotions.ts @@ -13,7 +13,7 @@ export function getPromotionDisplayStatus( if (promotion.disabled_at != null) { return { status: 'disabled', - label: t('common.resources.promotions.status.disabled'), + label: t('resources.promotions.attributes.status.disabled'), icon: 'minus', color: 'lightGray' } @@ -30,7 +30,7 @@ export function getPromotionDisplayStatus( ) { return { status: 'used', - label: t('common.resources.promotions.status.expired'), + label: t('resources.promotions.attributes.status.expired'), icon: 'flag', color: 'gray' } @@ -40,7 +40,7 @@ export function getPromotionDisplayStatus( case 'past': return { status: 'expired', - label: t('common.resources.promotions.status.expired'), + label: t('resources.promotions.attributes.status.expired'), icon: 'flag', color: 'gray' } @@ -48,7 +48,7 @@ export function getPromotionDisplayStatus( case 'upcoming': return { status: 'upcoming', - label: t('common.resources.promotions.status.upcoming'), + label: t('resources.promotions.attributes.status.upcoming'), icon: 'calendarBlank', color: 'gray' } @@ -56,7 +56,7 @@ export function getPromotionDisplayStatus( case 'active': return { status: 'active', - label: t('common.resources.promotions.status.active'), + label: t('resources.promotions.attributes.status.active'), icon: 'pulse', color: 'green' } diff --git a/packages/app-elements/src/dictionaries/returns.ts b/packages/app-elements/src/dictionaries/returns.ts index c9546dee..16c047b7 100644 --- a/packages/app-elements/src/dictionaries/returns.ts +++ b/packages/app-elements/src/dictionaries/returns.ts @@ -14,59 +14,59 @@ export function getReturnDisplayStatus(returnObj: Return): ReturnDisplayStatus { switch (returnObj.status) { case 'requested': return { - label: t('common.resources.returns.status.requested'), + label: t('resources.returns.attributes.status.requested'), icon: 'chatCircle', color: 'orange', - task: t('common.resources.returns.status.requested') + task: t('resources.returns.attributes.status.requested') } case 'approved': return { - label: t('common.resources.returns.status.approved'), + label: t('resources.returns.attributes.status.approved'), icon: 'check', color: 'orange', - task: t('common.resources.returns.status.approved') + task: t('resources.returns.attributes.status.approved') } case 'shipped': return { - label: t('common.resources.returns.status.shipped'), + label: t('resources.returns.attributes.status.shipped'), icon: 'arrowUpRight', color: 'orange', - task: t('common.resources.returns.status.shipped') + task: t('resources.returns.attributes.status.shipped') } case 'received': return { - label: t('common.resources.returns.status.received'), + label: t('resources.returns.attributes.status.received'), icon: 'check', color: 'green' } case 'cancelled': return { - label: t('common.resources.returns.status.cancelled'), + label: t('resources.returns.attributes.status.cancelled'), icon: 'x', color: 'gray' } case 'rejected': return { - label: t('common.resources.returns.status.rejected'), + label: t('resources.returns.attributes.status.rejected'), icon: 'x', color: 'red' } case 'refunded': return { - label: t('common.resources.returns.status.refunded'), + label: t('resources.returns.attributes.status.refunded'), icon: 'creditCard', color: 'green' } default: return { - label: `${t('common.resources.common.status.not_handled')}: (${returnObj.status})`, + label: `${t('common.not_handled')}: (${returnObj.status})`, icon: 'warning', color: 'white' } @@ -75,14 +75,14 @@ export function getReturnDisplayStatus(returnObj: Return): ReturnDisplayStatus { export function getReturnStatusName(status: Return['status']): string { const dictionary: Record = { - draft: t('common.resources.returns.status.draft'), - requested: t('common.resources.returns.status.requested'), - approved: t('common.resources.returns.status.approved'), - shipped: t('common.resources.returns.status.shipped'), - received: t('common.resources.returns.status.received'), - cancelled: t('common.resources.returns.status.cancelled'), - rejected: t('common.resources.returns.status.rejected'), - refunded: t('common.resources.returns.status.refunded') + draft: t('resources.returns.attributes.status.draft'), + requested: t('resources.returns.attributes.status.requested'), + approved: t('resources.returns.attributes.status.approved'), + shipped: t('resources.returns.attributes.status.shipped'), + received: t('resources.returns.attributes.status.received'), + cancelled: t('resources.returns.attributes.status.cancelled'), + rejected: t('resources.returns.attributes.status.rejected'), + refunded: t('resources.returns.attributes.status.refunded') } return dictionary[status] diff --git a/packages/app-elements/src/dictionaries/shipments.ts b/packages/app-elements/src/dictionaries/shipments.ts index 52fee2cd..ce3325ac 100644 --- a/packages/app-elements/src/dictionaries/shipments.ts +++ b/packages/app-elements/src/dictionaries/shipments.ts @@ -21,74 +21,74 @@ export function getShipmentDisplayStatus( switch (shipmentStatus) { case 'upcoming': return { - label: t('common.resources.shipments.status.upcoming'), + label: t('resources.shipments.attributes.status.upcoming'), icon: 'truck', color: 'gray' } case 'cancelled': return { - label: t('common.resources.shipments.status.cancelled'), + label: t('resources.shipments.attributes.status.cancelled'), icon: 'x', color: 'gray' } case 'draft': return { - label: t('common.resources.shipments.status.draft'), + label: t('resources.shipments.attributes.status.draft'), icon: 'minus', color: 'gray' } case 'on_hold': return { - label: t('common.resources.shipments.status.on_hold'), + label: t('resources.shipments.attributes.status.on_hold'), icon: 'hourglass', color: 'orange', - task: t('common.resources.shipments.status.on_hold') + task: t('resources.shipments.attributes.status.on_hold') } case 'packing': return { - label: t('common.resources.shipments.status.packing'), + label: t('resources.shipments.attributes.status.packing'), icon: 'package', color: 'orange', - task: t('common.resources.shipments.status.packing') + task: t('resources.shipments.attributes.status.packing') } case 'picking': return { - label: t('common.resources.shipments.status.picking'), + label: t('resources.shipments.attributes.status.picking'), icon: 'arrowDown', color: 'orange', - task: t('common.resources.shipments.status.picking') + task: t('resources.shipments.attributes.status.picking') } case 'ready_to_ship': return { - label: t('common.resources.shipments.status.ready_to_ship'), + label: t('resources.shipments.attributes.status.ready_to_ship'), icon: 'arrowUpRight', color: 'orange', - task: t('common.resources.shipments.status.ready_to_ship') + task: t('resources.shipments.attributes.status.ready_to_ship') } case 'shipped': return { - label: t('common.resources.shipments.status.shipped'), + label: t('resources.shipments.attributes.status.shipped'), icon: 'arrowUpRight', color: 'green' } case 'delivered': return { - label: t('common.resources.shipments.status.delivered'), + label: t('resources.shipments.attributes.status.delivered'), icon: 'check', color: 'green' } case 'awaiting_stock_transfer': return { - label: t('common.resources.shipments.status.awaiting_stock_transfer'), + label: t('apps.shipments.details.awaiting_stock_transfer'), icon: 'hourglass', color: 'orange', task: 'Awaiting stock transfers' @@ -96,7 +96,7 @@ export function getShipmentDisplayStatus( default: return { - label: `${t('common.resources.common.status.not_handled')}: (${shipment.status})`, + label: `${t('common.not_handled')}: (${shipment.status})`, icon: 'warning', color: 'white' } @@ -105,15 +105,15 @@ export function getShipmentDisplayStatus( export function getShipmentStatusName(status: Shipment['status']): string { const dictionary: Record = { - draft: t('common.resources.shipments.status.draft'), - on_hold: t('common.resources.shipments.status.on_hold'), - upcoming: t('common.resources.shipments.status.upcoming'), - packing: t('common.resources.shipments.status.packing'), - picking: t('common.resources.shipments.status.picking'), - ready_to_ship: t('common.resources.shipments.status.ready_to_ship'), - shipped: t('common.resources.shipments.status.shipped'), - cancelled: t('common.resources.shipments.status.cancelled'), - delivered: t('common.resources.shipments.status.delivered') + draft: t('resources.shipments.attributes.status.draft'), + on_hold: t('resources.shipments.attributes.status.on_hold'), + upcoming: t('resources.shipments.attributes.status.upcoming'), + packing: t('resources.shipments.attributes.status.packing'), + picking: t('resources.shipments.attributes.status.picking'), + ready_to_ship: t('resources.shipments.attributes.status.ready_to_ship'), + shipped: t('resources.shipments.attributes.status.shipped'), + cancelled: t('resources.shipments.attributes.status.cancelled'), + delivered: t('resources.shipments.attributes.status.delivered') } return dictionary[status] diff --git a/packages/app-elements/src/dictionaries/stockTransfers.ts b/packages/app-elements/src/dictionaries/stockTransfers.ts index efbd22e5..476abc32 100644 --- a/packages/app-elements/src/dictionaries/stockTransfers.ts +++ b/packages/app-elements/src/dictionaries/stockTransfers.ts @@ -16,53 +16,53 @@ export function getStockTransferDisplayStatus( switch (stockTransfer.status) { case 'upcoming': return { - label: t('common.resources.stock_transfers.status.upcoming'), + label: t('resources.stock_transfers.attributes.status.upcoming'), icon: 'arrowUpRight', color: 'orange', - task: t('common.resources.stock_transfers.status.upcoming') + task: t('resources.stock_transfers.attributes.status.upcoming') } case 'on_hold': return { - label: t('common.resources.stock_transfers.status.on_hold'), + label: t('resources.stock_transfers.attributes.status.on_hold'), icon: 'hourglass', color: 'orange', - task: t('common.resources.stock_transfers.status.on_hold') + task: t('resources.stock_transfers.attributes.status.on_hold') } case 'picking': return { - label: t('common.resources.stock_transfers.status.picking'), + label: t('resources.stock_transfers.attributes.status.picking'), icon: 'arrowDown', color: 'orange', - task: t('common.resources.stock_transfers.status.picking') + task: t('resources.stock_transfers.attributes.status.picking') } case 'in_transit': return { - label: t('common.resources.stock_transfers.status.in_transit'), + label: t('resources.stock_transfers.attributes.status.in_transit'), icon: 'arrowsLeftRight', color: 'orange', - task: t('common.resources.stock_transfers.status.in_transit') + task: t('resources.stock_transfers.attributes.status.in_transit') } case 'completed': return { - label: t('common.resources.stock_transfers.status.completed'), + label: t('resources.stock_transfers.attributes.status.completed'), icon: 'check', color: 'green' } case 'cancelled': return { - label: t('common.resources.stock_transfers.status.cancelled'), + label: t('resources.stock_transfers.attributes.status.cancelled'), icon: 'x', color: 'gray' } default: return { - label: `${t('common.resources.common.status.not_handled')}: (${stockTransfer.status})`, + label: `${t('common.not_handled')}: (${stockTransfer.status})`, icon: 'warning', color: 'white' } @@ -73,13 +73,13 @@ export function getStockTransferStatusName( status: StockTransfer['status'] ): string { const dictionary: Record = { - cancelled: t('common.resources.stock_transfers.status.cancelled'), - completed: t('common.resources.stock_transfers.status.completed'), - draft: t('common.resources.stock_transfers.status.draft'), - in_transit: t('common.resources.stock_transfers.status.in_transit'), - on_hold: t('common.resources.stock_transfers.status.on_hold'), - picking: t('common.resources.stock_transfers.status.picking'), - upcoming: t('common.resources.stock_transfers.status.upcoming') + cancelled: t('resources.stock_transfers.attributes.status.cancelled'), + completed: t('resources.stock_transfers.attributes.status.completed'), + draft: t('resources.stock_transfers.attributes.status.draft'), + in_transit: t('resources.stock_transfers.attributes.status.in_transit'), + on_hold: t('resources.stock_transfers.attributes.status.on_hold'), + picking: t('resources.stock_transfers.attributes.status.picking'), + upcoming: t('resources.stock_transfers.attributes.status.upcoming') } return dictionary[status] diff --git a/packages/app-elements/src/hooks/useEditTagsOverlay.tsx b/packages/app-elements/src/hooks/useEditTagsOverlay.tsx index f6bcb69f..0b3133f1 100644 --- a/packages/app-elements/src/hooks/useEditTagsOverlay.tsx +++ b/packages/app-elements/src/hooks/useEditTagsOverlay.tsx @@ -54,7 +54,7 @@ export function useEditTagsOverlay(): TagsOverlayHook { } }) - const resourceName = t('common.resources.tags.name_other') + const resourceName = t('resources.tags.name_other') return { show: open, @@ -156,7 +156,7 @@ export function useEditTagsOverlay(): TagsOverlayHook { showManageAction != null && showManageAction ? [ { - label: t('common.manage', { + label: t('common.manage_resource', { resource: resourceName.toLowerCase() }), variant: 'secondary', diff --git a/packages/app-elements/src/locales/en.json b/packages/app-elements/src/locales/en.json deleted file mode 100644 index e55f7ec0..00000000 --- a/packages/app-elements/src/locales/en.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "common": { - "all": "All {{resource}}", - "all_female": "All {{resource}}", - "not_handled": "Not handled", - "edit": "Edit {{resource}}", - "manage": "Manage {{resource}}", - "new": "New {{resource}}", - "new_female": "New {{resource}}", - "metadata": "Metadata", - "search": "Search...", - "limit_reached": "Limit reached", - "add_up_to": "You can add up to {{limit}} {{resource}}.", - "update": "Update", - "resources": { - "common": { - "status": { - "not_handled": "Not handled" - } - }, - "bundles": { - "name": "Bundle", - "name_plural": "Bundles", - "status": {} - }, - "customers": { - "name": "Customer", - "name_plural": "Customers", - "status": { - "prospect": "Prospect", - "acquired": "Acquired", - "repeat": "Repeat" - } - }, - "orders": { - "name": "Order", - "name_plural": "Orders", - "status": { - "approved": "Approved", - "cancelled": "Cancelled", - "draft": "Draft", - "editing": "Editing", - "pending": "Pending", - "placed": "Placed", - "placing": "Placing", - "in_progress": "In progress", - "in_progress_manual": "In progress (Manual)" - }, - "payment_status": { - "authorized": "Authorized", - "paid": "Paid", - "unpaid": "Unpaid", - "free": "Free", - "voided": "Voided", - "refunded": "Refunded", - "partially_authorized": "Part. authorized", - "partially_paid": "Part. paid", - "partially_refunded": "Part. refunded", - "partially_voided": "Part. voided" - }, - "fulfillment_status": { - "unfulfilled": "Unfulfilled", - "in_progress": "In progress", - "fulfilled": "Fulfilled", - "not_required": "Not required" - }, - "task": { - "awaiting_approval": "Awaiting approval", - "error_to_cancel": "Error to cancel", - "payment_to_capture": "Payment to capture", - "fulfillment_in_progress": "Fulfillment in progress" - } - }, - "promotions": { - "name": "Promotion", - "name_plural": "Promotions", - "status": { - "active": "Active", - "disabled": "Disabled", - "expired": "Expired", - "inactive": "Inactive", - "pending": "Pending", - "upcoming": "Upcoming" - } - }, - "returns": { - "name": "Return", - "name_plural": "Returns", - "status": { - "approved": "Approved", - "cancelled": "Cancelled", - "draft": "Draft", - "requested": "Requested", - "received": "Received", - "rejected": "Rejected", - "refunded": "Refunded", - "shipped": "Shipped" - } - }, - "shipments": { - "name": "Shipment", - "name_plural": "Shipments", - "status": { - "awaiting_stock_transfer": "Awaiting stock transfer", - "cancelled": "Cancelled", - "delivered": "Delivered", - "draft": "Draft", - "on_hold": "On hold", - "packing": "Packing", - "picking": "Picking", - "ready_to_ship": "Ready to ship", - "shipped": "Shipped", - "upcoming": "Upcoming" - } - }, - "stock_transfers": { - "name": "Stock transfer", - "name_plural": "Stock transfers", - "status": { - "cancelled": "Cancelled", - "completed": "Completed", - "draft": "Draft", - "in_transit": "In transit", - "on_hold": "On hold", - "picking": "Picking", - "upcoming": "Upcoming" - } - }, - "tags": { - "name": "Tag", - "name_other": "Tags", - "status": {} - } - } - } -} \ No newline at end of file diff --git a/packages/app-elements/src/locales/en.ts b/packages/app-elements/src/locales/en.ts new file mode 100644 index 00000000..d871f196 --- /dev/null +++ b/packages/app-elements/src/locales/en.ts @@ -0,0 +1,239 @@ +import { + type ListableResourceType, + type ResourceFields +} from '@commercelayer/sdk' + +const resources = { + orders: { + name: 'Address', + name_other: 'Addresses', + attributes: { + number: 'numero ordine' + } + }, + customers: { + name: 'Customer', + name_other: 'Customers', + attributes: { + email: 'indirizzo mail' + } + } +} satisfies { + [key in ListableResourceType]?: { + name: string + name_other: string + attributes: { + [attr in keyof ResourceFields[key]]?: string + } + } +} + +const en = { + common: { + add_up_to: 'You can add up to {{limit}} {{resource}}.', + all_items: 'All items', + back: 'Back', + edit: 'Edit', + filters: 'Filters', + limit_reached: 'Limit reached', + manage_resource: 'Manage {{resource}}', + metadata: 'Metadata', + new: 'New', + no_items: 'No items', + not_authorized: 'Not authorized', + not_handled: 'Not handled', + search: 'Search...', + timeline: 'Timeline', + update: 'Update', + updated: 'Updated' + }, + resources: { + adjustments: { + name: 'Adjustment', + name_other: 'Adjustments' + }, + bundles: { + name: 'Bundle', + name_other: 'Bundles' + }, + customers: { + name: 'Customer', + name_other: 'Customers', + attributes: { + status: { + prospect: 'Prospect', + acquired: 'Acquired', + repeat: 'Repeat' + } + } + }, + orders: { + name: 'Order', + name_other: 'Orders', + attributes: { + status: { + approved: 'Approved', + cancelled: 'Cancelled', + draft: 'Draft', + editing: 'Editing', + pending: 'Pending', + placed: 'Placed', + placing: 'Placing', + in_progress: 'In progress' + }, + payment_status: { + authorized: 'Authorized', + paid: 'Paid', + unpaid: 'Unpaid', + free: 'Free', + voided: 'Voided', + refunded: 'Refunded', + partially_authorized: 'Part. authorized', + partially_paid: 'Part. paid', + partially_refunded: 'Part. refunded', + partially_voided: 'Part. voided' + }, + fulfillment_status: { + unfulfilled: 'Unfulfilled', + in_progress: 'In progress', + fulfilled: 'Fulfilled', + not_required: 'Not required' + }, + billing_address: 'Billing address', + shipping_address: 'Shipping address' + } + }, + gift_cards: { + name: 'Gift card', + name_other: 'Gift cards' + }, + promotions: { + name: 'Promotion', + name_other: 'Promotions', + attributes: { + status: { + active: 'Active', + disabled: 'Disabled', + expired: 'Expired', + inactive: 'Inactive', + pending: 'Pending', + upcoming: 'Upcoming' + } + } + }, + returns: { + name: 'Return', + name_other: 'Returns', + attributes: { + status: { + approved: 'Approved', + cancelled: 'Cancelled', + draft: 'Draft', + requested: 'Requested', + received: 'Received', + rejected: 'Rejected', + refunded: 'Refunded', + shipped: 'Shipped' + } + } + }, + shipments: { + name: 'Shipment', + name_other: 'Shipments', + attributes: { + status: { + cancelled: 'Cancelled', + delivered: 'Delivered', + draft: 'Draft', + on_hold: 'On hold', + packing: 'Packing', + picking: 'Picking', + ready_to_ship: 'Ready to ship', + shipped: 'Shipped', + upcoming: 'Upcoming' + } + } + }, + stock_transfers: { + name: 'Stock transfer', + name_other: 'Stock transfers', + attributes: { + status: { + cancelled: 'Cancelled', + completed: 'Completed', + draft: 'Draft', + in_transit: 'In transit', + on_hold: 'On hold', + picking: 'Picking', + upcoming: 'Upcoming' + } + } + }, + tags: { + name: 'Tag', + name_other: 'Tags' + } + }, + apps: { + orders: { + attributes: { + status: 'Status', + payment_status: 'Payment status', + fulfillment_status: 'Fulfillment status' + }, + display_status: { + in_progress: 'In progress', + in_progress_manual: 'In progress (Manual)' + }, + task: { + open: 'Open', + browse: 'Browse', + awaiting_approval: 'Awaiting approval', + error_to_cancel: 'Error to cancel', + payment_to_capture: 'Payment to capture', + fulfillment_in_progress: 'Fulfillment in progress', + editing: 'Editing', + history: 'Order history', + carts: 'Carts', + archived: 'Archived' + }, + details: { + summary: 'Summary', + to_be_calculated: 'To be calculated', + shipping: 'Shipping', + subtotal: 'Subtotal', + total: 'Total', + payment_method: 'Payment method', + taxes: 'Taxes', + included: 'included', + discount: 'Discount', + fulfillment: 'Fulfillment', + payment: 'Payment', + adjust_total: 'Adjust total' + }, + actions: { + add_item: 'Add item', + approve: 'Approve', + archive: 'Archive', + cancel_transactions: 'Cancel payment', + cancel: 'Cancel order', + capture: 'Capture payment', + place: 'Place order', + refund: 'Refund', + unarchive: 'Unarchive', + select_address: 'Select address' + } + }, + shipments: { + details: { + awaiting_stock_transfer: 'Awaiting stock transfer' + } + } + }, + validation: { + select_one_item: 'Please select at least one item' + }, + res: resources +} + +export default en diff --git a/packages/app-elements/src/locales/it.json b/packages/app-elements/src/locales/it.json deleted file mode 100644 index d6394fd4..00000000 --- a/packages/app-elements/src/locales/it.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "common": { - "all": "Tutti {{resource}}", - "all_female": "Tutte {{resource}}", - "not_handled": "Non gestito", - "edit": "Modifica {{resource}}", - "manage": "Gestisci {{resource}}", - "new_resource": "Nuovo {{resource}}", - "new_resource_female": "Nuova {{resource}}", - "metadata": "Metadati", - "search": "Cerca...", - "limit_reached": "Limite raggiunto", - "add_up_to": "Puoi aggiungere fino a {{limit}} {{resource}}.", - "update": "Aggiorna", - "resources": { - "common": { - "status": { - "not_handled": "Non gestito" - } - }, - "bundles": { - "name": "Bundle", - "name_plural": "Bundles", - "status": {} - }, - "customers": { - "name": "Customer", - "name_plural": "Customers", - "status": { - "prospect": "Potenziale", - "acquired": "Acquisito", - "repeat": "Abituale" - } - }, - "orders": { - "name": "Ordine", - "name_plural": "Ordini", - "status": { - "approved": "Approvato", - "cancelled": "Cancellato", - "draft": "Bozza", - "editing": "In modifica", - "pending": "In attesa", - "placed": "Piazzato", - "placing": "In piazzamento", - "in_progress": "In corso", - "in_progress_manual": "In corso (Manuale)" - }, - "payment_status": { - "authorized": "Autorizzato", - "paid": "Pagato", - "unpaid": "Non pagato", - "free": "Gratuito", - "voided": "Annullato", - "refunded": "Rimborsato", - "partially_authorized": "Parz. autorizzato", - "partially_paid": "Parz. pagato", - "partially_refunded": "Parz. rimborsato", - "partially_voided": "Parz. annullato" - }, - "fulfillment_status": { - "unfulfilled": "Non evaso", - "in_progress": "In corso", - "fulfilled": "Evaso", - "not_required": "Non richiesto" - }, - "task": { - "awaiting_approval": "In attesa di approvazione", - "error_to_cancel": "Errore nella cancellazione", - "payment_to_capture": "Pagamento da catturare", - "fulfillment_in_progress": "Evasione in corso" - } - }, - "promotions": { - "name": "Promozione", - "name_plural": "Promozioni", - "status": { - "active": "Attiva", - "disabled": "Disabilitata", - "expired": "Scaduta", - "inactive": "Inattiva", - "pending": "In attesa", - "upcoming": "Imminente" - } - }, - "returns": { - "name": "Reso", - "name_plural": "Resi", - "status": { - "approved": "Approvato", - "cancelled": "Cancellato", - "draft": "Bozza", - "requested": "Richiesto", - "received": "Ricevuto", - "refunded": "Rimborsato", - "rejected": "Rifiutato", - "shipped": "Spedito" - } - }, - "shipments": { - "name": "Spedizione", - "name_plural": "Spedizioni", - "status": { - "awaiting_stock_transfer": "In attesa di trasferimento di magazzino", - "cancelled": "Cancellato", - "delivered": "Consegnato", - "draft": "Bozza", - "on_hold": "In attesa", - "packing": "In imballaggio", - "picking": "In prelievo", - "ready_to_ship": "Pronto per la spedizione", - "shipped": "Spedito", - "upcoming": "Imminente" - } - }, - "stock_transfers": { - "name": "Trasferimento di magazzino", - "name_plural": "Trasferimenti di magazzino", - "status": { - "cancelled": "Cancellato", - "completed": "Completato", - "draft": "Bozza", - "in_transit": "In transito", - "on_hold": "In attesa", - "picking": "In prelievo", - "upcoming": "Imminente" - } - }, - "tags": { - "name": "Tag", - "name_other": "Tag", - "status": {} - } - } - } -} \ No newline at end of file diff --git a/packages/app-elements/src/locales/it.ts b/packages/app-elements/src/locales/it.ts new file mode 100644 index 00000000..d9f44266 --- /dev/null +++ b/packages/app-elements/src/locales/it.ts @@ -0,0 +1,226 @@ +import type en from './en' + +const it: typeof en = { + common: { + all_items: 'Tutti gli elementi', + not_handled: 'Non gestito', + back: 'Torna indietro', + new: 'Nuovo', + not_authorized: 'Non autorizzato', + no_items: 'Nessun elemento', + edit: 'Modifica', + manage_resource: 'Gestisci {{resource}}', + updated: 'Aggiornato', + timeline: 'Storico', + filters: 'Filtri', + metadata: 'Metadati', + search: 'Cerca...', + limit_reached: 'Limite raggiunto', + add_up_to: 'Puoi aggiungere fino a {{limit}} {{resource}}.', + update: 'Aggiorna' + }, + resources: { + adjustments: { + name: 'Rettifica', + name_other: 'Rettifiche' + }, + bundles: { + name: 'Bundle', + name_other: 'Bundles' + }, + customers: { + name: 'Cliente', + name_other: 'Clienti', + attributes: { + status: { + prospect: 'Potenziale', + acquired: 'Acquisito', + repeat: 'Abituale' + } + } + }, + orders: { + name: 'Ordine', + name_other: 'Ordini', + attributes: { + status: { + approved: 'Approvato', + cancelled: 'Cancellato', + draft: 'Bozza', + editing: 'In modifica', + pending: 'In attesa', + placed: 'Piazzato', + placing: 'In piazzamento', + in_progress: 'In corso' + }, + payment_status: { + authorized: 'Autorizzato', + paid: 'Pagato', + unpaid: 'Non pagato', + free: 'Gratuito', + voided: 'Annullato', + refunded: 'Rimborsato', + partially_authorized: 'Parz. autorizzato', + partially_paid: 'Parz. pagato', + partially_refunded: 'Parz. rimborsato', + partially_voided: 'Parz. annullato' + }, + fulfillment_status: { + unfulfilled: 'Non evaso', + in_progress: 'In corso', + fulfilled: 'Evaso', + not_required: 'Non richiesto' + }, + billing_address: 'Indirizzo di fatturazione', + shipping_address: 'Indirizzo di spedizione' + } + }, + gift_cards: { + name: 'Carta regalo', + name_other: 'Carte regalo' + }, + promotions: { + name: 'Promozione', + name_other: 'Promozioni', + attributes: { + status: { + active: 'Attiva', + disabled: 'Disabilitata', + expired: 'Scaduta', + inactive: 'Inattiva', + pending: 'In attesa', + upcoming: 'Imminente' + } + } + }, + returns: { + name: 'Reso', + name_other: 'Resi', + attributes: { + status: { + approved: 'Approvato', + cancelled: 'Cancellato', + draft: 'Bozza', + requested: 'Richiesto', + received: 'Ricevuto', + refunded: 'Rimborsato', + rejected: 'Rifiutato', + shipped: 'Spedito' + } + } + }, + shipments: { + name: 'Spedizione', + name_other: 'Spedizioni', + attributes: { + status: { + cancelled: 'Cancellato', + delivered: 'Consegnato', + draft: 'Bozza', + on_hold: 'In attesa', + packing: 'In imballaggio', + picking: 'In prelievo', + ready_to_ship: 'Pronto per la spedizione', + shipped: 'Spedito', + upcoming: 'Imminente' + } + } + }, + stock_transfers: { + name: 'Trasferimento di magazzino', + name_other: 'Trasferimenti di magazzino', + attributes: { + status: { + cancelled: 'Cancellato', + completed: 'Completato', + draft: 'Bozza', + in_transit: 'In transito', + on_hold: 'In attesa', + picking: 'In prelievo', + upcoming: 'Imminente' + } + } + }, + tags: { + name: 'Tag', + name_other: 'Tag' + } + }, + validation: { + select_one_item: 'Seleziona almeno un elemento' + }, + res: { + orders: { + name: '', + name_other: '', + attributes: { + number: '' + } + }, + customers: { + name: '', + name_other: '', + attributes: { + email: '' + } + } + }, + apps: { + orders: { + attributes: { + status: 'Stato', + payment_status: 'Stato pagamento', + fulfillment_status: 'Stato evasione' + }, + display_status: { + in_progress: 'In corso', + in_progress_manual: 'In corso (Manuale)' + }, + task: { + open: 'Aperti', + browse: 'Sfoglia', + awaiting_approval: 'In attesa di approvazione', + error_to_cancel: 'Errore nella cancellazione', + payment_to_capture: 'Pagamento da catturare', + fulfillment_in_progress: 'Evasione in corso', + editing: 'In modifica', + history: 'Tutti gli ordini', + carts: 'Carrelli', + archived: 'Archiviati' + }, + details: { + summary: 'Riepilogo', + to_be_calculated: 'Da calcolare', + shipping: 'Spedizione', + subtotal: 'Totale parziale', + total: 'Totale', + payment_method: 'Metodo di pagamento', + taxes: 'Tasse', + included: 'incluse', + discount: 'Sconto', + fulfillment: 'Evasione', + payment: 'Pagamento', + adjust_total: 'Aggiusta totale' + }, + actions: { + add_item: 'Aggiungi prodotto', + approve: 'Approva', + archive: 'Archivia', + cancel_transactions: 'Annulla pagamento', + cancel: 'Annulla ordine', + capture: 'Cattura pagamento', + place: 'Piazza ordine', + refund: 'Rimborsa', + unarchive: 'Ripristina', + select_address: 'Seleziona indirizzo' + } + }, + shipments: { + details: { + awaiting_stock_transfer: 'In attesa di trasferimento di magazzino' + } + } + } +} + +export default it diff --git a/packages/app-elements/src/main.ts b/packages/app-elements/src/main.ts index a890fcab..07dc1386 100644 --- a/packages/app-elements/src/main.ts +++ b/packages/app-elements/src/main.ts @@ -62,16 +62,16 @@ export { createApp, type ClAppKey, type ClAppProps } from '#providers/createApp' export { ErrorBoundary } from '#providers/ErrorBoundary' export { GTMProvider, useTagManager } from '#providers/GTMProvider' export { + i18nLocales, I18NProvider, - initI18n, - languages, + t, useTranslation, type I18NLocale } from '#providers/I18NProvider' export { + encodeExtras, MetaTags, TokenProvider, - encodeExtras, useTokenProvider, type TokenProviderAllowedApp, type TokenProviderExtras, @@ -180,10 +180,10 @@ export { PageLayout, type PageLayoutProps } from '#ui/composite/PageLayout' export { PageSkeleton } from '#ui/composite/PageSkeleton' export { Report, type ReportProps } from '#ui/composite/Report' export { - GenericPageNotFound, - Routes, createRoute, createTypedRoute, + GenericPageNotFound, + Routes, type GetParams, type PageProps, type Route @@ -223,9 +223,9 @@ export { type InputCheckboxGroupProps } from '#ui/forms/InputCheckboxGroup' export { + formatCentsToCurrency, HookedInputCurrency, InputCurrency, - formatCentsToCurrency, type HookedInputCurrencyProps, type InputCurrencyProps } from '#ui/forms/InputCurrency' @@ -262,10 +262,10 @@ export { type InputResourceGroupProps } from '#ui/forms/InputResourceGroup' export { - HookedInputSelect, - InputSelect, flatSelectValues, getDefaultValueFromFlatten, + HookedInputSelect, + InputSelect, isGroupedSelectValues, isMultiValueSelected, isSingleValueSelected, @@ -317,9 +317,9 @@ export { } from '#ui/forms/ReactHookForm' // Resources export { + getResourceAddressFormFieldsSchema, ResourceAddress, ResourceAddressFormFields, - getResourceAddressFormFieldsSchema, useResourceAddressOverlay, type ResourceAddressFormFieldsProps, type ResourceAddressProps @@ -345,8 +345,8 @@ export { type ResourceOrderTimelineProps } from '#ui/resources/ResourceOrderTimeline' export { - ResourcePaymentMethod, getPaymentMethodLogoSrc, + ResourcePaymentMethod, type ResourcePaymentMethodProps } from '#ui/resources/ResourcePaymentMethod' export { diff --git a/packages/app-elements/src/providers/I18NProvider.tsx b/packages/app-elements/src/providers/I18NProvider.tsx new file mode 100644 index 00000000..32eabc8d --- /dev/null +++ b/packages/app-elements/src/providers/I18NProvider.tsx @@ -0,0 +1,85 @@ +import i18n, { type i18n as I18nInstance } from 'i18next' +import LanguageDetector from 'i18next-browser-languagedetector' +import resourcesToBackend from 'i18next-resources-to-backend' +import React, { type ReactNode, useEffect, useState } from 'react' +import { I18nextProvider, initReactI18next } from 'react-i18next' +import type en from '../locales/en' + +export { t } from 'i18next' +export { useTranslation } from 'react-i18next' + +export const i18nLocales = ['en', 'it'] as const +export type I18NLocale = (typeof i18nLocales)[number] + +declare module 'i18next' { + interface CustomTypeOptions { + defaultNS: 'translation' + resources: { + translation: typeof en + } + } +} + +interface I18NProviderProps { + localeCode?: I18NLocale + children: ReactNode +} + +export const I18NProvider: React.FC = ({ + localeCode = i18nLocales[0], + children +}) => { + const [i18nInstance, setI18nInstance] = useState() + + useEffect(() => { + const setupI18n = async (): Promise => { + try { + const instance = await initI18n(localeCode) + if (instance.isInitialized) { + setI18nInstance(instance) + } + } catch (error) { + console.error('Error initializing i18n:', error) + } + } + + if ( + i18nInstance == null || + (i18nInstance != null && !i18nInstance.isInitialized) + ) { + void setupI18n() + } + }, [localeCode, i18nInstance]) + + if ( + i18nInstance == null || + (i18nInstance != null && !i18nInstance.isInitialized) + ) { + return
Loading i18n
+ } + + return {children} +} + +const initI18n = async (localeCode: I18NLocale): Promise => { + await i18n + .use( + resourcesToBackend( + async (language: I18NLocale) => + await import(`../../locales/${language}.ts`) + ) + ) + .use(LanguageDetector) + .use(initReactI18next) + .init({ + load: 'languageOnly', + supportedLngs: i18nLocales, + lng: localeCode, + fallbackLng: i18nLocales[0], + react: { + useSuspense: true + }, + debug: true + }) + return i18n +} diff --git a/packages/app-elements/src/providers/I18NProvider/I18NProvider.tsx b/packages/app-elements/src/providers/I18NProvider/I18NProvider.tsx deleted file mode 100644 index 8c06f934..00000000 --- a/packages/app-elements/src/providers/I18NProvider/I18NProvider.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import { - type I18NLocale, - initI18n, - languages -} from '#providers/I18NProvider/i18n' -import { type i18n as I18nInstance } from 'i18next' -import React, { type ReactNode, useEffect, useState } from 'react' -import { I18nextProvider } from 'react-i18next' - -export { useTranslation } from 'react-i18next' - -interface I18NProviderProps { - localeCode?: I18NLocale - children: ReactNode -} - -export const I18NProvider: React.FC = ({ - localeCode = languages[0], - children -}) => { - const [i18nInstance, setI18nInstance] = useState() - - useEffect(() => { - const setupI18n = async (): Promise => { - try { - const instance = await initI18n(localeCode) - if (instance.isInitialized) { - setI18nInstance(instance) - } - } catch (error) { - console.error('Error initializing i18n:', error) - } - } - - if ( - i18nInstance == null || - (i18nInstance != null && !i18nInstance.isInitialized) - ) { - void setupI18n() - } - }, [localeCode, i18nInstance]) - - if ( - i18nInstance == null || - (i18nInstance != null && !i18nInstance.isInitialized) - ) { - return
Loading i18n
- } - - return {children} -} diff --git a/packages/app-elements/src/providers/I18NProvider/i18n.ts b/packages/app-elements/src/providers/I18NProvider/i18n.ts deleted file mode 100644 index 722f5483..00000000 --- a/packages/app-elements/src/providers/I18NProvider/i18n.ts +++ /dev/null @@ -1,33 +0,0 @@ -import i18n, { type i18n as I18nInstance } from 'i18next' -import LanguageDetector from 'i18next-browser-languagedetector' -import resourcesToBackend from 'i18next-resources-to-backend' -import { initReactI18next } from 'react-i18next' - -export const languages = ['en', 'it'] as const - -export type I18NLocale = (typeof languages)[number] - -export const initI18n = async ( - localeCode: I18NLocale -): Promise => { - await i18n - .use( - resourcesToBackend( - async (language: I18NLocale) => - await import(`../../locales/${language}.json`) - ) - ) - .use(LanguageDetector) - .use(initReactI18next) - .init({ - load: 'languageOnly', - supportedLngs: languages, - lng: localeCode, - fallbackLng: languages[0], - react: { - useSuspense: true - }, - debug: true - }) - return i18n -} diff --git a/packages/app-elements/src/providers/I18NProvider/index.tsx b/packages/app-elements/src/providers/I18NProvider/index.tsx deleted file mode 100644 index e3daad63..00000000 --- a/packages/app-elements/src/providers/I18NProvider/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export { initI18n, languages, type I18NLocale } from './i18n' -export { I18NProvider, useTranslation } from './I18NProvider' diff --git a/packages/app-elements/tsconfig.json b/packages/app-elements/tsconfig.json index 74e71d38..3630ac43 100644 --- a/packages/app-elements/tsconfig.json +++ b/packages/app-elements/tsconfig.json @@ -53,8 +53,7 @@ "vite.config.js", "src", "mocks", - ".eslintrc.cjs", - "i18n.d.ts" + ".eslintrc.cjs" ], "references": [ { diff --git a/packages/app-elements/vite.config.js b/packages/app-elements/vite.config.js index f37fe2d1..3f88a5f1 100644 --- a/packages/app-elements/vite.config.js +++ b/packages/app-elements/vite.config.js @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/explicit-function-return-type */ // @ts-check import react from '@vitejs/plugin-react' import { resolve } from 'path' diff --git a/packages/docs/src/stories/examples/I18n.stories.tsx b/packages/docs/src/stories/examples/I18n.stories.tsx index aa4b5cb1..5863594a 100644 --- a/packages/docs/src/stories/examples/I18n.stories.tsx +++ b/packages/docs/src/stories/examples/I18n.stories.tsx @@ -61,13 +61,14 @@ export const Default: StoryFn = (): JSX.Element => { /> - Translation of string common.all: {t('common.all')} + Translation of string common.all_items:{' '} + {t('common.all_items')} - Translation of string common.all_female:{' '} - {t('common.all_female')} + Translation of string common.search:{' '} + {t('common.search')}