Skip to content

Commit

Permalink
fix: replace translations
Browse files Browse the repository at this point in the history
  • Loading branch information
keellyp committed Aug 20, 2024
1 parent 6c95814 commit 93f57c2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/customers/CustomerInvoicesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export const CustomerInvoicesList: FC<CustomerInvoicesListProps> = ({
placement="top"
title={
!!paymentDisputeLostAt
? translate('TODO: This invoice contains a dispute lost')
? translate('text_172416478461328edo4vwz05')
: undefined
}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/invoices/InvoicesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const InvoicesList = ({
placement="top"
title={
!!paymentDisputeLostAt
? translate('TODO: This invoice contains a dispute lost')
? translate('text_172416478461328edo4vwz05')
: undefined
}
>
Expand Down
14 changes: 7 additions & 7 deletions src/layouts/CustomerInvoiceDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,21 @@ const getErrorMessageFromErrorDetails = (

if (errorCode === ErrorCodesEnum.TaxError) {
if (errorDetails === LagoApiError.CurrencyCodeNotSupported) {
return 'Currency defined is not supported for taxes calculation. Please contact the Lago team to resolve this issue.'
return 'text_17238318811308wqpult4i7r'
}

if (
errorDetails === LagoApiError.CustomerAddressCouldNotResolve ||
errorDetails === LagoApiError.CustomerAddressCountryNotSupported
) {
return 'Customer address information has issues preventing calculating taxes. Please update the information to generate the invoice.'
return 'text_1723831881130x4cfh6qr6o8'
}

if (errorDetails === LagoApiError.ProductExternalIdUnknown) {
return 'Anrok connection items mapping has issues preventing calculating taxes. Please update the mapping to generate the invoice.'
return 'text_1723831881130g8hv6qzqe57'
}

return 'An issue with your tax provider connection occurred. Please contact the Lago team to solve this issue.'
return 'text_17238318811307ghoc4v7mt9'
}
}

Expand Down Expand Up @@ -471,7 +471,7 @@ const CustomerInvoiceDetails = () => {
closePopper()
}}
>
{translate('TODO: Sync invoice')}
{translate('text_1724164767403kyknbaw13mg')}
</Button>
) : (
<>
Expand Down Expand Up @@ -646,10 +646,10 @@ const CustomerInvoiceDetails = () => {
>
<Stack>
<Typography variant="body" color="grey700">
Invoice could not be issued.
{translate('text_1724165657161stcilcabm7x')}
</Typography>

<Typography variant="caption">{errorMessage}</Typography>
<Typography variant="caption">{translate(errorMessage)}</Typography>
</Stack>
</Alert>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/InvoiceOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const InvoiceOverview = memo(
await retryInvoice()
}}
>
{translate('TODO: Sync invoice')}
{translate('text_1724164767403kyknbaw13mg')}
</Button>
) : (
!hasError &&
Expand Down
10 changes: 8 additions & 2 deletions translations/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,6 @@
"text_638f74bb4d41e3f1d0201647": "Drafted invoices",
"text_638f74bb4d41e3f1d0201649": "{{customerName}}’s draft invoices",
"text_638f74bb4d41e3f1d020164b": "{{count}} draft invoices",
"text_63a41a8eabb9ae67047c1bfe": "Draft",
"text_63a41a8eabb9ae67047c1c06": "Refresh invoice",
"text_63a41a8eabb9ae67047c1c08": "Finalize invoice",
"text_63a41a8eabb9ae67047c1c0c": "This invoice is in draft mode. You have until {{issuingDate}} to adjust it, or you can finalize it manually now.",
Expand Down Expand Up @@ -2342,5 +2341,12 @@
"text_66474fb55f1b6901c7ac7683": "It seems you don’t have the permission to access this page. If you think this is an error contact an admin of your organization.",
"text_665deda4babaf700d603ea13": "Leaving without saving",
"text_665dedd557dc3c00c62eb83d": "By clicking 'Leave', any unsaved data will be lost. Are you sure you want to continue?",
"text_668513bb1906740145e06abe": "Value already exist, please type a new one."
"text_668513bb1906740145e06abe": "Value already exist, please type a new one.",
"text_1724164767403kyknbaw13mg": "Sync invoice",
"text_172416478461328edo4vwz05": "This invoice contains a dispute lost",
"text_1724165657161stcilcabm7x": "Invoice could not be issued.",
"text_17238318811308wqpult4i7r": "Currency defined is not supported for taxes calculation. Please contact the Lago team to resolve this issue.",
"text_1723831881130x4cfh6qr6o8": "Customer address information has issues preventing calculating taxes. Please update the information to generate the invoice.",
"text_1723831881130g8hv6qzqe57": "Anrok connection items mapping has issues preventing calculating taxes. Please update the mapping to generate the invoice.",
"text_17238318811307ghoc4v7mt9": "An issue with your tax provider connection occurred. Please contact the Lago team to solve this issue."
}

0 comments on commit 93f57c2

Please sign in to comment.