diff --git a/.eslintrc.js b/.eslintrc.js index 6ec0a628c5..b0ff4927d4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -50,6 +50,7 @@ module.exports = { 'transform', 'filter', 'rel', + 'textShadow', ], }, ], diff --git a/README.md b/README.md index b903f6c428..9a7bb637f2 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,12 @@ The website for the [Regen Network](https://regen.network) decentralized infrast - [Storybook](#storybook) - [Website](#website) - [Testing](#testing) + - [- Running tests](#--running-tests) + - [- Writing tests](#--writing-tests) - [Code style](#code-style) - [i18n](#i18n) - [Important notes](#important-notes) + - [web-components](#web-components) - [Typography](#typography) - [Sizing guide](#sizing-guide) - [Netlify](#netlify) @@ -60,7 +63,6 @@ bun install Set variables in `.env` files in `web-marketplace/` and `web-storybook/` folders based on provided `.env.example` files. - ## Development To run the marketplace app: @@ -136,27 +138,29 @@ bun run build-www ## Testing #### - Running tests + We are using [Vitest](https://vitest.dev/) as a test runner. -Tests can be run in the terminal with the following commands from the project root: +Tests can be run in the terminal with the following commands from the project root: + +- To run `web-marketplace` tests -* To run `web-marketplace` tests ```sh bun run test-marketplace ``` -* To run `web-components` tests +- To run `web-components` tests ```sh bun run test-components ``` -In both cases the test runner is launched in the interactive watch mode. + In both cases the test runner is launched in the interactive watch mode. #### - Writing tests + When writing test in `web-marketplace` remember to import the methods from`'web-marketplace/test/test-utils'`, specially the `render` method, as it is a custom render that wraps components with the necessary providers. In `web-components`, methods should be imported directly from `'@testing-library/*'` - ## Code style [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/) are used as @@ -207,6 +211,10 @@ Here's a vscode snippet to make string translation easier: `` component should be imported from `@lingui/macro` most of the time. This component is used at compile-time. There is another `` component in `@lingui/react` for [special cases](https://lingui.dev/tutorials/react-patterns#lazy-translations). This component is used at runtime. +### web-components + +components in `web-components` should not use any i18n code in order to make them more generic and reusable. + ## Typography This repo utilizes custom MUI Typography components to normalize styles with the mockups based on the typography in [figma](): diff --git a/web-components/package.json b/web-components/package.json index 98e21b30c5..9adf2790ab 100644 --- a/web-components/package.json +++ b/web-components/package.json @@ -9,8 +9,8 @@ "copy-assets": "cp ./src/theme/fonts.css ./lib/theme/fonts.css && cp -R ./src/theme/assets ./lib/theme/", "watch": "bun run remove-previous-files && tsc --watch && bun run copy-assets", "build": "bun run remove-previous-files && tsc && bun run copy-assets", - "lint": "eslint ./src -c .eslintrc.js --max-warnings 0 --ext .ts,.tsx", - "lint-fix": "eslint ./src --fix -c .eslintrc.js --ext .ts,.tsx", + "lint": "eslint ./src -c .eslintrc.cjs --max-warnings 0 --ext .ts,.tsx", + "lint-fix": "eslint ./src --fix -c .eslintrc.cjs --ext .ts,.tsx", "format": "prettier --write --loglevel warn --ignore-path=../.prettierignore './src/**/*.{ts,tsx,json,md,css}'", "format-and-fix": "bun run format && bun run lint-fix", "test": "vitest", diff --git a/web-components/src/components/PrefinanceTag/PrefinanceTag.tsx b/web-components/src/components/PrefinanceTag/PrefinanceTag.tsx index 3d24b2046e..6ac9cc6d2e 100644 --- a/web-components/src/components/PrefinanceTag/PrefinanceTag.tsx +++ b/web-components/src/components/PrefinanceTag/PrefinanceTag.tsx @@ -1,10 +1,11 @@ import { cn } from 'web-components/src/utils/styles/cn'; -import { PREFINANCE } from '../cards/ProjectCard/ProjectCard.constants'; +import { ProjectCardBodyTextsMapping } from '../cards/ProjectCard/ProjectCard.types'; import { PrefinanceIcon } from '../icons/PrefinanceIcon'; import { Label } from '../typography'; export const PrefinanceTag = ({ + bodyTexts, classNames = { root: '', label: '', @@ -14,6 +15,7 @@ export const PrefinanceTag = ({ height: '19', }, }: { + bodyTexts: ProjectCardBodyTextsMapping; classNames?: { root?: string; label?: string }; iconSize?: { width: string; @@ -32,7 +34,7 @@ export const PrefinanceTag = ({ component="span" size="xxs" > - {PREFINANCE} + {bodyTexts.prefinance} ); diff --git a/web-components/src/components/atoms/RadioCard/RadioCard.mock.tsx b/web-components/src/components/atoms/RadioCard/RadioCard.mock.tsx index 75d9a3b8e7..725b6f6f71 100644 --- a/web-components/src/components/atoms/RadioCard/RadioCard.mock.tsx +++ b/web-components/src/components/atoms/RadioCard/RadioCard.mock.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import OrganizationIcon from '../../../components/icons/OrganizationIcon'; import UserIcon from '../../../components/icons/UserIcon'; import { RadioCardItem } from './RadioCard.types'; diff --git a/web-components/src/components/atoms/RoundLogo/RoundLogo.mock.ts b/web-components/src/components/atoms/RoundLogo/RoundLogo.mock.ts index b9e4d708f3..a2d099ded6 100644 --- a/web-components/src/components/atoms/RoundLogo/RoundLogo.mock.ts +++ b/web-components/src/components/atoms/RoundLogo/RoundLogo.mock.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { ImageType } from '../../../types/shared/imageType'; export const RoundLogoMock: ImageType = { diff --git a/web-components/src/components/buttons/ContainedButton.tsx b/web-components/src/components/buttons/ContainedButton.tsx index c24ed73e64..bdb72aea67 100644 --- a/web-components/src/components/buttons/ContainedButton.tsx +++ b/web-components/src/components/buttons/ContainedButton.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { styled } from '@mui/material'; import Button from '@mui/material/Button'; diff --git a/web-components/src/components/buttons/PrevNextButton.tsx b/web-components/src/components/buttons/PrevNextButton.tsx index 620a0df3dc..d306615813 100644 --- a/web-components/src/components/buttons/PrevNextButton.tsx +++ b/web-components/src/components/buttons/PrevNextButton.tsx @@ -33,8 +33,10 @@ const getBorderColor = ( ? theme.palette.grey[100] : theme.palette.grey[400]; return disabled - ? `linear-gradient(${disabledColor}, ${disabledColor})` - : 'linear-gradient(204.4deg, #527984 5.94%, #79C6AA 51.92%, #C4DAB5 97.89%)'; + ? // eslint-disable-next-line lingui/no-unlocalized-strings + `linear-gradient(${disabledColor}, ${disabledColor})` + : // eslint-disable-next-line lingui/no-unlocalized-strings + 'linear-gradient(204.4deg, #527984 5.94%, #79C6AA 51.92%, #C4DAB5 97.89%)'; }; const getBackgroundColor = ( diff --git a/web-components/src/components/buttons/SetMaxButton.test.tsx b/web-components/src/components/buttons/SetMaxButton.test.tsx index 4dc1213232..ddc1ad853a 100644 --- a/web-components/src/components/buttons/SetMaxButton.test.tsx +++ b/web-components/src/components/buttons/SetMaxButton.test.tsx @@ -5,7 +5,13 @@ import { fireEvent, screen } from 'web-components/test/test-utils'; describe('SetMaxButton', () => { it('calls onClick when clicked', () => { const onClick = vi.fn(); - render(); + render( + , + ); const button = screen.getByLabelText('Set max credits'); fireEvent.click(button); expect(onClick).toHaveBeenCalledTimes(1); diff --git a/web-components/src/components/buttons/SetMaxButton.tsx b/web-components/src/components/buttons/SetMaxButton.tsx index 381256ac90..dfbd196643 100644 --- a/web-components/src/components/buttons/SetMaxButton.tsx +++ b/web-components/src/components/buttons/SetMaxButton.tsx @@ -2,17 +2,21 @@ import { MouseEvent } from 'react'; export function SetMaxButton({ onClick, + ariaLabel, + buttonText, }: { onClick: (e: MouseEvent) => void; + ariaLabel: string; + buttonText: string; }) { return ( ); } diff --git a/web-components/src/components/buttons/button.stories.tsx b/web-components/src/components/buttons/button.stories.tsx index 52ccfd71f3..a6994b4ce5 100644 --- a/web-components/src/components/buttons/button.stories.tsx +++ b/web-components/src/components/buttons/button.stories.tsx @@ -110,7 +110,11 @@ export const saveButton = { export const setMaxButton = { render: () => ( <> - {}} /> + {}} + ariaLabel="Set max" + buttonText="Set max" + /> ), }; diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Content.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Content.tsx index ced84c7c11..085d7ef6d3 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Content.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Content.tsx @@ -10,17 +10,39 @@ import { CRYPTO_TOOLTIP_TEXT } from './OrderSummaryCard.constants'; import { OrderProps, PaymentMethod } from './OrderSummaryCard.types'; import { OrderSummmaryRowHeader } from './OrderSummmaryCard.RowHeader'; +type Props = { + title: string; + order: OrderProps; + currentBuyingStep: number; + paymentMethod: PaymentMethod; + headers: { + project: string; + pricePerCredit: string; + credits: string; + totalPrice: string; + payment: string; + }; + ariaLabels: { + editableCredits: string; + changePaymentCard: string; + editButtonAriaLabel: string; + }; + editableUpdateButtonText: string; + endingInText: string; + onClickEditCard?: () => void; +}; + export function OrderSummaryContent({ + title, order, currentBuyingStep, paymentMethod, + headers, + ariaLabels, + editableUpdateButtonText, + endingInText, onClickEditCard = () => {}, -}: { - order: OrderProps; - currentBuyingStep: number; - paymentMethod: PaymentMethod; - onClickEditCard?: () => void; -}) { +}: Props) { const { projectName, currency, pricePerCredit, credits } = order; const [creditsAmount, setCreditsAmount] = useState(credits); return ( @@ -29,15 +51,13 @@ export function OrderSummaryContent({ variant="h5" className="col-span-2 text-base mt-0 sm:mt-[30px] mb-5 sm:mb-[15px]" > - Order Summary + {title}

{projectName}

- +
- +
@@ -66,7 +88,10 @@ export function OrderSummaryContent({
- +
- {paymentMethod.type} ending in + {paymentMethod.type} {endingInText} {' '} {paymentMethod.cardNumber.slice(-4)}

diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Image.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Image.tsx index 11c503653e..c38313b5b8 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Image.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.Image.tsx @@ -1,18 +1,26 @@ import { PrefinanceTag } from 'web-components/src/components/PrefinanceTag/PrefinanceTag'; +import { ProjectCardBodyTextsMapping } from '../ProjectCard/ProjectCard.types'; + export function OrderSummaryImage({ src, prefinanceProject, + bodyTexts, + altText, }: { src: string; prefinanceProject?: boolean; + bodyTexts: ProjectCardBodyTextsMapping; + altText: string; }) { return (
- {prefinanceProject && } + {prefinanceProject && ( + + )} order summary
diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.mock.ts b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.mock.ts new file mode 100644 index 0000000000..21a4789c3f --- /dev/null +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.mock.ts @@ -0,0 +1,22 @@ +import { projectCardBodyTextMapping } from '../ProjectCard/ProjectCard.mock'; + +/* eslint-disable lingui/no-unlocalized-strings */ +export const orderSummaryCommonProps = { + title: 'Order Summary', + headers: { + project: 'project', + pricePerCredit: 'price per Credit', + credits: '# credits', + totalPrice: 'total Price', + payment: 'payment', + }, + ariaLabels: { + editableCredits: 'Editable credits', + changePaymentCard: 'Change payment card', + editButtonAriaLabel: 'Edit', + }, + editableUpdateButtonText: 'update', + endingInText: 'ending in', + imageAltText: 'order summary', + bodyTexts: projectCardBodyTextMapping, +}; diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.stories.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.stories.tsx index 60160247fa..f9ec151ac8 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.stories.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.stories.tsx @@ -2,6 +2,7 @@ import { Meta, StoryObj } from '@storybook/react'; import { CURRENCIES } from 'web-components/src/components/DenomIconWithCurrency/DenomIconWithCurrency.constants'; import { OrderSummaryCard } from './OrderSummaryCard'; +import { orderSummaryCommonProps } from './OrderSummaryCard.mock'; export default { title: 'Cards/OrderSummaryCard', @@ -23,6 +24,7 @@ Default.args = { credits: 50, currency: CURRENCIES.usd, }, + ...orderSummaryCommonProps, }; export const WithPaymentDetails: Story = { @@ -43,6 +45,7 @@ WithPaymentDetails.args = { type: 'visa', cardNumber: '1234 5678 9012 3456', }, + ...orderSummaryCommonProps, }; export const WithPrefinanceProject: Story = { @@ -63,6 +66,7 @@ WithPrefinanceProject.args = { type: 'visa', cardNumber: '1234 5678 9012 3456', }, + ...orderSummaryCommonProps, }; export const WithCrypto: Story = { @@ -78,4 +82,5 @@ WithCrypto.args = { credits: 50, currency: CURRENCIES.uregen, }, + ...orderSummaryCommonProps, }; diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.test.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.test.tsx index 72e483034b..7bf9257a3f 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.test.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.test.tsx @@ -4,6 +4,7 @@ import { CURRENCIES } from 'web-components/src/components/DenomIconWithCurrency/ import { fireEvent } from 'web-components/test/test-utils'; import { OrderSummaryCard } from './OrderSummaryCard'; +import { orderSummaryCommonProps } from './OrderSummaryCard.mock'; import { OrderSummaryProps } from './OrderSummaryCard.types'; describe('OrderSummaryCard', () => { @@ -22,6 +23,7 @@ describe('OrderSummaryCard', () => { }, currentBuyingStep: 2, onClickEditCard: vi.fn(), + ...orderSummaryCommonProps, }; it('displays the project name', () => { diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.tsx index 9555a25fb1..f047886aa8 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.tsx @@ -4,19 +4,37 @@ import { OrderSummaryImage } from './OrderSummaryCard.Image'; import { OrderSummaryProps } from './OrderSummaryCard.types'; export const OrderSummaryCard = (orderSummary: OrderSummaryProps) => { - const { order, paymentMethod, currentBuyingStep, onClickEditCard } = - orderSummary; + const { + order, + paymentMethod, + currentBuyingStep, + ariaLabels, + editableUpdateButtonText, + endingInText, + headers, + title, + bodyTexts, + imageAltText, + onClickEditCard, + } = orderSummary; return ( ); diff --git a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.types.tsx b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.types.tsx index 5de68d4a31..203c74ae3c 100644 --- a/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.types.tsx +++ b/web-components/src/components/cards/OrderSummaryCard/OrderSummaryCard.types.tsx @@ -1,5 +1,7 @@ import { Currency } from 'web-components/src/components/DenomIconWithCurrency/DenomIconWithCurrency.constants'; +import { ProjectCardBodyTextsMapping } from '../ProjectCard/ProjectCard.types'; + export interface OrderProps { projectName: string; prefinanceProject: boolean; @@ -10,6 +12,7 @@ export interface OrderProps { } export interface OrderSummaryProps { + title: string; order: OrderProps; // TO-DO remove currentBuyingStep prop and get the current step from the context // this cound be a number or a string (choose credits | payment info | retirement | complete |) @@ -19,6 +22,22 @@ export interface OrderSummaryProps { type: 'visa' | 'mastercard'; cardNumber: string; }; + headers: { + project: string; + pricePerCredit: string; + credits: string; + totalPrice: string; + payment: string; + }; + ariaLabels: { + editableCredits: string; + changePaymentCard: string; + editButtonAriaLabel: string; + }; + editableUpdateButtonText: string; + endingInText: string; + bodyTexts: ProjectCardBodyTextsMapping; + imageAltText: string; onClickEditCard: () => void; } diff --git a/web-components/src/components/cards/PostCard/PostCard.mock.tsx b/web-components/src/components/cards/PostCard/PostCard.mock.tsx index ff112ad1e6..9012f21d37 100644 --- a/web-components/src/components/cards/PostCard/PostCard.mock.tsx +++ b/web-components/src/components/cards/PostCard/PostCard.mock.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { User } from 'src/components/user/UserInfo'; export const user: User = { diff --git a/web-components/src/components/cards/ProjectCard/ProjectCard.CreditPrice.tsx b/web-components/src/components/cards/ProjectCard/ProjectCard.CreditPrice.tsx index 6da700c93b..16383b0122 100644 --- a/web-components/src/components/cards/ProjectCard/ProjectCard.CreditPrice.tsx +++ b/web-components/src/components/cards/ProjectCard/ProjectCard.CreditPrice.tsx @@ -6,15 +6,10 @@ import { Body, Subtitle } from '../../../components/typography'; import { Theme } from '../../../theme/muiTheme'; import { sxToArray } from '../../../utils/mui/sxToArray'; import { - AVG_PRICE_LABEL, - CREDITS_AVAILABLE, - ERROR_CARD_PRICE, - ESTIMATED_ISSUANCE, - ESTIMATED_ISSUANCE_TOOLTIP, - PRICE, - SOLD_OUT, -} from './ProjectCard.constants'; -import { ProjectPrefinancing, PurchaseInfo } from './ProjectCard.types'; + ProjectCardBodyTextsMapping, + ProjectPrefinancing, + PurchaseInfo, +} from './ProjectCard.types'; type Props = { purchaseInfo?: PurchaseInfo; @@ -23,6 +18,7 @@ type Props = { creditsTooltip?: string; sx?: SxProps; projectPrefinancing?: ProjectPrefinancing; + bodyTexts: ProjectCardBodyTextsMapping; }; export const CreditPrice = ({ @@ -31,6 +27,7 @@ export const CreditPrice = ({ creditsTooltip, isSoldOut, projectPrefinancing, + bodyTexts, sx, }: Props) => { const avgPricePerTonLabel = purchaseInfo?.sellInfo?.avgPricePerTonLabel; @@ -58,7 +55,7 @@ export const CreditPrice = ({ textTransform: 'uppercase', }} > - {isPrefinanceProject ? PRICE : AVG_PRICE_LABEL} + {isPrefinanceProject ? bodyTexts.price : bodyTexts.avgPriceLabel} {priceTooltip && ( {purchaseInfo?.sellInfo - ? avgPricePerTonLabel ?? ERROR_CARD_PRICE + ? avgPricePerTonLabel ?? bodyTexts.errorCardPrice : projectPrefinancing?.price ?? '-'} @@ -100,11 +97,13 @@ export const CreditPrice = ({ textTransform: 'uppercase', }} > - {isPrefinanceProject ? ESTIMATED_ISSUANCE : CREDITS_AVAILABLE} + {isPrefinanceProject + ? bodyTexts.estimatedIssuance + : bodyTexts.creditsAvailable} {isPrefinanceProject && ( @@ -121,13 +120,15 @@ export const CreditPrice = ({ }} > {isSoldOut && !isPrefinanceProject ? ( - + ) : ( <> {purchaseInfo?.sellInfo?.creditsAvailable ?? projectPrefinancing?.estimatedIssuance ?? '0'} - {isSoldOut && } + {isSoldOut && ( + + )} )} {creditsTooltip && ( diff --git a/web-components/src/components/cards/ProjectCard/ProjectCard.constants.tsx b/web-components/src/components/cards/ProjectCard/ProjectCard.constants.tsx deleted file mode 100644 index 36bfa9887d..0000000000 --- a/web-components/src/components/cards/ProjectCard/ProjectCard.constants.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { ButtonType } from '../../../types/shared/buttonType'; -import CurrentCreditsIcon from '../../icons/CurrentCreditsIcon'; -import EyeIcon from '../../icons/EyeIcon'; -import { PrefinanceIcon } from '../../icons/PrefinanceIcon'; - -export const ERROR_CARD_PRICE = 'Error fetching price'; -export const SOLD_OUT = 'Sold Out'; - -export const DEFAULT_BUY_BUTTON: ButtonType = { - text: 'Buy ecocredits', - startIcon: , -}; -export const AVG_PRICE_LABEL = 'Avg Price'; -export const AVG_PRICE_TOOLTIP = - 'This is the median average price of all open sell orders for this project.'; -export const PREFINANCE = 'prefinance'; -export const PRICE = 'price'; -export const ESTIMATED_ISSUANCE = 'estimated issuance'; -export const PREFINANCE_BUTTON: ButtonType = { - text: 'prefinance this project', - startIcon: , - className: - '[border-image:linear-gradient(179deg,#515D89_19.77%,#7DC9BF_114.05%,#FAEBD1_200.67%)_1] text-purple-400 hover:bg-purple-100 hover:border-purple-100', -}; -export const CREDITS_AVAILABLE = 'credits available'; -export const PREFINANCE_PRICE_TOOLTIP = - 'Price of credits for prefinance projects have specific terms, please click on the project to learn more.'; -export const ESTIMATED_ISSUANCE_TOOLTIP = - 'Actual number of credits issued may be different from the estimated issuance.'; - -export const VIEW_PROJECT_BUTTON: ButtonType = { - text: 'view project', - startIcon: , -}; diff --git a/web-components/src/components/cards/ProjectCard/ProjectCard.mock.tsx b/web-components/src/components/cards/ProjectCard/ProjectCard.mock.tsx new file mode 100644 index 0000000000..682ee0059d --- /dev/null +++ b/web-components/src/components/cards/ProjectCard/ProjectCard.mock.tsx @@ -0,0 +1,56 @@ +/* eslint-disable lingui/no-unlocalized-strings */ +import CurrentCreditsIcon from '../../../components/icons/CurrentCreditsIcon'; +import EyeIcon from '../../../components/icons/EyeIcon'; +import { PrefinanceIcon } from '../../../components/icons/PrefinanceIcon'; +import { + ProjectCardBodyTextsMapping, + ProjectCardButtonsMapping, + ProjectCardTitlesMapping, +} from './ProjectCard.types'; + +export const projectCardBodyTextMapping: ProjectCardBodyTextsMapping = { + comingSoon: 'coming soon', + creditsPurchased: 'credits purchased', + viewDetails: 'view details', + errorCardPrice: 'Error fetching price', + soldOut: 'Sold Out', + avgPriceLabel: 'Avg Price', + avgPriceTooltip: + 'This is the median average price of all open sell orders for this project.', + prefinance: 'prefinance', + price: 'price', + estimatedIssuance: 'estimated issuance', + creditsAvailable: 'credits available', + prefinancePriceTooltip: + 'Price of credits for prefinance projects have specific terms, please click on the project to learn more.', + estimatedIssuanceTooltip: + 'Actual number of credits issued may be different from the estimated issuance.', +}; + +export const projectCardPurchaseDetailsTitleMapping: ProjectCardTitlesMapping = + { + vintageId: 'vintage id', + vintageIdWithSerial: 'vintage id (serial number)', + vintagePeriod: 'vintage period', + creditClass: 'credit class', + methodology: 'methodology', + projectType: 'project type', + additionalCertifications: 'additional certifications', + }; + +export const projectCardButtonMapping: ProjectCardButtonsMapping = { + default: { + text: 'Buy ecocredits', + startIcon: , + }, + prefinance: { + text: 'prefinance this project', + startIcon: , + className: + '[border-image:linear-gradient(179deg,#515D89_19.77%,#7DC9BF_114.05%,#FAEBD1_200.67%)_1] text-purple-400 hover:bg-purple-100 hover:border-purple-100', + }, + view: { + text: 'view project', + startIcon: , + }, +}; diff --git a/web-components/src/components/cards/ProjectCard/ProjectCard.tsx b/web-components/src/components/cards/ProjectCard/ProjectCard.tsx index f071440a46..50079aa88e 100644 --- a/web-components/src/components/cards/ProjectCard/ProjectCard.tsx +++ b/web-components/src/components/cards/ProjectCard/ProjectCard.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { SxProps, Theme, useTheme } from '@mui/material'; import clsx from 'clsx'; -import InfoTooltip from 'web-components/src/components/tooltip/InfoTooltip'; import { PrefinanceTag } from 'web-components/src/components/PrefinanceTag/PrefinanceTag'; +import InfoTooltip from 'web-components/src/components/tooltip/InfoTooltip'; import { Track } from 'web-marketplace/src/lib/tracker/types'; import { ButtonType } from '../../../types/shared/buttonType'; @@ -16,18 +16,17 @@ import { Body } from '../../typography'; import { Account, User } from '../../user/UserInfo'; import MediaCard, { MediaCardProps } from '../MediaCard/MediaCard'; import { ProjectCardButton } from './ProjectCard.Button'; -import { - AVG_PRICE_TOOLTIP, - DEFAULT_BUY_BUTTON, - PREFINANCE_BUTTON, - PREFINANCE_PRICE_TOOLTIP, - VIEW_PROJECT_BUTTON, -} from './ProjectCard.constants'; import { CreditPrice } from './ProjectCard.CreditPrice'; import { ProgramImageChildren } from './ProjectCard.ImageChildren'; import { PurchaseDetails } from './ProjectCard.PurchaseDetails'; import { useProjectCardStyles } from './ProjectCard.styles'; -import { ProjectPrefinancing, PurchaseInfo } from './ProjectCard.types'; +import { + ProjectCardBodyTextsMapping, + ProjectCardButtonsMapping, + ProjectCardTitlesMapping, + ProjectPrefinancing, + PurchaseInfo, +} from './ProjectCard.types'; import { getAbbreviation } from './ProjectCard.utils'; export interface ProjectCardProps extends MediaCardProps { @@ -64,6 +63,9 @@ export interface ProjectCardProps extends MediaCardProps { adminPrompt?: SanityBlockContent; createPostTooltipText?: string; editProjectTooltipText?: string; + bodyTexts: ProjectCardBodyTextsMapping; + purchaseDetailsTitles: ProjectCardTitlesMapping; + buttons: ProjectCardButtonsMapping; } export function ProjectCard({ @@ -98,6 +100,9 @@ export function ProjectCard({ adminPrompt, createPostTooltipText, editProjectTooltipText, + bodyTexts, + purchaseDetailsTitles, + buttons, ...mediaCardProps }: ProjectCardProps): JSX.Element { const theme = useTheme(); @@ -107,12 +112,12 @@ export function ProjectCard({ const cardButton = button ?? (isSoldOut - ? VIEW_PROJECT_BUTTON + ? buttons.view : isPrefinanceProject - ? PREFINANCE_BUTTON + ? buttons.prefinance : offChain - ? VIEW_PROJECT_BUTTON - : DEFAULT_BUY_BUTTON); + ? buttons.view + : buttons.default); const { text: buttonText, @@ -173,6 +178,7 @@ export function ProjectCard({ {isPrefinanceProject && ( - coming soon + {bodyTexts.comingSoon} )} {(purchaseInfo || isPrefinanceProject || offChain) && ( @@ -192,7 +198,7 @@ export function ProjectCard({ {purchaseInfo?.units && ( <> - {purchaseInfo.units} credits purchased + {purchaseInfo.units} {bodyTexts.creditsPurchased} setOpen(!open)} @@ -202,7 +208,7 @@ export function ProjectCard({ direction={open ? 'up' : 'down'} className={cn(classes.icon, 'text-brand-400')} />{' '} - view details + {bodyTexts.viewDetails} )} @@ -210,7 +216,11 @@ export function ProjectCard({
{purchaseInfo?.creditClass?.standard && ( )} {purchaseInfo?.creditClass && ( )} {purchaseInfo?.methodology && ( )} {purchaseInfo?.projectType && ( )} {additionalCertifications && ( )} <> {!offChain || projectPrefinancing?.isPrefinanceProject ? ( ( draftText="Draft" isSoldOut sx={{ maxWidth: 338, mr: 10, mb: 10 }} + bodyTexts={projectCardBodyTextMapping} + purchaseDetailsTitles={projectCardPurchaseDetailsTitleMapping} + buttons={projectCardButtonMapping} /> ( }} sx={{ maxWidth: 338, mr: 10, mb: 10 }} draftText="Draft" + bodyTexts={projectCardBodyTextMapping} + purchaseDetailsTitles={projectCardPurchaseDetailsTitleMapping} + buttons={projectCardButtonMapping} /> ( sx={{ maxWidth: 338, mr: 10, mb: 10 }} draft draftText="Draft" + bodyTexts={projectCardBodyTextMapping} + purchaseDetailsTitles={projectCardPurchaseDetailsTitleMapping} + buttons={projectCardButtonMapping} /> ( stripePaymentLink: 'https://stripe.com', }} draftText="Draft" + bodyTexts={projectCardBodyTextMapping} + purchaseDetailsTitles={projectCardPurchaseDetailsTitleMapping} + buttons={projectCardButtonMapping} /> ); diff --git a/web-components/src/components/faq/Navigation.tsx b/web-components/src/components/faq/Navigation.tsx index f4d3b2ca77..1273628231 100644 --- a/web-components/src/components/faq/Navigation.tsx +++ b/web-components/src/components/faq/Navigation.tsx @@ -16,7 +16,7 @@ interface NavigationProps { root?: string; listItem?: string; }; - categories: string[]; + categories: { label: string; value: string }[]; onClick: (c: string) => void; category?: string; showIcon?: boolean; @@ -102,18 +102,18 @@ const Navigation = ({ return ( - {categories.map((name, i) => { - const selected = !!category && category === name; + {categories.map(({ label, value }, i) => { + const selected = !!category && category === value; return ( { - onClick(name); + onClick(value); }} > - {name} + {label} ( export const navigation = (): JSX.Element => ( {}} - categories={['concept', 'regen registry', 'regen ledger', 'tech']} + categories={[ + { label: 'concept', value: 'concept' }, + { label: 'regen registry', value: 'regen registry' }, + { label: 'regen ledger', value: 'regen ledger' }, + { label: 'tech', value: 'tech' }, + ]} /> ); diff --git a/web-components/src/components/faq/index.tsx b/web-components/src/components/faq/index.tsx index a8f890d964..3ecee7ed3f 100644 --- a/web-components/src/components/faq/index.tsx +++ b/web-components/src/components/faq/index.tsx @@ -55,7 +55,9 @@ const FAQ = ({ return <>; } - const categoriesHeader: string[] = categories.map(c => c.header); + const categoriesHeader: { label: string; value: string }[] = categories.map( + c => ({ label: c.header, value: c.header }), + ); let category = categories[0]; if (header) { diff --git a/web-components/src/components/form/BasketTakeForm.tsx b/web-components/src/components/form/BasketTakeForm.tsx index 5bf1b995d9..12c65f6e6d 100644 --- a/web-components/src/components/form/BasketTakeForm.tsx +++ b/web-components/src/components/form/BasketTakeForm.tsx @@ -34,9 +34,6 @@ import Submit from './Submit'; * retirement_jurisdiction: must be a valid location */ -const RETIRED_UPON_TAKE_TOOLTIP = - 'The creator of this basket has chosen that all credits must be retired upon take.'; - const useStyles = makeStyles()((theme: Theme) => ({ checkboxLabel: { marginTop: theme.spacing(10.75), diff --git a/web-components/src/components/form/CreditRetireForm.tsx b/web-components/src/components/form/CreditRetireForm.tsx index dabe052b90..f8705d635a 100644 --- a/web-components/src/components/form/CreditRetireForm.tsx +++ b/web-components/src/components/form/CreditRetireForm.tsx @@ -115,21 +115,24 @@ const sxs = { } as SxProps, }; +export type BottomTextMapping = { + title: string; + tooltip: string; + reasonLabel: string; + locationTitle: string; + locationTooltip: string; + locationDescription: string; + countryLabel: string; + stateLabel: string; + postalCodeLabel: string; + locationStatePlaceholderLabel: string; + countryLabelPlaceholder: string; +}; export interface BottomCreditRetireFieldsProps { mapboxToken: string; arrayPrefix?: string; arrayIndex?: number; - bottomTextMapping: { - title: string; - tooltip: string; - reasonLabel: string; - locationTitle: string; - locationTooltip: string; - locationDescription: string; - countryLabel: string; - stateLabel: string; - postalCodeLabel: string; - }; + bottomTextMapping: BottomTextMapping; } export const BottomCreditRetireFields: React.FC< @@ -156,6 +159,8 @@ export const BottomCreditRetireFields: React.FC< reasonLabel, title, tooltip, + locationStatePlaceholderLabel, + countryLabelPlaceholder, } = bottomTextMapping; useEffect(() => { @@ -233,6 +238,7 @@ export const BottomCreditRetireFields: React.FC< exclude name={`${arrayPrefix}country`} label={countryLabel} + countryLabelPlaceholder={countryLabelPlaceholder} /> @@ -249,6 +255,7 @@ export const BottomCreditRetireFields: React.FC< > = ({ nameOrAddress, avatar, + avatarAlt, disconnect, + logoutText, pathname, linkComponent, userMenuItems, @@ -40,7 +42,7 @@ const UserMenuItems: React.FC> = ({ sx={{ mr: 2.75, }} - alt="default avatar" + alt={avatarAlt} src={avatar} /> {nameOrAddress} @@ -57,7 +59,7 @@ const UserMenuItems: React.FC> = ({ onClick={disconnect} className="text-grey-400 pl-[18px]" > - Log out + {logoutText}
), diff --git a/web-components/src/components/icons/BridgeIcon.tsx b/web-components/src/components/icons/BridgeIcon.tsx index 2ed9ddebf0..dd519ed773 100644 --- a/web-components/src/components/icons/BridgeIcon.tsx +++ b/web-components/src/components/icons/BridgeIcon.tsx @@ -1,4 +1,5 @@ import SvgIcon from '@mui/material/SvgIcon'; + import { SvgLinearGradientProps } from './ProjectPageIcon'; export default function BridgeIcon({ diff --git a/web-components/src/components/icons/CoinGeckoIcon.tsx b/web-components/src/components/icons/CoinGeckoIcon.tsx index fab35d2caa..74e1ea2b7f 100644 --- a/web-components/src/components/icons/CoinGeckoIcon.tsx +++ b/web-components/src/components/icons/CoinGeckoIcon.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; interface IconProps extends SvgIconProps {} diff --git a/web-components/src/components/icons/CreditBatchIcon.tsx b/web-components/src/components/icons/CreditBatchIcon.tsx index 14224bc016..4803a6e9d3 100644 --- a/web-components/src/components/icons/CreditBatchIcon.tsx +++ b/web-components/src/components/icons/CreditBatchIcon.tsx @@ -1,4 +1,5 @@ import SvgIcon from '@mui/material/SvgIcon'; + import { SvgLinearGradientProps } from './ProjectPageIcon'; export function CreditBatchIcon({ diff --git a/web-components/src/components/icons/CreditCardIcon.tsx b/web-components/src/components/icons/CreditCardIcon.tsx index 5ddd192b14..8ba95e67b9 100644 --- a/web-components/src/components/icons/CreditCardIcon.tsx +++ b/web-components/src/components/icons/CreditCardIcon.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; interface IconProps extends SvgIconProps {} diff --git a/web-components/src/components/icons/CreditClassIcon.tsx b/web-components/src/components/icons/CreditClassIcon.tsx index 9695c7a4d3..9f24df3e72 100644 --- a/web-components/src/components/icons/CreditClassIcon.tsx +++ b/web-components/src/components/icons/CreditClassIcon.tsx @@ -1,4 +1,5 @@ import { SvgIcon } from '@mui/material'; + import { SvgLinearGradientProps } from './ProjectPageIcon'; export function CreditClassIcon({ @@ -11,7 +12,9 @@ export function CreditClassIcon({ fillRule="evenodd" clipRule="evenodd" d="M3 4H8.03163L8.86496 5H4H3L3 4ZM2 5V4C2 3.44772 2.44772 3 3 3H8.03163C8.3284 3 8.60985 3.13182 8.79985 3.35982L10.1667 5H19C20.6569 5 22 6.34315 22 8V17C22 18.6569 20.6569 20 19 20H5C3.34315 20 2 18.6569 2 17V7V5ZM19 7H4V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V8C20 7.44771 19.5523 7 19 7ZM9.35098 9.61517C8.99263 9.83569 8.875 10.0742 8.875 10.25C8.875 10.4258 8.99263 10.6643 9.35098 10.8848C9.70124 11.1004 10.2167 11.25 10.8125 11.25C11.4083 11.25 11.9238 11.1004 12.274 10.8848C12.6324 10.6643 12.75 10.4258 12.75 10.25C12.75 10.0742 12.6324 9.83569 12.274 9.61517C11.9238 9.39962 11.4083 9.25 10.8125 9.25C10.2167 9.25 9.70124 9.39962 9.35098 9.61517ZM8.82688 8.76351C9.35882 8.43616 10.0621 8.25 10.8125 8.25C11.5629 8.25 12.2662 8.43616 12.7981 8.76351C13.322 9.08588 13.75 9.5974 13.75 10.25C13.75 10.3863 13.7313 10.5165 13.697 10.6401C13.7966 10.6301 13.8977 10.625 14 10.625C15.6569 10.625 17 11.9681 17 13.625C17 15.2819 15.6569 16.625 14 16.625C13.4413 16.625 12.9182 16.4723 12.4703 16.2062C12.2272 16.3793 11.9519 16.4732 11.7015 16.5267C11.3782 16.5957 11.0506 16.6067 10.7942 16.6067C10.0539 16.6067 9.3591 16.4333 8.83229 16.1271C8.31807 15.8282 7.87499 15.3413 7.87499 14.7004L7.875 10.25H7.875C7.875 9.5974 8.30303 9.08588 8.82688 8.76351ZM11.6607 15.5034C11.5464 15.3612 11.4448 15.2084 11.3575 15.0466C11.2389 15.0639 11.1175 15.0765 10.994 15.0841C10.2696 15.1287 9.59093 14.9935 9.07753 14.726C9.0075 14.6895 8.93978 14.65 8.87499 14.6078V14.7004C8.87499 14.8362 8.97347 15.0525 9.33484 15.2625C9.68362 15.4653 10.1985 15.6067 10.7942 15.6067C11.0295 15.6067 11.2735 15.5955 11.4927 15.5487C11.554 15.5357 11.6099 15.5205 11.6607 15.5034ZM11.1515 14.5689C11.1004 14.4147 11.0615 14.255 11.0359 14.0908L10.994 14.0936C10.2696 14.1382 9.59093 14.0031 9.07753 13.7355C9.0075 13.699 8.93978 13.6596 8.87499 13.6173L8.87499 13.9623C8.98146 14.0785 9.12574 14.1873 9.30861 14.2826C9.72867 14.5015 10.3141 14.625 10.9632 14.585C11.0268 14.5811 11.0895 14.5757 11.1515 14.5689ZM11.0002 13.5921C11.0018 13.4418 11.0145 13.2942 11.0374 13.15L10.994 13.1529C10.2696 13.1975 9.59093 13.0624 9.07753 12.7948C9.0075 12.7584 8.93979 12.7189 8.87499 12.6766L8.87499 12.9719C8.98147 13.0881 9.12574 13.1968 9.30861 13.2921C9.72867 13.511 10.3141 13.6345 10.9632 13.5945L11.0002 13.5921ZM11.1668 12.636C11.2174 12.4912 11.2787 12.3514 11.3499 12.2176C11.1748 12.239 10.995 12.25 10.8125 12.25C10.0845 12.25 9.40087 12.0748 8.87499 11.7654L8.87499 12.0312C8.98147 12.1474 9.12574 12.2561 9.30861 12.3514C9.72867 12.5704 10.3141 12.6938 10.9632 12.6539C11.032 12.6496 11.0999 12.6437 11.1668 12.636ZM16 13.625C16 14.7296 15.1046 15.625 14 15.625C12.8954 15.625 12 14.7296 12 13.625C12 12.5204 12.8954 11.625 14 11.625C15.1046 11.625 16 12.5204 16 13.625Z" - fill={linearGradient ? 'url(#linear_credit_class_icon)' : 'currentColor'} + fill={ + linearGradient ? 'url(#linear_credit_class_icon)' : 'currentColor' + } /> ); } - -{ - /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -} diff --git a/web-components/src/components/icons/InfoIcon.tsx b/web-components/src/components/icons/InfoIcon.tsx index 5605bbe174..c21c5de15f 100644 --- a/web-components/src/components/icons/InfoIcon.tsx +++ b/web-components/src/components/icons/InfoIcon.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { Box, SxProps } from '@mui/material'; import { Theme } from '@mui/material/styles'; import { makeStyles } from 'tss-react/mui'; diff --git a/web-components/src/components/icons/ShareIcons.tsx b/web-components/src/components/icons/ShareIcons.tsx index dd357d8be9..32217f8520 100644 --- a/web-components/src/components/icons/ShareIcons.tsx +++ b/web-components/src/components/icons/ShareIcons.tsx @@ -13,6 +13,7 @@ import TwitterIcon from './social/TwitterIcon'; interface ShareIconsProps { url: string; + copySuccessText: string; twitterShare?: string; telegramShare?: string; xsSize?: string | number; @@ -61,6 +62,7 @@ export default function ShareIcons({ twitterShare = '', telegramShare = '', xsSize, + copySuccessText, }: ShareIconsProps): JSX.Element { const theme = useTheme(); const { classes } = useStyles({ xsSize }); @@ -134,7 +136,7 @@ export default function ShareIcons({ - {copied && } + {copied && } ); } diff --git a/web-components/src/components/icons/Spinner.tsx b/web-components/src/components/icons/Spinner.tsx index d6e96936f2..3751549f78 100644 --- a/web-components/src/components/icons/Spinner.tsx +++ b/web-components/src/components/icons/Spinner.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import React from 'react'; import { styled } from '@mui/material'; import SvgIcon from '@mui/material/SvgIcon'; diff --git a/web-components/src/components/icons/WarningIcon.tsx b/web-components/src/components/icons/WarningIcon.tsx index 2068c8732c..9975d8ef7e 100644 --- a/web-components/src/components/icons/WarningIcon.tsx +++ b/web-components/src/components/icons/WarningIcon.tsx @@ -1,19 +1,36 @@ -import React from 'react'; -import SvgIcon from '@mui/material/SvgIcon'; - interface IconProps { className?: string; } -export default function WarningIcon({ - className, -}: IconProps): JSX.Element { +export default function WarningIcon({ className }: IconProps): JSX.Element { return ( - + - - - + + + ); diff --git a/web-components/src/components/icons/flags/USFlagIcon.tsx b/web-components/src/components/icons/flags/USFlagIcon.tsx index 3c0dcc0e9d..8c59f44a07 100644 --- a/web-components/src/components/icons/flags/USFlagIcon.tsx +++ b/web-components/src/components/icons/flags/USFlagIcon.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; interface IconProps extends SvgIconProps {} diff --git a/web-components/src/components/icons/withHoverColor.tsx b/web-components/src/components/icons/withHoverColor.tsx index e5f9917779..1bd6ce2fa3 100644 --- a/web-components/src/components/icons/withHoverColor.tsx +++ b/web-components/src/components/icons/withHoverColor.tsx @@ -1,4 +1,4 @@ -import { ComponentType, FC, PropsWithChildren, useState } from 'react'; +import { FC, useState } from 'react'; import { useTheme } from '@mui/material'; export interface Props { diff --git a/web-components/src/components/inputs/LocationCountryField.tsx b/web-components/src/components/inputs/LocationCountryField.tsx index 3157c0f207..e1aae7dc48 100644 --- a/web-components/src/components/inputs/LocationCountryField.tsx +++ b/web-components/src/components/inputs/LocationCountryField.tsx @@ -10,6 +10,7 @@ interface FieldProps { name?: string; exclude?: boolean; label: string; + countryLabelPlaceholder: string; } const LocationCountryField: React.FC> = ({ @@ -18,12 +19,13 @@ const LocationCountryField: React.FC> = ({ className, optional = false, exclude = false, + countryLabelPlaceholder, }) => { const [options, setOptions] = useState([]); useEffect(() => { - setOptions(getCountryOptions({ exclude })); - }, [exclude]); + setOptions(getCountryOptions({ exclude, countryLabelPlaceholder })); + }, [exclude, countryLabelPlaceholder]); return ( > = ({ @@ -20,19 +21,20 @@ const LocationStateField: React.FC> = ({ label, optional = false, initialSelection, + placeholderLabel, }) => { const [stateOptions, setStateOptions] = useState([]); const { setFieldValue } = useFormikContext(); useEffect(() => { - const options = getCountrySubdivisionOptions(country); + const options = getCountrySubdivisionOptions(country, placeholderLabel); const isValidSelection: boolean = !!initialSelection && options.some((opt: Option) => opt.value === initialSelection); setFieldValue(name, isValidSelection ? initialSelection : ''); setStateOptions(options); - }, [country, setFieldValue, name, initialSelection]); + }, [country, setFieldValue, name, initialSelection, placeholderLabel]); return ( void; }; -export const SelectOption = ({ option, handleSelect }: SelectOptionProps) => { +export const SelectOption = ({ + option, + ariaLabel, + handleSelect, +}: SelectOptionProps) => { const handleClick = () => { if (option?.value && 'value' in option) { handleSelect(option.value); @@ -17,7 +22,7 @@ export const SelectOption = ({ option, handleSelect }: SelectOptionProps) => { return (
); diff --git a/web-components/src/components/inputs/new/EditableInput/EditableInput.test.tsx b/web-components/src/components/inputs/new/EditableInput/EditableInput.test.tsx index bde3506d9a..cfed6617a4 100644 --- a/web-components/src/components/inputs/new/EditableInput/EditableInput.test.tsx +++ b/web-components/src/components/inputs/new/EditableInput/EditableInput.test.tsx @@ -10,7 +10,9 @@ describe('EditableInput', () => { , ); const amount = screen.getByText('100'); @@ -28,7 +30,9 @@ describe('EditableInput', () => { , ); const editButton = screen.getByRole('button', { @@ -52,7 +56,9 @@ describe('EditableInput', () => { , ); diff --git a/web-components/src/components/inputs/new/EditableInput/EditableInput.tsx b/web-components/src/components/inputs/new/EditableInput/EditableInput.tsx index 23b30a0d1c..6d47be4a96 100644 --- a/web-components/src/components/inputs/new/EditableInput/EditableInput.tsx +++ b/web-components/src/components/inputs/new/EditableInput/EditableInput.tsx @@ -6,7 +6,9 @@ interface EditableInputProps { value: number; onChange: (amount: number) => void; name?: string; - ariaLabel?: string; + inputAriaLabel: string; + editButtonAriaLabel: string; + updateButtonText: string; className?: string; } @@ -14,7 +16,9 @@ export const EditableInput = ({ value, onChange, name = '', - ariaLabel = 'Editable text input', + inputAriaLabel, + editButtonAriaLabel, + updateButtonText, className = '', }: EditableInputProps) => { const [editable, setEditable] = useState(false); @@ -57,22 +61,25 @@ export const EditableInput = ({ value={amount} onChange={handleOnChange} onKeyDown={handleKeyDown} - aria-label={ariaLabel} + aria-label={inputAriaLabel} name={name} autoFocus /> - update + {updateButtonText}
) : (
{amount} - +
)} diff --git a/web-components/src/components/inputs/new/FileDrop/FileDrop.BottomBar.tsx b/web-components/src/components/inputs/new/FileDrop/FileDrop.BottomBar.tsx index 68e9cff890..9c05214c78 100644 --- a/web-components/src/components/inputs/new/FileDrop/FileDrop.BottomBar.tsx +++ b/web-components/src/components/inputs/new/FileDrop/FileDrop.BottomBar.tsx @@ -24,6 +24,7 @@ export const FileDropBottomBar = ({ caption, credit, location, + locationText, sx = [], }: Props) => { const point = location?.geometry as Point; @@ -61,7 +62,7 @@ export const FileDropBottomBar = ({ placement="top" title={
- Location:{' '} + {locationText}:{' '} {`${point.coordinates[0]}, ${point.coordinates[1]} ${ isGeocodingFeature(location) ? `(${location.place_name})` diff --git a/web-components/src/components/inputs/new/FileDrop/FileDrop.File.tsx b/web-components/src/components/inputs/new/FileDrop/FileDrop.File.tsx index d15eb3ff1c..c351a1d79c 100644 --- a/web-components/src/components/inputs/new/FileDrop/FileDrop.File.tsx +++ b/web-components/src/components/inputs/new/FileDrop/FileDrop.File.tsx @@ -204,7 +204,7 @@ export const FileDropFile = ({ }} >
- Move up + {moveUpText}
)} @@ -217,7 +217,7 @@ export const FileDropFile = ({ }} >
- Move down + {moveDownText}
diff --git a/web-components/src/components/inputs/new/LocationCountryField/LocationCountryField.tsx b/web-components/src/components/inputs/new/LocationCountryField/LocationCountryField.tsx index 0376354b05..d60ec246ce 100644 --- a/web-components/src/components/inputs/new/LocationCountryField/LocationCountryField.tsx +++ b/web-components/src/components/inputs/new/LocationCountryField/LocationCountryField.tsx @@ -16,16 +16,26 @@ interface FieldProps extends PropsWithChildren { value?: string; optional?: boolean; label: string; + countryLabelPlaceholder: string; } const LocationCountryField = forwardRef( - ({ exclude = false, label, emptyOptionText, ...props }, ref) => { + ( + { + exclude = false, + label, + emptyOptionText, + countryLabelPlaceholder, + ...props + }, + ref, + ) => { const [options, setOptions] = useState([]); const value = options.length > 0 ? props.value ?? '' : ''; useEffect(() => { - setOptions(getCountryOptions({ exclude })); - }, [exclude]); + setOptions(getCountryOptions({ exclude, countryLabelPlaceholder })); + }, [exclude, countryLabelPlaceholder]); return ( ( - ({ country, label, emptyOptionText, ...props }, ref) => { + ({ country, label, emptyOptionText, placeholderLabel, ...props }, ref) => { const [options, setOptions] = useState([]); const value = options.length > 0 ? props.value ?? '' : ''; useEffect(() => { - const options = getCountrySubdivisionOptions(country); + const options = getCountrySubdivisionOptions(country, placeholderLabel); setOptions(options); - }, [country]); + }, [country, placeholderLabel]); return ( ; + bodyTexts: ProjectCardBodyTextsMapping; } export const CreditClassGridCard = ({ @@ -28,6 +32,7 @@ export const CreditClassGridCard = ({ name, purchaseInfo, className, + bodyTexts, LinkComponent = ({ children }) => <>{children}, sx = [], }: Props): JSX.Element => { @@ -56,7 +61,11 @@ export const CreditClassGridCard = ({ {name} - + = { diff --git a/web-components/src/components/organisms/Section/Section.mock.ts b/web-components/src/components/organisms/Section/Section.mock.ts index 65c0f9c77b..77f823a694 100644 --- a/web-components/src/components/organisms/Section/Section.mock.ts +++ b/web-components/src/components/organisms/Section/Section.mock.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { EcologicalCreditCardMock } from '../../../components/molecules/EcologicalCreditCard/EcologicalCreditCard.mock'; export const sectionCardsMock = [ diff --git a/web-components/src/components/organisms/StatCardsSection/StatCardsSection.mock.ts b/web-components/src/components/organisms/StatCardsSection/StatCardsSection.mock.ts index 4a7ea2ff4e..2cda8668a5 100644 --- a/web-components/src/components/organisms/StatCardsSection/StatCardsSection.mock.ts +++ b/web-components/src/components/organisms/StatCardsSection/StatCardsSection.mock.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { StatCardType } from '../../../components/molecules/StatCard/StatCard.types'; export const statCardsMock: StatCardType[] = [ diff --git a/web-components/src/components/section/OnBoardingSection.tsx b/web-components/src/components/section/OnBoardingSection.tsx index e70f944207..23fd702ebd 100644 --- a/web-components/src/components/section/OnBoardingSection.tsx +++ b/web-components/src/components/section/OnBoardingSection.tsx @@ -1,8 +1,6 @@ import React, { ReactNode } from 'react'; -import { Link as RouterLink } from 'react-router-dom'; import { makeStyles } from 'tss-react/mui'; -import { Body } from '../typography'; import Section from './index'; interface OnBoardingSectionProps { diff --git a/web-components/src/components/share-section/ShareSection.mock.tsx b/web-components/src/components/share-section/ShareSection.mock.tsx index d95da5c781..ca5a55b9bb 100644 --- a/web-components/src/components/share-section/ShareSection.mock.tsx +++ b/web-components/src/components/share-section/ShareSection.mock.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import LinkedInBadgeIcon from '../icons/social/LinkedInBadgeIcon'; import TwitterBadgeIcon from '../icons/social/TwitterBadgeIcon'; import { SocialItems } from './ShareSection.types'; diff --git a/web-components/src/components/sliders/ProjectMedia.tsx b/web-components/src/components/sliders/ProjectMedia.tsx index cbb47980bb..3c4bc1a0d4 100644 --- a/web-components/src/components/sliders/ProjectMedia.tsx +++ b/web-components/src/components/sliders/ProjectMedia.tsx @@ -8,6 +8,7 @@ import { makeStyles } from 'tss-react/mui'; import { containerPaddingX, containerStyles } from '../../styles/container'; import { getOptimizedImageSrc } from '../../utils/optimizedImageSrc'; +import { ProjectCardBodyTextsMapping } from '../cards/ProjectCard/ProjectCard.types'; import PlayIcon from '../icons/PlayIcon'; import { Image, OptimizeImageProps } from '../image'; import { PrefinanceTag } from '../PrefinanceTag/PrefinanceTag'; @@ -28,6 +29,7 @@ interface ProjectMediaProps extends OptimizeImageProps { xsBorderRadius?: boolean; mobileHeight?: string | number; isPrefinanceProject?: boolean | null; + bodyTexts: ProjectCardBodyTextsMapping; } interface StyleProps { @@ -224,6 +226,7 @@ export default function ProjectMedia({ apiServerUrl, imageCredits, isPrefinanceProject, + bodyTexts, }: ProjectMediaProps): JSX.Element { const { classes } = useStyles({ mobileHeight, xsBorderRadius }); const theme = useTheme(); @@ -329,6 +332,7 @@ export default function ProjectMedia({ label: 'sm:text-[11px]', }} iconSize={{ width: '24', height: '24' }} + bodyTexts={bodyTexts} /> )} @@ -421,6 +425,7 @@ export default function ProjectMedia({ {isPrefinanceProject && ( (
- +
); @@ -90,7 +91,11 @@ const assets: Asset[] = [ export const projectMediaWithMap = (): JSX.Element => (
- +
); diff --git a/web-components/src/components/table/ActionsTable.tsx b/web-components/src/components/table/ActionsTable.tsx index e103ee81e8..a75b2c5650 100644 --- a/web-components/src/components/table/ActionsTable.tsx +++ b/web-components/src/components/table/ActionsTable.tsx @@ -14,6 +14,7 @@ import { TableBody, TableFooter, TableHead, + TablePaginationProps, TableRow, } from '@mui/material'; @@ -67,6 +68,7 @@ interface ActionsTableProps { sortCallbacks?: SortCallbacksType; isIgnoreOffset?: boolean; actionButtonsText: string; + labelDisplayedRows: TablePaginationProps['labelDisplayedRows']; sx?: { root?: SxProps; }; @@ -76,12 +78,13 @@ const ActionsTable: React.FC> = ({ tableLabel, headerRows, rows, - renderActionButtons, - onTableChange, initialPaginationParams = DEFAULT_TABLE_PAGINATION_PARAMS, sortCallbacks = [], isIgnoreOffset = false, actionButtonsText, + renderActionButtons, + onTableChange, + labelDisplayedRows, sx, }) => { const { @@ -237,14 +240,7 @@ const ActionsTable: React.FC> = ({ onChangeRowsPerPage={onChangeRowsPerPage} count={initialPaginationParams?.count ?? rows.length} page={page} - labelDisplayedRows={({ from, to, count }) => { - const displayedTo = isIgnoreOffset - ? from + rows.length - 1 - : to; - return `${from}–${displayedTo} of ${ - count !== -1 ? count : `more than ${to}` - }`; - }} + labelDisplayedRows={labelDisplayedRows} onPageChange={onPageChange} /> diff --git a/web-components/src/components/table/table.stories.tsx b/web-components/src/components/table/table.stories.tsx index 27205d84b5..4c233dd1f1 100644 --- a/web-components/src/components/table/table.stories.tsx +++ b/web-components/src/components/table/table.stories.tsx @@ -1,3 +1,4 @@ +import { LabelDisplayedRowsArgs } from '@mui/material'; import Table from '@mui/material/Table'; import TableFooter from '@mui/material/TableFooter'; import TableRow from '@mui/material/TableRow'; @@ -67,10 +68,23 @@ export const tablePagination = (): JSX.Element => ( ); +const isIgnoreOffset = false; +const rows = [ + ['Row 11', 'Row 12', 'Row 13'], + ['Row 21', 'Row 22', 'Row 23'], +]; + export const actionsTable = (): JSX.Element => ( { + const displayedTo = isIgnoreOffset ? from + rows.length - 1 : to; + return count !== -1 + ? `${from}–${displayedTo} of ${count}` + : `${from}–${displayedTo} of more than ${to}`; + }} renderActionButtons={i => ( ( /> )} headerRows={['Column 1', 'Column 2', 'Column 3']} - rows={[ - ['Row 11', 'Row 12', 'Row 13'], - ['Row 21', 'Row 22', 'Row 23'], - ]} + rows={rows} /> ); diff --git a/web-components/src/components/user/UserInfo.tsx b/web-components/src/components/user/UserInfo.tsx index 48abf76cdb..98345f6475 100644 --- a/web-components/src/components/user/UserInfo.tsx +++ b/web-components/src/components/user/UserInfo.tsx @@ -129,6 +129,7 @@ export default function UserInfo({ size="md" className={cn('text-grey-400 pt-5', classNames?.timestamp)} > + {/* eslint-disable-next-line lingui/no-unlocalized-strings */} {formatDate(user.timestamp, 'MMMM D, YYYY | h:mm A')} )} diff --git a/web-components/src/theme/muiTheme.ts b/web-components/src/theme/muiTheme.ts index 3f811cb2b3..6b6619b678 100644 --- a/web-components/src/theme/muiTheme.ts +++ b/web-components/src/theme/muiTheme.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { createTheme } from '@mui/material/styles'; const defaultTheme = createTheme({ diff --git a/web-components/src/utils/locationStandard.ts b/web-components/src/utils/locationStandard.ts index c3f07b865f..5210d3da39 100644 --- a/web-components/src/utils/locationStandard.ts +++ b/web-components/src/utils/locationStandard.ts @@ -64,6 +64,7 @@ export const getJurisdictionIsoCode = ({ postalCode, }: LocationType): string => { // check iso country + // eslint-disable-next-line lingui/no-unlocalized-strings if (!getIsoCountry(country)) throw new Error(`Invalid country: ${country}`); // check subdivision exists, also iso subdivision (failing search is an empty object) if (!stateProvince || !getIsoSubdivision({ code: stateProvince })?.code) @@ -85,12 +86,8 @@ export const getJurisdictionIsoCode = ({ * the default country as the first option in the list, after the placeholder. */ -const COUNTRY_OPTION_PLACEHOLDER: Option = { - value: '', - label: 'Please choose a country', -}; - interface CountryOptionsProps { + countryLabelPlaceholder: string; exclude?: boolean; } @@ -100,6 +97,7 @@ const isIncluded = (code: string): boolean => { }; export function getCountryOptions({ + countryLabelPlaceholder, exclude = false, }: CountryOptionsProps): Option[] { const countriesCodes = exclude @@ -120,7 +118,12 @@ export function getCountryOptions({ country => country.value !== DEFAULT_COUNTRY, ); - let options = [COUNTRY_OPTION_PLACEHOLDER]; + let options = [ + { + value: '', + label: countryLabelPlaceholder, + }, + ]; if (defaultCountry) options.push(defaultCountry); options.push(...otherCountries); @@ -133,12 +136,10 @@ export function getCountryOptions({ * iso-3166-2 package, for the selector type input. */ -const COUNTRY_SUBDIVISION_OPTION_PLACEHOLDER: Option = { - value: '', - label: 'Please choose a state', -}; - -export function getCountrySubdivisionOptions(country: string): Option[] { +export function getCountrySubdivisionOptions( + country: string, + placeholderLabel: string, +): Option[] { const countrySubdivisions = getIsoCountry(country); const options: Option[] = Object.keys(countrySubdivisions?.sub || {}) @@ -149,7 +150,10 @@ export function getCountrySubdivisionOptions(country: string): Option[] { .sort((a, b) => a.label.localeCompare(b.label)); if (options.length > 0) - options.unshift(COUNTRY_SUBDIVISION_OPTION_PLACEHOLDER); + options.unshift({ + value: '', + label: placeholderLabel, + }); return options; } diff --git a/web-marketplace/src/apollo.tsx b/web-marketplace/src/apollo.tsx index 52e1d5f0b2..b4e492c2a5 100644 --- a/web-marketplace/src/apollo.tsx +++ b/web-marketplace/src/apollo.tsx @@ -68,6 +68,7 @@ export const AuthApolloProvider = ({ }; const errorLink = onError(({ operation, networkError, forward }) => { + // eslint-disable-next-line lingui/no-unlocalized-strings if (networkError && networkError.message.includes('status code 403')) { const observable = new Observable>>( observer => { diff --git a/web-marketplace/src/clients/regen/Regen.Routes.tsx b/web-marketplace/src/clients/regen/Regen.Routes.tsx index 30cfe0dae1..f46a7b8c02 100644 --- a/web-marketplace/src/clients/regen/Regen.Routes.tsx +++ b/web-marketplace/src/clients/regen/Regen.Routes.tsx @@ -80,7 +80,6 @@ const ProjectCreate = lazy(() => import('../../pages/ProjectCreate')); const ProjectFinished = lazy(() => import('../../pages/ProjectFinished')); const ProjectLocation = lazy(() => import('../../pages/ProjectLocation')); const ProjectReview = lazy(() => import('../../pages/ProjectReview')); -const Roles = lazy(() => import('../../pages/Roles')); const VerifyEmail = lazy(() => import('../../pages/VerifyEmail')); const ProjectEdit = lazy(() => import('../../pages/ProjectEdit')); const Activity = lazy(() => import('../../pages/Activity')); diff --git a/web-marketplace/src/clients/terrasos/Terrasos.muiTheme.ts b/web-marketplace/src/clients/terrasos/Terrasos.muiTheme.ts index 3f811cb2b3..6b6619b678 100644 --- a/web-marketplace/src/clients/terrasos/Terrasos.muiTheme.ts +++ b/web-marketplace/src/clients/terrasos/Terrasos.muiTheme.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { createTheme } from '@mui/material/styles'; const defaultTheme = createTheme({ diff --git a/web-marketplace/src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx b/web-marketplace/src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx index 74f07f00e5..cb40e23f7c 100644 --- a/web-marketplace/src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx +++ b/web-marketplace/src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx @@ -65,7 +65,7 @@ export const BatchMetadataAdditionalInfo = < label={_(msg`verification reports`)} value={ reports?.map(report => ({ - 'schema:name': 'Verification report', + 'schema:name': _(msg`Verification report`), ...report, })) ?? [] } diff --git a/web-marketplace/src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx b/web-marketplace/src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx index d9aa61b981..5aa0a928de 100644 --- a/web-marketplace/src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx +++ b/web-marketplace/src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx @@ -15,7 +15,9 @@ import { getJurisdictionIsoCode } from 'web-components/src/utils/locationStandar import { COUNTRY_LABEL, + COUNTRY_LABEL_PLACEHOLDER, EMPTY_OPTION_TEXT, + LOCATION_STATE_PLACEHOLDER_LABEL, STATE_LABEL, } from 'lib/constants/shared.constants'; @@ -123,6 +125,7 @@ export const BottomCreditRetireFields: React.FC< } > (); @@ -57,6 +64,8 @@ export function CreditsAmountHeader({ )}
{ event.preventDefault(); setMaxCreditsSelected(true); diff --git a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.constants.ts b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.constants.ts index 7ea35a7d4b..4a5d98580d 100644 --- a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.constants.ts +++ b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.constants.ts @@ -24,3 +24,6 @@ export const cryptoOptions = [ value: false, }, ]; + +export const SET_MAX_CREDITS_ARIA_LABEL = msg`Set max credits`; +export const SET_MAX_CREDITS_BUTTON_TEXT = msg`Max`; diff --git a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.mock.tsx b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.mock.tsx index a87b835de3..0e7570c2ed 100644 --- a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.mock.tsx +++ b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.mock.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { CURRENCIES } from 'web-components/src/components/DenomIconWithCurrency/DenomIconWithCurrency.constants'; export const creditVintages = [ diff --git a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.tsx b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.tsx index 8ac84864ef..85ec59e3ef 100644 --- a/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.tsx +++ b/web-marketplace/src/components/molecules/CreditsAmount/CreditsAmount.tsx @@ -1,6 +1,7 @@ import { ChangeEvent, useCallback, useEffect, useState } from 'react'; import { useFormContext } from 'react-hook-form'; -import { Trans } from '@lingui/macro'; +import { msg, Trans } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; import { PAYMENT_OPTIONS } from 'web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.constants'; import { ChooseCreditsFormSchemaType } from 'web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.schema'; @@ -36,6 +37,7 @@ export const CreditsAmount = ({ setCreditsAvailable, creditVintages, }: CreditsAmountProps) => { + const { _ } = useLingui(); const [pricePerCredit, setPricePerCredit] = useState( getCurrencyPrice(CURRENCIES.usd, creditDetails), ); @@ -133,6 +135,8 @@ export const CreditsAmount = ({ creditDetails={creditDetails} currency={currency} setCurrency={setCurrency} + selectPlaceholderAriaLabel={_(msg`Select option`)} + selectAriaLabel={_(msg`Select option`)} /> = void; + selectPlaceholderAriaLabel: string; + selectAriaLabel: string; } diff --git a/web-marketplace/src/components/molecules/CreditsAmount/CreditsInput.tsx b/web-marketplace/src/components/molecules/CreditsAmount/CreditsInput.tsx index 882c5a9e5d..411e330b3a 100644 --- a/web-marketplace/src/components/molecules/CreditsAmount/CreditsInput.tsx +++ b/web-marketplace/src/components/molecules/CreditsAmount/CreditsInput.tsx @@ -1,6 +1,7 @@ import { ChangeEvent, useEffect, useState } from 'react'; import { useFormContext } from 'react-hook-form'; -import { Trans } from '@lingui/macro'; +import { msg, Trans } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; import { ChooseCreditsFormSchemaType } from 'web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.schema'; import { LeafIcon } from 'web-components/src/components/icons/LeafIcon'; @@ -14,6 +15,7 @@ export const CreditsInput = ({ handleCreditsAmountChange, paymentOption, }: CreditsInputProps) => { + const { _ } = useLingui(); const [maxCreditsAvailable, setMaxCreditsAvailable] = useState(creditsAvailable); const [isFocused, setIsFocused] = useState(false); @@ -50,7 +52,7 @@ export const CreditsInput = ({ step: '0.1', max: maxCreditsAvailable, min: 0, - 'aria-label': 'Credits Input', + 'aria-label': _(msg`Credits Input`), }} onChange={onHandleChange} onFocus={onHandleFocus} diff --git a/web-marketplace/src/components/molecules/CreditsAmount/CurrencyInput.tsx b/web-marketplace/src/components/molecules/CreditsAmount/CurrencyInput.tsx index 890011eff6..98e920eed1 100644 --- a/web-marketplace/src/components/molecules/CreditsAmount/CurrencyInput.tsx +++ b/web-marketplace/src/components/molecules/CreditsAmount/CurrencyInput.tsx @@ -1,5 +1,7 @@ import { ChangeEvent, lazy, useCallback, useState } from 'react'; import { useFormContext } from 'react-hook-form'; +import { msg } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; import { PAYMENT_OPTIONS } from 'web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.constants'; import { ChooseCreditsFormSchemaType } from 'web-marketplace/src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.schema'; @@ -29,12 +31,15 @@ export const CurrencyInput = ({ creditDetails, currency, setCurrency, + selectPlaceholderAriaLabel, + selectAriaLabel, }: CurrencyInputProps) => { const { register, setValue, formState: { errors }, } = useFormContext(); + const { _ } = useLingui(); const { onChange, onBlur, name, ref } = register(CURRENCY_AMOUNT); const [isFocused, setIsFocused] = useState(false); @@ -83,7 +88,7 @@ export const CurrencyInput = ({ max: maxCurrencyAmount, min: 0, step: '0.1', - 'aria-label': 'Currency Input', + 'aria-label': _(msg`Currency Input`), }} sx={{ '& .MuiInputBase-root': { @@ -127,6 +132,8 @@ export const CurrencyInput = ({ }))} onSelect={onHandleCurrencyChange} defaultOption={defaultCryptoCurrency} + placeholderAriaLabel={selectPlaceholderAriaLabel} + selectAriaLabel={selectAriaLabel} /> ) } diff --git a/web-marketplace/src/components/molecules/EditProjectPageFooter.tsx b/web-marketplace/src/components/molecules/EditProjectPageFooter.tsx index e44396ed74..1b1f0d6944 100644 --- a/web-marketplace/src/components/molecules/EditProjectPageFooter.tsx +++ b/web-marketplace/src/components/molecules/EditProjectPageFooter.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { msg } from '@lingui/macro'; import { useLingui } from '@lingui/react'; @@ -7,11 +7,12 @@ import { makeStyles } from 'tss-react/mui'; import OutlinedButton from 'web-components/src/components/buttons/OutlinedButton'; import { SaveButton } from 'web-components/src/components/buttons/SaveButton'; -import { VIEW_PROJECT_BUTTON } from 'web-components/src/components/cards/ProjectCard/ProjectCard.constants'; import FixedFooter from 'web-components/src/components/fixed-footer'; import EyeIcon from 'web-components/src/components/icons/EyeIcon'; import { Theme } from 'web-components/src/theme/muiTheme'; +import { getProjectCardButtonMapping } from 'lib/constants/shared.constants'; + import { useProjectEditContext } from 'pages'; interface Props { @@ -59,6 +60,7 @@ const EditProjectPageFooter: React.FC> = ({ const { projectId } = useParams(); const navigate = useNavigate(); const { isDirtyRef, setIsWarningModalOpen } = useProjectEditContext(); + const projectCardButtons = useMemo(() => getProjectCardButtonMapping(_), [_]); return ( @@ -76,7 +78,7 @@ const EditProjectPageFooter: React.FC> = ({ }} > - {VIEW_PROJECT_BUTTON.text} + {projectCardButtons.view.text} diff --git a/web-marketplace/src/components/molecules/ProjectPageFooter.tsx b/web-marketplace/src/components/molecules/ProjectPageFooter.tsx index 6e9f6f2e81..5f8ac1e1ae 100644 --- a/web-marketplace/src/components/molecules/ProjectPageFooter.tsx +++ b/web-marketplace/src/components/molecules/ProjectPageFooter.tsx @@ -5,7 +5,7 @@ import { useLingui } from '@lingui/react'; import SaveFooter from 'web-components/src/components/fixed-footer/SaveFooter'; -import { SAVE_EXIT_TEXT, SAVE_TEXT } from 'lib/constants/shared.constants'; +import { SAVE_EXIT_TEXT } from 'lib/constants/shared.constants'; import { getProjectCreationPercentage } from 'pages/ProjectCreate/ProjectCreate.utils'; diff --git a/web-marketplace/src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx b/web-marketplace/src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx index df709da89a..418c9e2b98 100644 --- a/web-marketplace/src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx +++ b/web-marketplace/src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx @@ -107,7 +107,7 @@ const ProjectPageMetadata: React.FC> = ({ label="documents" value={ projectDesignDocument && { - 'schema:name': 'Project Design Document', + 'schema:name': _(msg`Project Design Document`), 'schema:url': projectDesignDocument, } } diff --git a/web-marketplace/src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx b/web-marketplace/src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx index f0b4e50817..3f7d2196a9 100644 --- a/web-marketplace/src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx +++ b/web-marketplace/src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx @@ -12,7 +12,9 @@ import { Body, Title } from 'web-components/src/components/typography'; import { COUNTRY_LABEL, + COUNTRY_LABEL_PLACEHOLDER, EMPTY_OPTION_TEXT, + LOCATION_STATE_PLACEHOLDER_LABEL, STATE_LABEL, } from 'lib/constants/shared.constants'; @@ -109,6 +111,7 @@ export const Retirement = () => { } > { } > { const { _ } = useLingui(); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + isIgnoreOffset, + rowsLength: basketCredits.length, + }), + [_, basketCredits.length, isIgnoreOffset], + ); + if (!basketCredits?.length) { return ; } @@ -48,11 +61,12 @@ export const BasketEcocreditsTable: React.FC< return ( Project diff --git a/web-marketplace/src/components/organisms/BasketsTable.tsx b/web-marketplace/src/components/organisms/BasketsTable.tsx index 0504bb4e4d..ae5ec66961 100644 --- a/web-marketplace/src/components/organisms/BasketsTable.tsx +++ b/web-marketplace/src/components/organisms/BasketsTable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { msg, Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { Box, Grid } from '@mui/material'; @@ -11,7 +11,10 @@ import { } from 'web-components/src/components/table/ActionsTable'; import { formatNumber } from 'web-components/src/utils/format'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { ReactComponent as BasketIcon } from '../../assets/svgs/rNCT.svg'; import { BasketTokens } from '../../hooks/useBasketTokens'; @@ -26,6 +29,15 @@ export const BasketsTable: React.FC> = ({ basketTokens, renderActionButtons }) => { const { _ } = useLingui(); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + rowsLength: basketTokens.length, + }), + [_, basketTokens], + ); + if (!basketTokens?.length) { return ( > = return ( + getLabelDisplayedRows({ + _, + rowsLength: bridgableCredits.length, + }), + [_, bridgableCredits], + ); + if (!bridgableCredits?.length && !isLoadingCredits) { return ( ( + getLabelDisplayedRows({ + _, + rowsLength: bridgedCredits.length, + }), + [_, bridgedCredits.length], + ); + if (!bridgedCredits?.length && !isLoadingBridgedCredits) { return ( > = baseDenom: selectedSellOrder?.askBaseDenom, }), userBalance, + _, })} /> @@ -544,7 +547,12 @@ const BuyCreditsModal: React.FC> = /> } > - + > = diff --git a/web-marketplace/src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx b/web-marketplace/src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx index 94a6da065f..3186828a63 100644 --- a/web-marketplace/src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx +++ b/web-marketplace/src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx @@ -1,3 +1,4 @@ +import { msg, Trans } from '@lingui/macro'; import { Box } from '@mui/material'; import { QueryAllowedDenomsResponse } from '@regen-network/api/lib/generated/regen/ecocredit/marketplace/v1/query'; import { quantityFormatNumberOptions } from 'config/decimals'; @@ -7,6 +8,7 @@ import { Option } from 'web-components/src/components/inputs/SelectTextField'; import { formatNumber } from 'web-components/src/utils/format'; import { microToDenom } from 'lib/denom.utils'; +import { TranslatorType } from 'lib/i18n/i18n.types'; import { UISellOrderInfo } from 'pages/Projects/AllProjects/AllProjects.types'; import { findDisplayDenom } from 'components/molecules/DenomLabel/DenomLabel.utils'; @@ -79,12 +81,14 @@ export const getSellOrderLabel = ({ return ( - {`${price} ${displayDenom}/credit: `} - {`${truncatedQuantity} credit(s) available`} + + + {price} {displayDenom}/credit:{' '} + + + + {truncatedQuantity} credit(s) available + {prepareSellOrderSupplementaryData({ sellOrderId: id, @@ -157,18 +161,30 @@ export const getOptions = ({ return allOptionsLength > 1 ? [ { - label: {'Choose a sell order'}, + label: ( + + Choose a sell order + + ), value: '', disabled: true, }, { - label: {'TRADABLE AND RETIRABLE'}, + label: ( + + TRADABLE AND RETIRABLE + + ), value: '', disabled: true, }, ...retirableAndTradableOptions, { - label: {'RETIRABLE ONLY'}, + label: ( + + RETIRABLE ONLY + + ), value: '', disabled: true, }, @@ -185,6 +201,7 @@ export const handleBuyCreditsSubmit = async ( selectedSellOrder?: UISellOrderInfo, ): Promise => { if (!onSubmit || !selectedSellOrder) { + // eslint-disable-next-line lingui/no-unlocalized-strings throw new Error('onSubmit and selectedSellOrder are required'); } const { country, postalCode, stateProvince, retirementAction } = values; @@ -209,6 +226,7 @@ interface GetCreditCountValidationProps { userBalance: number; askAmount: number; displayDenom?: string; + _: TranslatorType; } export const getCreditCountValidation = @@ -217,15 +235,18 @@ export const getCreditCountValidation = askAmount, displayDenom, userBalance, + _, }: GetCreditCountValidationProps) => (creditCount: number) => { let error; if (askAmount && userBalance < askAmount * creditCount) { - error = `You don’t have enough ${displayDenom}.`; + error = _(msg`You don’t have enough ${displayDenom}.`); } if (creditCount > creditAvailable) { - error = `Must be less than or equal to the max credit(s) available (${creditAvailable}).`; + error = _( + msg`Must be less than or equal to the max credit(s) available (${creditAvailable}).`, + ); } return error; }; diff --git a/web-marketplace/src/components/organisms/CreditBatches/CreditBatches.tsx b/web-marketplace/src/components/organisms/CreditBatches/CreditBatches.tsx index 5cc3cc2761..e0579f9927 100644 --- a/web-marketplace/src/components/organisms/CreditBatches/CreditBatches.tsx +++ b/web-marketplace/src/components/organisms/CreditBatches/CreditBatches.tsx @@ -22,7 +22,10 @@ import { truncateHash } from 'web-components/src/utils/truncate'; import type { BatchInfoWithSupply } from 'types/ledger/ecocredit'; import { UseStateSetter } from 'types/react/use-state'; import { getHashUrl } from 'lib/block-explorer'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { AccountLink, Link } from 'components/atoms'; import WithLoader from 'components/atoms/WithLoader'; @@ -83,6 +86,16 @@ const CreditBatches: React.FC> = ({ const someTx = creditBatches?.some(batch => batch.txhash); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + isIgnoreOffset, + rowsLength: creditBatches?.length ?? 0, + }), + [_, isIgnoreOffset, creditBatches?.length], + ); + if (!someTx) { columnsToShow = columnsToShow.filter(column => column.id !== 'txhash'); } @@ -130,91 +143,94 @@ const CreditBatches: React.FC> = ({ initialPaginationParams={initialPaginationParams} isIgnoreOffset={isIgnoreOffset} sx={sx} - rows={creditBatches.map(batch => { - /* eslint-disable react/jsx-key */ - let result = []; - if (someTx) { - result.push( - - {truncateHash(batch.txhash)} - , - ); - } + rows={ + creditBatches?.map(batch => { + /* eslint-disable react/jsx-key */ + let result = []; + if (someTx) { + result.push( + + {truncateHash(batch.txhash)} + , + ); + } - result.push( - - + + {batch?.projectName} + + , + - {batch?.projectName} - - , - + + + + , - - - , - - {batch.denom} - , - , - - - {formatNumber({ - num: batch.tradableAmount, - ...quantityFormatNumberOptions, - })} - - , - - - {formatNumber({ - num: batch.retiredAmount, - ...quantityFormatNumberOptions, - })} - - , - - - {formatNumber({ - num: batch.cancelledAmount, - ...quantityFormatNumberOptions, - })} - - , - - {formatDate(batch.startDate as Date, undefined, true)} - , - - {formatDate(batch.endDate as Date, undefined, true)} - , - - {batch.projectLocation} - , - ); - - return result.filter(item => { - return ( - !(creditClassId && item?.key === 'classId') && - !filteredColumns?.includes(String(item?.key)) + {batch.denom} + , + , + + + {formatNumber({ + num: batch.tradableAmount, + ...quantityFormatNumberOptions, + })} + + , + + + {formatNumber({ + num: batch.retiredAmount, + ...quantityFormatNumberOptions, + })} + + , + + + {formatNumber({ + num: batch.cancelledAmount, + ...quantityFormatNumberOptions, + })} + + , + + {formatDate(batch.startDate as Date, undefined, true)} + , + + {formatDate(batch.endDate as Date, undefined, true)} + , + + {batch.projectLocation} + , ); - }); - })} + + return result.filter(item => { + return ( + !(creditClassId && item?.key === 'classId') && + !filteredColumns?.includes(String(item?.key)) + ); + }); + }) ?? [] + } + labelDisplayedRows={labelDisplayedRows} /* eslint-enable react/jsx-key */ /> ); diff --git a/web-marketplace/src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx b/web-marketplace/src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx index 065c41a51d..718803b4b7 100644 --- a/web-marketplace/src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx +++ b/web-marketplace/src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx @@ -22,8 +22,6 @@ import type { CreditClassValues } from './CreditClassForm'; import { CreditClassForm } from './CreditClassForm'; import { CreditClassReview } from './CreditClassReview'; -import RotationalGrazing from 'assets/rotational-grazing.png'; - export const getCreateCreditClassSteps = (_: TranslatorType) => [ { id: 'create-credit-class', diff --git a/web-marketplace/src/components/organisms/EcocreditsTable.tsx b/web-marketplace/src/components/organisms/EcocreditsTable.tsx index 41562bbc3d..3337919019 100644 --- a/web-marketplace/src/components/organisms/EcocreditsTable.tsx +++ b/web-marketplace/src/components/organisms/EcocreditsTable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { msg, Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { Box } from '@mui/material'; @@ -17,7 +17,10 @@ import { formatDate, formatNumber } from 'web-components/src/utils/format'; import type { BatchInfoWithBalance } from 'types/ledger/ecocredit'; import { UseStateSetter } from 'types/react/use-state'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { AccountLink, BreakText, GreyText, Link } from 'components/atoms'; import WithLoader from 'components/atoms/WithLoader'; @@ -42,6 +45,16 @@ export const EcocreditsTable: React.FC< }) => { const { _ } = useLingui(); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + isIgnoreOffset, + rowsLength: credits?.length ?? 0, + }), + [_, credits?.length, isIgnoreOffset], + ); + const hasMorePages = (initialPaginationParams?.count ?? 0) > (initialPaginationParams?.rowsPerPage ?? 0); @@ -59,6 +72,7 @@ export const EcocreditsTable: React.FC< tableLabel={_(msg`ecocredits table`)} actionButtonsText={_(ACTIONS_TABLE_ACTIONS_TEXT)} renderActionButtons={renderActionButtons} + labelDisplayedRows={labelDisplayedRows} onTableChange={onTableChange} initialPaginationParams={initialPaginationParams} isIgnoreOffset={isIgnoreOffset} diff --git a/web-marketplace/src/components/organisms/ProjectCards.tsx b/web-marketplace/src/components/organisms/ProjectCards.tsx index 6eea433a9a..111571a2a7 100644 --- a/web-marketplace/src/components/organisms/ProjectCards.tsx +++ b/web-marketplace/src/components/organisms/ProjectCards.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; import { useLingui } from '@lingui/react'; import { useTheme } from '@mui/material'; @@ -10,7 +10,12 @@ import { makeStyles } from 'tss-react/mui'; import ProjectCard from 'web-components/src/components/cards/ProjectCard'; import { Theme } from 'web-components/src/theme/muiTheme'; -import { DRAFT_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { QUDT_UNIT_MAP, qudtUnit } from 'lib/rdf'; import { useTracker } from 'lib/tracker/useTracker'; @@ -75,6 +80,12 @@ const ProjectCards: React.FC> = props => { const apiServerUrl = import.meta.env.VITE_API_URI; const { track } = useTracker(); const location = useLocation(); + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); + const purchaseDetailsTitles = useMemo( + () => getProjectCardPurchaseDetailsTitleMapping(_), + [_], + ); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); const LinkedProject: React.FC< React.PropsWithChildren<{ @@ -82,6 +93,9 @@ const ProjectCards: React.FC> = props => { }> > = ({ project }) => ( ({ width: { xs: theme.spacing(73), md: '100%' } })} name={project.metadata?.['schema:name']} imgSrc={ diff --git a/web-marketplace/src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx b/web-marketplace/src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx index 4a256aa668..6dffc386f8 100644 --- a/web-marketplace/src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx +++ b/web-marketplace/src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; import { msg } from '@lingui/macro'; import { useLingui } from '@lingui/react'; @@ -9,7 +10,12 @@ import Section from 'web-components/src/components/section'; import { Maybe, Scalars } from 'generated/sanity-graphql'; import { client as sanityClient } from 'lib/clients/sanity'; -import { DRAFT_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { getSoldOutProjectsQuery } from 'lib/queries/react-query/sanity/getSoldOutProjectsQuery/getSoldOutProjectsQuery'; import { useTracker } from 'lib/tracker/useTracker'; @@ -51,7 +57,12 @@ export function ProjectCardsSection({ sanitySoldOutProjects, }); const navigate = useNavigate(); - + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); + const purchaseDetailsTitles = useMemo( + () => getProjectCardPurchaseDetailsTitleMapping(_), + [_], + ); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); return (
); })} diff --git a/web-marketplace/src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx b/web-marketplace/src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx index 67a88ade6c..a6f840d5c9 100644 --- a/web-marketplace/src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx +++ b/web-marketplace/src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx @@ -15,7 +15,10 @@ import { import { formatDate, formatNumber } from 'web-components/src/utils/format'; import { UseStateSetter } from 'types/react/use-state'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { NormalizedRetirement } from 'lib/normalizers/retirements/normalizeRetirement'; import { GreyText, Link } from 'components/atoms'; @@ -47,6 +50,16 @@ export const RetirementCertificatesTable: React.FC< [_], ); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + isIgnoreOffset, + rowsLength: retirements?.length ?? 0, + }), + [_, isIgnoreOffset, retirements?.length], + ); + if (!retirements?.length) { return ( ( }; const valueWithGroup = getValue(_, value, authenticatedAccountIds); + const getOptionLabelFunction = useMemo(() => getOptionLabel(_), [_]); return (
@@ -181,7 +182,7 @@ export const RoleField = forwardRef( inputValue={inputValue} value={valueWithGroup} isOptionEqualToValue={getIsOptionEqualToValue} - getOptionLabel={getOptionLabel} + getOptionLabel={getOptionLabelFunction} renderOption={(props, option) => valueWithGroup && getIsOptionEqualToValue(option, valueWithGroup) && diff --git a/web-marketplace/src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx b/web-marketplace/src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx index bf44bf22e6..3cbe0217ba 100644 --- a/web-marketplace/src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx +++ b/web-marketplace/src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx @@ -1,4 +1,5 @@ import { isValidElement } from 'react'; +import { msg } from '@lingui/macro'; import { UseStateSetter } from 'web-components/src/types/react/useState'; @@ -64,8 +65,8 @@ export const getIsOptionEqualToValue = ( value: OptionType, ) => isProfile(option) && isProfile(value) && option.id === value.id; -export const getOptionLabel = (option: OptionType) => - isProfile(option) ? option.name || 'Unnamed' : ''; +export const getOptionLabel = (_: TranslatorType) => (option: OptionType) => + isProfile(option) ? option.name || _(msg`Unnamed`) : ''; export const groupOptions = ( _: TranslatorType, diff --git a/web-marketplace/src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx b/web-marketplace/src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx index be3226381f..867128e54e 100644 --- a/web-marketplace/src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx +++ b/web-marketplace/src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import { ReactNode, useMemo } from 'react'; import { useLocation, useNavigate } from 'react-router-dom'; import { msg } from '@lingui/macro'; import { useLingui } from '@lingui/react'; @@ -8,11 +8,6 @@ import { useTracker } from 'web-marketplace/src/lib/tracker/useTracker'; import ContainedButton from 'web-components/src/components/buttons/ContainedButton'; import OutlinedButton from 'web-components/src/components/buttons/OutlinedButton'; -import { - AVG_PRICE_LABEL, - PREFINANCE_BUTTON, - PRICE, -} from 'web-components/src/components/cards/ProjectCard/ProjectCard.constants'; import CurrentCreditsIcon from 'web-components/src/components/icons/CurrentCreditsIcon'; import EditIcon from 'web-components/src/components/icons/EditIcon'; import { StickyBar } from 'web-components/src/components/sticky-bar/StickyBar'; @@ -20,6 +15,10 @@ import InfoTooltip from 'web-components/src/components/tooltip/InfoTooltip'; import InfoTooltipWithIcon from 'web-components/src/components/tooltip/InfoTooltipWithIcon'; import { Label, Subtitle } from 'web-components/src/components/typography'; +import { + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, +} from 'lib/constants/shared.constants'; import { useWallet } from 'lib/wallet/wallet'; import { EDIT_PROJECT } from 'pages/ProjectEdit/ProjectEdit.constants'; @@ -81,7 +80,8 @@ export const SellOrdersActionsBar = ({ const isMobile = useMediaQuery(theme.breakpoints.down('sm')); const navigate = useNavigate(); const { loginDisabled } = useWallet(); - + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); return ( {!isPrefinanceProject && ( {_(BOOK_CALL)} diff --git a/web-marketplace/src/components/organisms/SellOrdersTable/SellOrdersTable.tsx b/web-marketplace/src/components/organisms/SellOrdersTable/SellOrdersTable.tsx index b63d3ff1c7..af2980ec59 100644 --- a/web-marketplace/src/components/organisms/SellOrdersTable/SellOrdersTable.tsx +++ b/web-marketplace/src/components/organisms/SellOrdersTable/SellOrdersTable.tsx @@ -12,7 +12,10 @@ import { } from 'web-components/src/components/table/ActionsTable'; import { UseStateSetter } from 'types/react/use-state'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { NormalizedSellOrder } from '../../../pages/Marketplace/Storefront/Storefront.types'; import { getSellOrdersRow } from './SellOrdersTable.config'; @@ -32,7 +35,14 @@ const SellOrdersTable = ({ onTableChange, }: Props): JSX.Element => { const { _ } = useLingui(); - + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + rowsLength: sellOrders?.length ?? 0, + }), + [_, sellOrders?.length], + ); const hasSellOrders = sellOrders.length > 0; const sellOrdersRow = useMemo(() => getSellOrdersRow(_), [_]); return ( @@ -40,6 +50,7 @@ const SellOrdersTable = ({ {hasSellOrders && ( diff --git a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.DataStream.tsx b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.DataStream.tsx index 0e1a788e1f..0de55e7486 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.DataStream.tsx +++ b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.DataStream.tsx @@ -113,7 +113,10 @@ export const DataStream = ({ listItem: '!border-0 font-sans text-lg font-normal !rounded-[5px] p-10', }} - categories={years.map(year => String(year))} + categories={years.map(year => ({ + label: String(year), + value: String(year), + }))} category={String(year)} onClick={(yearClicked: string) => { setYear(Number(yearClicked)); diff --git a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.Prefinance.tsx b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.Prefinance.tsx index d9c96e3336..b970d60434 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.Prefinance.tsx +++ b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.Prefinance.tsx @@ -1,18 +1,15 @@ +import { useMemo } from 'react'; import { useLingui } from '@lingui/react'; import { BlockContent } from 'web-components/src/components/block-content'; import { TextButton } from 'web-components/src/components/buttons/TextButton'; -import { - ESTIMATED_ISSUANCE, - ESTIMATED_ISSUANCE_TOOLTIP, - SOLD_OUT, -} from 'web-components/src/components/cards/ProjectCard/ProjectCard.constants'; import SmallArrowIcon from 'web-components/src/components/icons/SmallArrowIcon'; import SuccessIcon from 'web-components/src/components/icons/SuccessIcon'; import { LabeledValue } from 'web-components/src/components/text-layouts'; import { Body, Title } from 'web-components/src/components/typography'; import { ProjectPrefinancing } from 'generated/sanity-graphql'; +import { getProjectCardBodyTextMapping } from 'lib/constants/shared.constants'; import { SOLD_OUT_TOOLTIP } from 'pages/Projects/AllProjects/AllProjects.constants'; @@ -46,6 +43,7 @@ export const Prefinance = ({ projectPrefinancing, isSoldOut }: Props) => { projectTimeline, classTimeline, } = projectPrefinancing; + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); return ( <> @@ -89,8 +87,8 @@ export const Prefinance = ({ projectPrefinancing, isSoldOut }: Props) => {
{estimatedIssuance && ( { icon={ {_(ESTIMATED_ISSUANCE)} } tooltipNumber={isSoldOut ? _(SOLD_OUT_TOOLTIP) : undefined} - badgeLabel={isSoldOut ? SOLD_OUT : undefined} + badgeLabel={isSoldOut ? bodyTexts.soldOut : undefined} /> )} {projectedCreditDeliveryDate && ( diff --git a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.tsx b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.tsx index 8c60ab17ed..0990b93490 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.tsx +++ b/web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.tsx @@ -8,7 +8,6 @@ import cx from 'classnames'; import { useSetAtom } from 'jotai'; import ContainedButton from 'web-components/src/components/buttons/ContainedButton'; -import { PREFINANCE } from 'web-components/src/components/cards/ProjectCard/ProjectCard.constants'; import { PrefinanceIcon } from 'web-components/src/components/icons/PrefinanceIcon'; import { Gallery } from 'web-components/src/components/organisms/Gallery/Gallery'; import SEO from 'web-components/src/components/seo'; @@ -23,7 +22,10 @@ import { } from 'lib/atoms/modals.atoms'; import { useAuth } from 'lib/auth/auth'; import { onBtnClick } from 'lib/button'; -import { PHOTO_CREDIT } from 'lib/constants/shared.constants'; +import { + getProjectCardBodyTextMapping, + PHOTO_CREDIT, +} from 'lib/constants/shared.constants'; import { AnchoredProjectMetadataLD, CreditClassMetadataLD, @@ -105,11 +107,11 @@ function ProjectDetails(): JSX.Element { const location = useLocation(); const navigate = useNavigate(); const { activeAccount } = useAuth(); - const [isCreatePostModalOpen, setIsCreatePostModalOpen] = useState(false); const [draftPost, setDraftPost] = useState< Partial | undefined >(); + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); const { data: sanityProjectPageData } = useQuery( getAllProjectPageQuery({ sanityClient, enabled: !!sanityClient }), @@ -316,6 +318,7 @@ function ProjectDetails(): JSX.Element { projectPageMetadata: offChainProjectMetadata, projectDeveloper, creditClassName, + _, }); const mediaData = parseMedia({ @@ -437,6 +440,7 @@ function ProjectDetails(): JSX.Element { {mediaData.assets.length > 0 && ( - {PREFINANCE} + {bodyTexts.prefinance} @@ -596,6 +600,7 @@ function ProjectDetails(): JSX.Element { }} paginationParams={paginationParams} setPaginationParams={setPaginationParams} + _={_} sx={{ pt: { xs: 0 } }} /> diff --git a/web-marketplace/src/components/templates/ProjectDetails/hooks/useSeo.ts b/web-marketplace/src/components/templates/ProjectDetails/hooks/useSeo.ts index 9755d0d341..16e44c95d5 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/hooks/useSeo.ts +++ b/web-marketplace/src/components/templates/ProjectDetails/hooks/useSeo.ts @@ -1,4 +1,5 @@ import { useLocation } from 'react-router-dom'; +import { msg } from '@lingui/macro'; import { Account } from 'web-components/src/components/user/UserInfo'; @@ -6,6 +7,7 @@ import { AnchoredProjectMetadataBaseLD, ProjectPageMetadataLD, } from 'lib/db/types/json-ld'; +import { TranslatorType } from 'lib/i18n/i18n.types'; function getVisibleAccountName( account?: Account | undefined, @@ -20,6 +22,7 @@ interface UseSeoParams { projectDeveloper?: Account; landOwner?: Account; creditClassName: string | undefined; + _: TranslatorType; } export default function useSeo({ @@ -29,6 +32,7 @@ export default function useSeo({ projectDeveloper, landOwner, creditClassName, + _, }: UseSeoParams) { // this function is used to format credit class metadata into SEO // optimization tags for the project pages. i believe the main use case is at @@ -45,12 +49,14 @@ export default function useSeo({ const projectAddress = metadataLocation?.['place_name']; const siteMetadata = { - title: `Regen Marketplace`, + title: _(msg`Regen Marketplace`), description: creditClassName && accountName && projectAddress - ? `Learn about ${creditClassName} credits sourced from ${accountName} in ${projectAddress}.` + ? _( + msg`Learn about ${creditClassName} credits sourced from ${accountName} in ${projectAddress}.`, + ) : '', - author: `Regen Network`, + author: _(msg`Regen Network`), siteUrl: `${window.location.origin}`, }; diff --git a/web-marketplace/src/components/templates/ProjectDetails/hooks/useStakeholders.ts b/web-marketplace/src/components/templates/ProjectDetails/hooks/useStakeholders.ts index 473a5f7e5c..7898539c45 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/hooks/useStakeholders.ts +++ b/web-marketplace/src/components/templates/ProjectDetails/hooks/useStakeholders.ts @@ -5,6 +5,7 @@ import { } from '@apollo/client'; import { ProjectInfo } from '@regen-network/api/lib/generated/regen/ecocredit/v1/query'; import { useQuery } from '@tanstack/react-query'; + import { Account } from 'web-components/src/components/user/UserInfo'; import { Maybe, ProjectFieldsFragment } from 'generated/graphql'; diff --git a/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx b/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx index e49793fe48..644f7d5273 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx +++ b/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx @@ -1,3 +1,5 @@ +import { msg } from '@lingui/macro'; + import { IconTabProps } from 'web-components/src/components/tabs/IconTab'; import { ProjectPageMetadata } from 'components/molecules'; @@ -11,15 +13,16 @@ export const getProjectDetailsTabs = ({ sortedDocuments, sortCallbacksDocuments, paginationParams, - setPaginationParams, offChainProject, batchData, onChainProjectId, projectMetadata, + setPaginationParams, + _, }: ProjectDetailsTableTabsProps): IconTabProps[] => [ { - label: 'Project documentation', + label: _(msg`Project documentation`), content: ( {isAnchoredProjectMetadata(projectMetadata, onChainProjectId) && ( diff --git a/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.types.ts b/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.types.ts index e715f59c1c..23fa07dc59 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.types.ts +++ b/web-marketplace/src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.types.ts @@ -8,6 +8,7 @@ import { AnchoredProjectMetadataLD, LegacyProjectMetadataLD, } from 'lib/db/types/json-ld'; +import { TranslatorType } from 'lib/i18n/i18n.types'; import { ProjectMiddleSectionProps } from 'components/organisms/CreditBatchesSection/CreditBatchesSection.types'; @@ -17,4 +18,5 @@ export type ProjectDetailsTableTabsProps = { projectMetadata?: AnchoredProjectMetadataLD | LegacyProjectMetadataLD; onChainProjectId?: string; sx?: SxProps; + _: TranslatorType; } & ProjectMiddleSectionProps; diff --git a/web-marketplace/src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx b/web-marketplace/src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx index 911ab7296c..270ed34da4 100644 --- a/web-marketplace/src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx +++ b/web-marketplace/src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx @@ -1,3 +1,5 @@ +import { useMemo } from 'react'; +import { msg } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { Box, Link } from '@mui/material'; @@ -11,7 +13,10 @@ import { import { Document } from 'generated/graphql'; import { UseStateSetter } from 'types/react/use-state'; -import { ACTIONS_TABLE_ACTIONS_TEXT } from 'lib/constants/shared.constants'; +import { + ACTIONS_TABLE_ACTIONS_TEXT, + getLabelDisplayedRows, +} from 'lib/constants/shared.constants'; import { DOCUMENTATION_ROW } from './ProjectDetails.Documentation.config'; import { DOCUMENT, VIEW } from './ProjectDetails.Documentation.constants'; @@ -29,11 +34,20 @@ export const ProjectDetailsDocumentationTable = ({ onTableChange, }: Props): JSX.Element => { const { _ } = useLingui(); + const labelDisplayedRows = useMemo( + () => + getLabelDisplayedRows({ + _, + rowsLength: documents?.length ?? 0, + }), + [_, documents?.length], + ); return ( getDocumentationTableRow({ document }))} sortCallbacks={sortCallbacks} diff --git a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.tsx b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.tsx index 34c003443b..aa5520e213 100644 --- a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.tsx +++ b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.tsx @@ -49,8 +49,6 @@ import Recipients, { RecipientsFormValues } from './Recipients'; import Result from './Result'; import Review from './Review'; -import RotationalGrazing from 'assets/rotational-grazing.png'; - /** * * Create Batch Multi-Step Form diff --git a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx index 921c8f4ce7..19bdaf46a4 100644 --- a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx +++ b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx @@ -1,5 +1,7 @@ import React, { useEffect, useState } from 'react'; -import { Box, IconButton, Link, useTheme } from '@mui/material'; +import { msg, Trans } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; +import { Box, IconButton, Link } from '@mui/material'; import { isPast } from 'date-fns'; import { Field, FieldArray, useFormikContext } from 'formik'; import * as Yup from 'yup'; @@ -18,7 +20,6 @@ import { vcsRetirementSerialRE, } from 'web-components/src/components/inputs/validation'; import { Body } from 'web-components/src/components/typography'; -import { Theme } from 'web-components/src/theme/muiTheme'; import { useAuth } from 'lib/auth/auth'; import { NameUrl } from 'lib/rdf/types'; @@ -153,6 +154,7 @@ type Props = { export default function CreditBasics({ saveProjectOptionSelected, }: Props): React.ReactElement { + const { _ } = useLingui(); const { wallet } = useWallet(); const { activeAccount } = useAuth(); const projects = useQueryProjectsByIssuer( @@ -178,7 +180,7 @@ export default function CreditBasics({ return ( - The dates should correspond to the batch monitoring period or vintage. + + The dates should correspond to the batch monitoring period or vintage. + {isVCS ? ( <> @@ -244,12 +248,13 @@ const AdditionalCerfications: React.FC< certifications: NameUrl[]; }> > = ({ certifications }) => { - const theme = useTheme(); const [modalOpen, setModalOpen] = useState(false); return ( - Additional Certifications + + Additional Certifications + ( @@ -292,7 +297,7 @@ const AdditionalCerfications: React.FC< onClick={() => setModalOpen(true)} sx={{ mt: 3, width: '100%' }} > - + add certification + + add certification - Create Credit Batch + + <Trans>Create Credit Batch</Trans> + - SEE CREDIT BATCH + SEE CREDIT BATCH @@ -198,11 +201,13 @@ const ErrorResult = ({ error }: ErrorResultProps): React.ReactElement => { align="center" variant="h3" > - Sorry, your transaction was not successful. + Sorry, your transaction was not successful. - Create Credit Batch + + <Trans>Create Credit Batch</Trans> + { - SEE ALL CREDIT BATCHES + SEE ALL CREDIT BATCHES diff --git a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx index 9c24ea848c..fb9f8afc9a 100644 --- a/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx +++ b/web-marketplace/src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx @@ -1,4 +1,5 @@ import React, { useEffect } from 'react'; +import { msg, Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { Link } from '@mui/material'; import { useFormikContext } from 'formik'; @@ -70,19 +71,19 @@ function CreditBatchInfo({ return ( handleActiveStep(0)} editText={_(EDIT_TEXT)} sx={{ mt: [8, 10] }} > - + {dataDisplay?.project?.label || data.projectId} - + {`${formatDate(data.startDate)} - ${formatDate(data.endDate)}`} {metadata?.['regen:vcsRetirementSerialNumber'] && ( - + {metadata['regen:vcsRetirementSerialNumber']} )} @@ -114,24 +115,28 @@ function RecipientInfo({ data, index }: RecipientInfoProps): JSX.Element { const { handleActiveStep } = useMultiStep(); return ( handleActiveStep(1)} > - {data.recipient} - + + {data.recipient} + + {getFormattedNumber(data.tradableAmount)} {data.withRetire && ( <> - + {getFormattedNumber(data.retiredAmount)} {data.note && ( - {data.note} + + {data.note} + )} {data.retirementJurisdiction && ( - + {data.retirementJurisdiction} )} @@ -155,14 +160,14 @@ function AdditionalCertificationDisplay({ return ( <> - Additional certification {index} + Additional certification {index} {name} {url && ( <> - Additional certification {index} url + Additional certification {index} url ({ default: setError( new Error( + // eslint-disable-next-line lingui/no-unlocalized-strings 'You need to provide a valid ecocredit query name (ie. batchInfo)', ), ); diff --git a/web-marketplace/src/lib/bank.ts b/web-marketplace/src/lib/bank.ts index da4f3c015b..d3d2785e09 100644 --- a/web-marketplace/src/lib/bank.ts +++ b/web-marketplace/src/lib/bank.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { DeepPartial, QueryAllBalancesRequest, diff --git a/web-marketplace/src/lib/basket.ts b/web-marketplace/src/lib/basket.ts index c04192562d..bf8de563a3 100644 --- a/web-marketplace/src/lib/basket.ts +++ b/web-marketplace/src/lib/basket.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { DeepPartial, QueryBasketBalanceRequest, diff --git a/web-marketplace/src/lib/bridge.ts b/web-marketplace/src/lib/bridge.ts index e42b24d286..bdabbe8624 100644 --- a/web-marketplace/src/lib/bridge.ts +++ b/web-marketplace/src/lib/bridge.ts @@ -30,6 +30,7 @@ export const getBridgeTxStatus = async ( // a special pending status instead of an error. // eslint-disable-next-line no-console console.log( + // eslint-disable-next-line lingui/no-unlocalized-strings `Bridge service did not find hash ${hash} yet. Marking as "Pending"...`, ); return { diff --git a/web-marketplace/src/lib/clients/apolloClientFactory.ts b/web-marketplace/src/lib/clients/apolloClientFactory.ts index aa42b79968..3ae9d13dfe 100644 --- a/web-marketplace/src/lib/clients/apolloClientFactory.ts +++ b/web-marketplace/src/lib/clients/apolloClientFactory.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { ApolloClient, ApolloClientOptions } from '@apollo/client'; type ClientType = ApolloClient | null; diff --git a/web-marketplace/src/lib/constants/shared.constants.tsx b/web-marketplace/src/lib/constants/shared.constants.tsx index c36b8dcf71..ad5d25bfad 100644 --- a/web-marketplace/src/lib/constants/shared.constants.tsx +++ b/web-marketplace/src/lib/constants/shared.constants.tsx @@ -1,6 +1,14 @@ -import { msg, Trans } from '@lingui/macro'; -import { Box, Link } from '@mui/material'; +import { msg, plural, Trans } from '@lingui/macro'; +import { Box, LabelDisplayedRowsArgs, Link } from '@mui/material'; +import { + ProjectCardBodyTextsMapping, + ProjectCardButtonsMapping, + ProjectCardTitlesMapping, +} from 'web-components/src/components/cards/ProjectCard/ProjectCard.types'; +import CurrentCreditsIcon from 'web-components/src/components/icons/CurrentCreditsIcon'; +import EyeIcon from 'web-components/src/components/icons/EyeIcon'; +import { PrefinanceIcon } from 'web-components/src/components/icons/PrefinanceIcon'; import { MAX_FRACTION_DIGITS, MEMO_MAX_LENGTH, @@ -8,6 +16,8 @@ import { import { TranslatorType } from 'lib/i18n/i18n.types'; +// Contants + export const COPY_SUCCESS = msg`Link copied!`; export const EDIT_TEXT = msg`Edit`; export const DRAFT_TEXT = msg`Draft`; @@ -15,19 +25,7 @@ export const SAVE_TEXT = msg`Next`; export const SAVE_EXIT_TEXT = msg`Save draft & exit`; export const SUBMIT_TEXT = msg`submit`; export const SUBMIT_ERRORS = msg`Please correct the errors above`; - export const BATCH_LABEL = msg`Choose ecocredits batch`; -export const BATCH_DESCRIPTION = ( - - Choose any ecocredits that are eligible for this basket. - - Learn more» - - -); export const BASKET_LABEL = msg`Choose basket`; export const AMOUNT_LABEL = msg`Amount`; export const BASKET_PUT_SUBMIT_LABEL = msg`Put in basket`; @@ -36,23 +34,8 @@ export const BASKET_TAKE_AMOUNT_ERROR_TEXT = msg`You don't have enough basket to export const RETIRE_ON_TAKE_LABEL = msg`Retire credits upon transfer`; export const RETIRE_ON_TAKE_TOOLTIP = msg`The creator of this basket has chosen that all credits must be retired upon take.`; export const BASKET_TAKE_SUBMIT_LABEL = msg`take from basket`; -export const getBottomFieldsTextMapping = (_: TranslatorType) => ({ - title: _(msg`Retirement reason`), - tooltip: _( - msg`You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. "Retired on behalf of ABC Organization")`, - ), - reasonLabel: _(msg`Explain the reason you are retiring these credits`), - locationTitle: _(msg`Location of retirement`), - locationTooltip: _( - msg`The retirement location can be where you live or your business operates.`, - ), - locationDescription: _( - msg`Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations.`, - ), - countryLabel: _(msg`Country`), - stateLabel: _(msg`State / Region`), - postalCodeLabel: _(msg`Postal Code`), -}); +export const LOCATION_STATE_PLACEHOLDER_LABEL = msg`Please choose a state`; +export const COUNTRY_LABEL_PLACEHOLDER = msg`Please choose a country`; export const STATE_PROVINCE_ERROR_TEXT = msg`Required with postal code`; export const RETIREMENT_INFO_TEXT = msg`Retirement is permanent and non-reversible.`; export const APPLY = msg`Apply`; @@ -97,17 +80,6 @@ export const REQUIRED_DENOM = msg`Please choose a denom`; export const INVALID_DECIMAL_COUNT = `More than ${MAX_FRACTION_DIGITS} decimal places not allowed`; export const INVALID_MEMO_LENGTH = `Must be ${MEMO_MAX_LENGTH} characters or fewer`; export const POSITIVE_NUMBER = msg`Must be positive`; - -// Functions -type GetMaximumDecimalMessageProps = { - _: TranslatorType; - maximumFractionDigits: number; -}; -export const getMaximumDecimalMessage = ({ - _, - maximumFractionDigits, -}: GetMaximumDecimalMessageProps) => - _(msg`Maximum ${maximumFractionDigits} decimal places`); export const EMAIL_CONFIRMATION_TITLE = msg`Please check your email`; export const EMAIL_CONFIRMATION_DESCRIPTION = msg`We've just sent a confirmation email to:`; export const EMAIL_CONFIRMATION_CODE_HELPER = msg`Please enter the code from that email:`; @@ -135,9 +107,126 @@ export const ACTIONS_TABLE_ACTIONS_TEXT = msg`Actions`; export const VIEW_ON_LEDGER_TEXT = msg`view on ledger`; export const PAGE_NOT_FOUND_TITLE = msg`Oops! Page not found.`; export const PAGE_NOT_FOUND_BODY = msg`The page you are looking for might have been temporarily removed or had its name changed.`; + +// Components + +export const BATCH_DESCRIPTION = ( + + Choose any ecocredits that are eligible for this basket. + + Learn more» + + +); + export const PAGE_NOT_FOUND_BUTTON = ( Visit Our Homepage{' '} {'\u00A0'}Instead ); + +// Functions + +type GetMaximumDecimalMessageProps = { + _: TranslatorType; + maximumFractionDigits: number; +}; +export const getMaximumDecimalMessage = ({ + _, + maximumFractionDigits, +}: GetMaximumDecimalMessageProps) => + _(msg`Maximum ${maximumFractionDigits} decimal places`); + +export const getBottomFieldsTextMapping = (_: TranslatorType) => ({ + title: _(msg`Retirement reason`), + tooltip: _( + msg`You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. "Retired on behalf of ABC Organization")`, + ), + reasonLabel: _(msg`Explain the reason you are retiring these credits`), + locationTitle: _(msg`Location of retirement`), + locationTooltip: _( + msg`The retirement location can be where you live or your business operates.`, + ), + locationDescription: _( + msg`Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations.`, + ), + countryLabel: _(msg`Country`), + stateLabel: _(msg`State / Region`), + postalCodeLabel: _(msg`Postal Code`), + locationStatePlaceholderLabel: _(LOCATION_STATE_PLACEHOLDER_LABEL), + countryLabelPlaceholder: _(COUNTRY_LABEL_PLACEHOLDER), +}); + +export const getProjectCardBodyTextMapping = ( + _: TranslatorType, +): ProjectCardBodyTextsMapping => ({ + comingSoon: _(msg`coming soon`), + creditsPurchased: _(msg`credits purchased`), + viewDetails: _(msg`view details`), + errorCardPrice: _(msg`Error fetching price`), + soldOut: _(msg`Sold Out`), + avgPriceLabel: _(msg`Avg Price`), + avgPriceTooltip: _( + msg`This is the median average price of all open sell orders for this project.`, + ), + prefinance: _(msg`prefinance`), + price: _(msg`price`), + estimatedIssuance: _(msg`estimated issuance`), + creditsAvailable: _(msg`credits available`), + prefinancePriceTooltip: _( + msg`Price of credits for prefinance projects have specific terms, please click on the project to learn more.`, + ), + estimatedIssuanceTooltip: _( + msg`Actual number of credits issued may be different from the estimated issuance.`, + ), +}); + +export const getProjectCardPurchaseDetailsTitleMapping = ( + _: TranslatorType, +): ProjectCardTitlesMapping => ({ + vintageId: _(msg`vintage id`), + vintageIdWithSerial: _(msg`vintage id (serial number)`), + vintagePeriod: _(msg`vintage period`), + creditClass: _(msg`credit class`), + methodology: _(msg`methodology`), + projectType: _(msg`project type`), + additionalCertifications: _(msg`additional certifications`), +}); + +export const getProjectCardButtonMapping = ( + _: TranslatorType, +): ProjectCardButtonsMapping => ({ + default: { + text: _(msg`Buy ecocredits`), + startIcon: , + }, + prefinance: { + text: _(msg`prefinance this project`), + startIcon: , + className: + '[border-image:linear-gradient(179deg,#515D89_19.77%,#7DC9BF_114.05%,#FAEBD1_200.67%)_1] text-purple-400 hover:bg-purple-100 hover:border-purple-100', + }, + view: { + text: _(msg`view project`), + startIcon: , + }, +}); + +type GetLabelDisplayedRowsProps = { + _: TranslatorType; + isIgnoreOffset?: boolean; + rowsLength: number; +}; + +export const getLabelDisplayedRows = + ({ _, isIgnoreOffset, rowsLength }: GetLabelDisplayedRowsProps) => + ({ from, to, count }: LabelDisplayedRowsArgs) => { + const displayedTo = isIgnoreOffset ? from + rowsLength - 1 : to; + return count !== -1 + ? _(msg`${from}–${displayedTo} of ${count}`) + : _(msg`${from}–${displayedTo} of more than ${to}`); + }; diff --git a/web-marketplace/src/lib/db/api/metadata-graph.ts b/web-marketplace/src/lib/db/api/metadata-graph.ts index be5fcfca76..184a82b7fb 100644 --- a/web-marketplace/src/lib/db/api/metadata-graph.ts +++ b/web-marketplace/src/lib/db/api/metadata-graph.ts @@ -74,6 +74,7 @@ export async function generateIri( const response = await axios.post(apiUri + iriUrl, metadata); return response.data; } catch (err) { + // eslint-disable-next-line lingui/no-unlocalized-strings throw new Error(`Error in iri generation service: ${err}`); } } diff --git a/web-marketplace/src/lib/ecocredit/api.ts b/web-marketplace/src/lib/ecocredit/api.ts index 53e37de13b..1b0f9fbe41 100644 --- a/web-marketplace/src/lib/ecocredit/api.ts +++ b/web-marketplace/src/lib/ecocredit/api.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { TxResponse } from '@regen-network/api/lib/generated/cosmos/base/abci/v1beta1/abci'; import { GetTxsEventRequest, diff --git a/web-marketplace/src/lib/ecocredit/constants.ts b/web-marketplace/src/lib/ecocredit/constants.ts index 360d02339b..e2602c2043 100644 --- a/web-marketplace/src/lib/ecocredit/constants.ts +++ b/web-marketplace/src/lib/ecocredit/constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { MsgSend as MsgSendCosmos } from '@regen-network/api/lib/generated/cosmos/bank/v1beta1/tx'; import { MsgUpdateClient } from '@regen-network/api/lib/generated/ibc/core/client/v1/tx'; import { diff --git a/web-marketplace/src/lib/ecocredit/marketplace/marketplace.ts b/web-marketplace/src/lib/ecocredit/marketplace/marketplace.ts index 2b36af3b62..d6d23689bf 100644 --- a/web-marketplace/src/lib/ecocredit/marketplace/marketplace.ts +++ b/web-marketplace/src/lib/ecocredit/marketplace/marketplace.ts @@ -22,6 +22,7 @@ export const queryAllowedDenoms = async ({ return await client.AllowedDenoms(request); } catch (err) { throw new Error( + // eslint-disable-next-line lingui/no-unlocalized-strings `Error in the AllowedDenoms query of the ledger ecocredit/marketplace module: ${err}`, ); } @@ -41,6 +42,7 @@ export const querySellOrders = async ({ return await client.SellOrders(request); } catch (err) { throw new Error( + // eslint-disable-next-line lingui/no-unlocalized-strings `Error in the SellOrders query of the ledger ecocredit/marketplace module: ${err}`, ); } diff --git a/web-marketplace/src/lib/events/takeEventToBatches.ts b/web-marketplace/src/lib/events/takeEventToBatches.ts index 2cf27c6f7a..bf8e04e014 100644 --- a/web-marketplace/src/lib/events/takeEventToBatches.ts +++ b/web-marketplace/src/lib/events/takeEventToBatches.ts @@ -13,6 +13,7 @@ export const takeEventToBatches = ( if (!deliverTxResponse || !deliverTxResponse.rawLog) return; const rawLog = JSON.parse(deliverTxResponse.rawLog); const rawEventTake: EventTx = rawLog[0].events.find((event: EventTx) => + // eslint-disable-next-line lingui/no-unlocalized-strings event.type.includes('EventTake'), ); if (!rawEventTake) return; diff --git a/web-marketplace/src/lib/i18n/i18n.ts b/web-marketplace/src/lib/i18n/i18n.ts index 7489c87e6b..220326d4b7 100644 --- a/web-marketplace/src/lib/i18n/i18n.ts +++ b/web-marketplace/src/lib/i18n/i18n.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ export const locales = { en: 'English', es: 'Spanish', diff --git a/web-marketplace/src/lib/i18n/locales/en.po b/web-marketplace/src/lib/i18n/locales/en.po index 46b04376f1..53e4a82449 100644 --- a/web-marketplace/src/lib/i18n/locales/en.po +++ b/web-marketplace/src/lib/i18n/locales/en.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2024-09-18 09:25+0200\n" +"POT-Creation-Date: 2024-09-19 17:38+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -9,11 +9,11 @@ msgstr "" #: src/components/organisms/CreditActivityTable/CreditActivityTable.tsx:65 #: src/components/organisms/Documentation/Documentation.constants.ts:11 -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:31 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:35 msgid "" msgstr "" -#: src/lib/constants/shared.constants.tsx:124 +#: src/lib/constants/shared.constants.tsx:96 msgid "- see less" msgstr "" @@ -29,11 +29,11 @@ msgstr "" msgid "(file will be associated with the project location by default)" msgstr "" -#: src/lib/constants/shared.constants.tsx:78 +#: src/lib/constants/shared.constants.tsx:61 msgid "(optional)" msgstr "" -#: src/lib/constants/shared.constants.tsx:77 +#: src/lib/constants/shared.constants.tsx:60 msgid "(preferable)" msgstr "" @@ -53,6 +53,18 @@ msgstr "" msgid "{ADDRESS_USED_ERROR} Do you want to merge these accounts?" msgstr "" +#: src/lib/constants/shared.constants.tsx:230 +msgid "{from}–{displayedTo} of {count}" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:231 +msgid "{from}–{displayedTo} of more than {to}" +msgstr "" + +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:85 +msgid "{price} {displayDenom}/credit:" +msgstr "" + #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:329 msgid "{remainingCaptionCharacters, plural, one {{remainingCaptionCharacters} character remaining} other {{remainingCaptionCharacters} characters remaining}}" msgstr "" @@ -79,11 +91,15 @@ msgstr "" msgid "{remainingTitleCharacters, plural, one {{remainingTitleCharacters} character remaining} other {{remainingTitleCharacters} characters remaining}}" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:90 +msgid "{truncatedQuantity} credit(s) available" +msgstr "" + #: src/pages/CreditClassDetails/CreditClassDetails.ApprovedMethodologies.tsx:57 msgid "+ {0} more" msgstr "" -#: src/lib/constants/shared.constants.tsx:73 +#: src/lib/constants/shared.constants.tsx:56 msgid "+ add" msgstr "" @@ -91,6 +107,10 @@ msgstr "" msgid "+ add another issuer'" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:300 +msgid "+ add certification" +msgstr "" + #: src/components/organisms/RolesForm/components/RoleField/RoleField.AddNewProfile.tsx:34 msgid "+ Add New Profile" msgstr "" @@ -105,7 +125,7 @@ msgstr "" msgid "+ create post" msgstr "" -#: src/lib/constants/shared.constants.tsx:125 +#: src/lib/constants/shared.constants.tsx:97 msgid "+ see more" msgstr "" @@ -202,7 +222,7 @@ msgstr "" msgid "actions" msgstr "" -#: src/lib/constants/shared.constants.tsx:134 +#: src/lib/constants/shared.constants.tsx:106 msgid "Actions" msgstr "" @@ -213,6 +233,7 @@ msgid "Activity" msgstr "" #: src/components/templates/ProjectDetails/ProjectDetails.constant.ts:24 +#: src/lib/constants/shared.constants.tsx:184 msgid "Actual number of credits issued may be different from the estimated issuance." msgstr "" @@ -240,6 +261,14 @@ msgstr "" msgid "Additional Certificate" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:163 +msgid "Additional certification {index}" +msgstr "" + +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:170 +msgid "Additional certification {index} url" +msgstr "" + #: src/components/organisms/CertificationForm/CertificationForm.tsx:62 msgid "Additional certification name" msgstr "" @@ -249,10 +278,16 @@ msgid "Additional certification url" msgstr "" #: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:49 +#: src/lib/constants/shared.constants.tsx:197 msgid "additional certifications" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:256 +msgid "Additional Certifications" +msgstr "" + #: src/components/molecules/BatchMetadata/BatchMetadata.tsx:27 +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:50 #: src/pages/CreditClassDetails/tables/CreditClassDetails.TableTabs.config.tsx:33 msgid "Additional Info" msgstr "" @@ -303,18 +338,19 @@ msgid "All uploaded files and their location data will be hidden from public vie msgstr "" #: src/features/marketplace/BridgeFlow/hooks/useCreditBridgeSubmit.tsx:113 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:119 #: src/pages/Marketplace/Storefront/hooks/useCancelSellOrderSubmit.tsx:116 msgid "amount" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:31 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:64 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:38 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:78 #: src/components/organisms/BridgeForm/BridgeForm.tsx:127 -#: src/lib/constants/shared.constants.tsx:32 +#: src/lib/constants/shared.constants.tsx:30 msgid "Amount" msgstr "" -#: src/components/organisms/BasketsTable.tsx:56 +#: src/components/organisms/BasketsTable.tsx:69 msgid "Amount available" msgstr "" @@ -323,11 +359,11 @@ msgstr "" msgid "AMOUNT AVAILABLE" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:125 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:138 msgid "Amount Bridgable" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:141 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:155 msgid "Amount Bridged" msgstr "" @@ -339,7 +375,7 @@ msgstr "" msgid "Amount cannot exceed" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:90 +#: src/components/organisms/EcocreditsTable.tsx:104 msgid "Amount Escrowed" msgstr "" @@ -348,7 +384,7 @@ msgstr "" msgid "amount of credits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:294 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:296 #: src/components/organisms/CreditSendForm/CreditSendForm.tsx:151 msgid "Amount of credits" msgstr "" @@ -359,10 +395,11 @@ msgid "amount retired" msgstr "" #: src/components/organisms/CreditRetireForm/CreditRetireForm.tsx:108 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:130 msgid "Amount retired" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:86 +#: src/components/organisms/EcocreditsTable.tsx:100 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:42 #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:9 msgid "Amount Retired" @@ -372,15 +409,16 @@ msgstr "" msgid "amount sent" msgstr "" -#: src/lib/constants/shared.constants.tsx:65 +#: src/lib/constants/shared.constants.tsx:48 msgid "Amount to sell" msgstr "" #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:8 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:125 msgid "Amount tradable" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:83 +#: src/components/organisms/EcocreditsTable.tsx:97 msgid "Amount Tradable" msgstr "" @@ -392,7 +430,7 @@ msgstr "" msgid "and" msgstr "" -#: src/lib/constants/shared.constants.tsx:58 +#: src/lib/constants/shared.constants.tsx:41 msgid "Apply" msgstr "" @@ -417,11 +455,11 @@ msgstr "" msgid "Are you sure you want to delete this post?" msgstr "" -#: src/lib/constants/shared.constants.tsx:114 +#: src/lib/constants/shared.constants.tsx:86 msgid "Are you sure you want to discard your changes?" msgstr "" -#: src/components/organisms/BasketsTable.tsx:54 +#: src/components/organisms/BasketsTable.tsx:67 msgid "Asset" msgstr "" @@ -445,10 +483,14 @@ msgstr "" msgid "Attest" msgstr "" -#: src/lib/constants/shared.constants.tsx:64 +#: src/lib/constants/shared.constants.tsx:47 msgid "Available" msgstr "" +#: src/lib/constants/shared.constants.tsx:172 +msgid "Avg Price" +msgstr "" + #: src/pages/ProjectEdit/ProjectEdit.tsx:250 msgid "back to projects" msgstr "" @@ -457,12 +499,20 @@ msgstr "" msgid "Background image" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:23 +msgid "basic info" +msgstr "" + #: src/pages/BasicInfo/BasicInfo.tsx:66 #: src/pages/ProjectReview/ProjectReview.tsx:193 msgid "Basic Info" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:50 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:101 +msgid "basket" +msgstr "" + +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:63 msgid "basket ecocredits table" msgstr "" @@ -470,11 +520,12 @@ msgstr "" msgid "Basket Tokens" msgstr "" -#: src/components/organisms/BasketsTable.tsx:40 +#: src/components/organisms/BasketsTable.tsx:52 msgid "baskets table" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:20 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:146 msgid "batch denom" msgstr "" @@ -483,8 +534,8 @@ msgid "Batch denom" msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:34 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:61 -#: src/components/organisms/EcocreditsTable.tsx:79 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:75 +#: src/components/organisms/EcocreditsTable.tsx:93 msgid "Batch Denom" msgstr "" @@ -496,14 +547,14 @@ msgstr "" msgid "batch denom:" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:321 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:323 msgid "Batch denom:" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:72 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:142 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:155 -#: src/components/organisms/EcocreditsTable.tsx:103 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:86 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:155 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:169 +#: src/components/organisms/EcocreditsTable.tsx:117 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:51 msgid "Batch End Date" msgstr "" @@ -516,10 +567,10 @@ msgstr "" msgid "Batch start and end date" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:69 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:137 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:150 -#: src/components/organisms/EcocreditsTable.tsx:102 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:83 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:150 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:164 +#: src/components/organisms/EcocreditsTable.tsx:116 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:48 msgid "Batch Start Date" msgstr "" @@ -533,8 +584,8 @@ msgid "block height" msgstr "" #: src/components/organisms/PostFlow/PostFlow.constants.ts:49 -#: src/lib/constants/shared.constants.tsx:122 -#: src/pages/ProjectFinished/ProjectFinished.tsx:89 +#: src/lib/constants/shared.constants.tsx:94 +#: src/pages/ProjectFinished/ProjectFinished.tsx:93 msgid "blockchain record" msgstr "" @@ -558,7 +609,7 @@ msgstr "" msgid "Bridgable ecocredits" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:81 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:93 msgid "bridgable ecocredits table" msgstr "" @@ -576,7 +627,7 @@ msgstr "" msgid "Bridged ecocredits" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:85 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:98 msgid "bridged ecocredits table" msgstr "" @@ -601,7 +652,7 @@ msgstr "" msgid "Buy" msgstr "" -#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:205 +#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:207 #: src/pages/Marketplace/Storefront/Storefront.constants.ts:5 msgid "BUY" msgstr "" @@ -618,7 +669,7 @@ msgstr "" msgid "buy credits" msgstr "" -#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:205 +#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:207 msgid "BUY CREDITS" msgstr "" @@ -631,7 +682,11 @@ msgstr "" msgid "buy ecocredits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:193 +#: src/lib/constants/shared.constants.tsx:204 +msgid "Buy ecocredits" +msgstr "" + +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:195 msgid "Buy Ecocredits" msgstr "" @@ -640,7 +695,7 @@ msgid "buy NCT" msgstr "" #: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:20 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:440 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:443 msgid "Buy tradable ecocredits" msgstr "" @@ -666,7 +721,7 @@ msgstr "" msgid "cancel" msgstr "" -#: src/lib/constants/shared.constants.tsx:59 +#: src/lib/constants/shared.constants.tsx:42 #: src/pages/Marketplace/Storefront/Storefront.constants.ts:10 msgid "Cancel" msgstr "" @@ -715,7 +770,7 @@ msgstr "" msgid "Changes have been saved" msgstr "" -#: src/lib/constants/shared.constants.tsx:67 +#: src/lib/constants/shared.constants.tsx:50 msgid "Character" msgstr "" @@ -744,15 +799,19 @@ msgstr "" msgid "Choose a practice start date" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:166 +msgid "Choose a sell order" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:192 msgid "Choose a specific location on the map" msgstr "" -#: src/lib/constants/shared.constants.tsx:21 +#: src/lib/constants/shared.constants.tsx:114 msgid "Choose any ecocredits that are eligible for this basket.<0>Learn more»" msgstr "" -#: src/lib/constants/shared.constants.tsx:31 +#: src/lib/constants/shared.constants.tsx:29 msgid "Choose basket" msgstr "" @@ -764,7 +823,7 @@ msgstr "" msgid "Choose denom" msgstr "" -#: src/lib/constants/shared.constants.tsx:19 +#: src/lib/constants/shared.constants.tsx:28 msgid "Choose ecocredits batch" msgstr "" @@ -804,7 +863,7 @@ msgstr "" #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:4 #: src/features/marketplace/BridgeFlow/BridgeFlow.tsx:209 -#: src/lib/constants/shared.constants.tsx:123 +#: src/lib/constants/shared.constants.tsx:95 msgid "CLOSE WINDOW" msgstr "" @@ -812,6 +871,10 @@ msgstr "" msgid "co-benefit" msgstr "" +#: src/lib/constants/shared.constants.tsx:167 +msgid "coming soon" +msgstr "" + #: src/components/organisms/PostForm/PostForm.tsx:278 msgid "Comment" msgstr "" @@ -837,7 +900,7 @@ msgstr "" msgid "Congrats! Your purchase was successful." msgstr "" -#: src/lib/constants/shared.constants.tsx:121 +#: src/lib/constants/shared.constants.tsx:93 msgid "Congrats! Your transaction was successful." msgstr "" @@ -865,7 +928,7 @@ msgstr "" msgid "Connect wallet address" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:35 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:39 msgid "Consumer/Individual/myself" msgstr "" @@ -881,7 +944,7 @@ msgstr "" msgid "Copy and paste an embeddable video url. Supported types include: YouTube, Facebook, Vimeo, Twitch, and DailyMotion." msgstr "" -#: src/lib/constants/shared.constants.tsx:128 +#: src/lib/constants/shared.constants.tsx:100 msgid "Copy link to profile" msgstr "" @@ -889,9 +952,9 @@ msgstr "" msgid "Copy link to project page" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:542 -#: src/lib/constants/shared.constants.tsx:52 -#: src/lib/constants/shared.constants.tsx:75 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:545 +#: src/lib/constants/shared.constants.tsx:58 +#: src/lib/constants/shared.constants.tsx:157 msgid "Country" msgstr "" @@ -908,12 +971,14 @@ msgstr "" msgid "create credit batch" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:141 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:209 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:58 msgid "Create Credit Batch" msgstr "" -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:30 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:31 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:28 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:29 #: src/components/organisms/CreditClassForms/CreditClassFinished.tsx:28 msgid "Create Credit Class" msgstr "" @@ -927,7 +992,7 @@ msgid "create post" msgstr "" #: src/components/molecules/PlanStepper.tsx:16 -#: src/pages/ProjectFinished/ProjectFinished.tsx:62 +#: src/pages/ProjectFinished/ProjectFinished.tsx:66 msgid "Create Project" msgstr "" @@ -944,7 +1009,7 @@ msgstr "" msgid "Created by" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:311 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:313 msgid "credit" msgstr "" @@ -961,6 +1026,7 @@ msgid "Credit Batch Details" msgstr "" #: src/features/marketplace/BridgeFlow/hooks/useCreditBridgeSubmit.tsx:109 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:112 #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:146 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditRetireSubmit.tsx:122 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditSendSubmit.tsx:127 @@ -969,16 +1035,24 @@ msgstr "" msgid "credit batch id" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:115 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:131 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:128 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:145 msgid "Credit Batch Id" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:113 +#: src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx:42 +msgid "credit batch id{0, plural, one {} other {(s)}}" +msgstr "" + +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:74 +msgid "Credit Batch Info" +msgstr "" + +#: src/components/organisms/CreditBatches/CreditBatches.tsx:126 msgid "credit batch table" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:226 +#: src/components/organisms/CreditBatches/CreditBatches.tsx:242 #: src/components/organisms/CreditBatchesSection/CreditBatchesSection.tsx:24 #: src/pages/Dashboard/Dashboard.constants.tsx:37 #: src/pages/EcocreditsByAccount/EcocreditsByAccount.tsx:93 @@ -986,6 +1060,7 @@ msgid "Credit Batches" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:19 +#: src/lib/constants/shared.constants.tsx:194 msgid "credit class" msgstr "" @@ -995,10 +1070,10 @@ msgid "Credit class" msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:47 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:66 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:122 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:138 -#: src/components/organisms/EcocreditsTable.tsx:81 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:80 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:135 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:152 +#: src/components/organisms/EcocreditsTable.tsx:95 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:39 #: src/pages/Projects/AllProjects/AllProjects.constants.ts:10 msgid "Credit Class" @@ -1048,6 +1123,7 @@ msgstr "" msgid "Credit Details" msgstr "" +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:35 #: src/pages/CreditClassDetails/tables/CreditClassDetails.TableTabs.config.tsx:20 msgid "Credit Issuance" msgstr "" @@ -1056,12 +1132,12 @@ msgstr "" msgid "credit name" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:146 +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:150 msgid "Credit prices vary. By default the lowest priced credits will be purchased first." msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:92 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:517 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:94 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:520 msgid "Credit retirement location" msgstr "" @@ -1082,20 +1158,21 @@ msgstr "" msgid "Credit unit definition" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsInput.tsx:67 +#: src/components/molecules/CreditsAmount/CreditsInput.tsx:69 msgid "credits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:218 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:220 msgid "Credits" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:96 +#: src/components/organisms/EcocreditsTable.tsx:110 msgid "Credits are held in escrow when a sell order is created, and taken out of escrow when the sell order is either cancelled, updated with a reduced quantity, or processed." msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:45 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:52 #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx:71 +#: src/lib/constants/shared.constants.tsx:179 msgid "credits available" msgstr "" @@ -1127,10 +1204,18 @@ msgstr "" msgid "Credits have been issued!" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsInput.tsx:55 +msgid "Credits Input" +msgstr "" + #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.tsx:64 msgid "Credits issued" msgstr "" +#: src/lib/constants/shared.constants.tsx:168 +msgid "credits purchased" +msgstr "" + #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.CryptoOptions.tsx:30 msgid "Credits purchased with crypto can be purchased in either a retired or tradable state." msgstr "" @@ -1153,11 +1238,11 @@ msgstr "" msgid "Cropland" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:25 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:28 msgid "Cropland-based credits" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:51 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:59 msgid "Crypto Organization" msgstr "" @@ -1169,6 +1254,10 @@ msgstr "" msgid "CURRENCY DENOM" msgstr "" +#: src/components/molecules/CreditsAmount/CurrencyInput.tsx:91 +msgid "Currency Input" +msgstr "" + #: src/components/organisms/ConnectWalletFlow/ConnectWalletFlow.constants.ts:14 msgid "current account" msgstr "" @@ -1214,6 +1303,10 @@ msgstr "" msgid "Delivery dates may vary widely as this project is still in the early stages of development." msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:26 +msgid "description" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:104 #: src/components/organisms/EditProfileForm/EditProfileForm.tsx:206 #: src/components/organisms/RolesForm/components/ProfileModal/ProfileModal.tsx:155 @@ -1256,7 +1349,7 @@ msgid "Don’t see anything? <0>Resend email." msgstr "" #: src/components/organisms/MediaSection.tsx:50 -#: src/lib/constants/shared.constants.tsx:13 +#: src/lib/constants/shared.constants.tsx:23 #: src/pages/Post/Post.constants.ts:16 msgid "Draft" msgstr "" @@ -1321,11 +1414,11 @@ msgstr "" msgid "ecocredits retired" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:59 +#: src/components/organisms/EcocreditsTable.tsx:72 msgid "ecocredits table" msgstr "" -#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:61 +#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:74 msgid "Ecocredits table" msgstr "" @@ -1346,7 +1439,7 @@ msgstr "" msgid "Ecological Outcomes" msgstr "" -#: src/lib/constants/shared.constants.tsx:132 +#: src/lib/constants/shared.constants.tsx:104 msgid "Ecosystem" msgstr "" @@ -1354,11 +1447,11 @@ msgstr "" msgid "ecosystem type" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:117 +#: src/pages/ProjectFinished/ProjectFinished.tsx:121 msgid "edit" msgstr "" -#: src/lib/constants/shared.constants.tsx:12 +#: src/lib/constants/shared.constants.tsx:22 msgid "Edit" msgstr "" @@ -1370,7 +1463,7 @@ msgstr "" msgid "Edit filters" msgstr "" -#: src/components/organisms/RolesForm/components/RoleField/RoleField.tsx:219 +#: src/components/organisms/RolesForm/components/RoleField/RoleField.tsx:220 msgid "edit profile" msgstr "" @@ -1379,7 +1472,7 @@ msgstr "" msgid "Edit profile" msgstr "" -#: src/lib/constants/shared.constants.tsx:127 +#: src/lib/constants/shared.constants.tsx:99 msgid "Edit Profile" msgstr "" @@ -1399,8 +1492,8 @@ msgstr "" msgid "Edit your file" msgstr "" -#: src/pages/Additionality/Additionality.tsx:26 -#: src/pages/Eligibility/Eligibility.tsx:36 +#: src/pages/Additionality/Additionality.tsx:22 +#: src/pages/Eligibility/Eligibility.tsx:32 msgid "Eligibility" msgstr "" @@ -1420,6 +1513,11 @@ msgstr "" msgid "end date" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:209 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:210 +msgid "End Date" +msgstr "" + #: src/components/organisms/PaymentInfoForm/PaymentInfoForm.PaymentInfo.tsx:59 msgid "Enter a new credit card" msgstr "" @@ -1432,22 +1530,27 @@ msgstr "" msgid "Equivalent to" msgstr "" +#: src/lib/constants/shared.constants.tsx:170 +msgid "Error fetching price" +msgstr "" + #: src/pages/ProjectReview/ProjectReview.tsx:164 msgid "Error getting ISO string for jurisdiction. Please edit your location." msgstr "" #: src/components/templates/ProjectDetails/ProjectDetails.constant.ts:23 +#: src/lib/constants/shared.constants.tsx:178 msgid "estimated issuance" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:61 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:63 msgid "Examples of a retirement reason include: “company travel 2025”, “offsetting my personal footprint”, or the name of a specific person or organization." msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:87 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:67 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:503 -#: src/lib/constants/shared.constants.tsx:44 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:89 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:69 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:506 +#: src/lib/constants/shared.constants.tsx:149 msgid "Explain the reason you are retiring these credits" msgstr "" @@ -1473,7 +1576,7 @@ msgstr "" msgid "Featured Projects" msgstr "" -#: src/lib/constants/shared.constants.tsx:68 +#: src/lib/constants/shared.constants.tsx:51 msgid "File is uploading" msgstr "" @@ -1511,8 +1614,8 @@ msgid "Filters" msgstr "" #: src/components/molecules/PlanStepper.tsx:18 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:42 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:43 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:40 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:41 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:72 msgid "Finished" msgstr "" @@ -1533,7 +1636,7 @@ msgstr "" msgid "For Land Stewards" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:17 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:18 msgid "Forestry-based credits" msgstr "" @@ -1553,7 +1656,7 @@ msgstr "" msgid "Grassland is defined as land made up of large open areas of grasses and herbaceous vegetation which account for greater than 80% of the total vegetation. Grassland projects are not subjective to intensive management such as tilling, but may include pasturelands where grasses and/or legumes are planted for livestock grazing, and land managed with agroforestry practices." msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:21 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:23 msgid "Grasslands-based credits" msgstr "" @@ -1620,7 +1723,7 @@ msgstr "" msgid "If you merge these accounts, you can log in with either your wallet address, email or google to the same account." msgstr "" -#: src/lib/constants/shared.constants.tsx:115 +#: src/lib/constants/shared.constants.tsx:87 msgid "If you proceed, you will lose all unsaved changes you made. This cannot be undone." msgstr "" @@ -1640,7 +1743,7 @@ msgstr "" msgid "Impact" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:50 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:57 msgid "in" msgstr "" @@ -1672,15 +1775,15 @@ msgstr "" msgid "Input an email address to receive a receipt of your purchase.<0>Take note: we will email you a prompt to associate this email with your account for easier future access. This is entirely optional." msgstr "" -#: src/lib/constants/shared.constants.tsx:87 +#: src/lib/constants/shared.constants.tsx:70 msgid "Invalid date" msgstr "" -#: src/lib/constants/shared.constants.tsx:95 +#: src/lib/constants/shared.constants.tsx:78 msgid "Invalid Polygon address" msgstr "" -#: src/lib/constants/shared.constants.tsx:94 +#: src/lib/constants/shared.constants.tsx:77 msgid "Invalid regen address" msgstr "" @@ -1692,10 +1795,10 @@ msgstr "" msgid "issuer" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:63 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:134 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:147 -#: src/components/organisms/EcocreditsTable.tsx:101 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:77 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:147 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:161 +#: src/components/organisms/EcocreditsTable.tsx:115 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:45 msgid "Issuer" msgstr "" @@ -1738,7 +1841,7 @@ msgstr "" msgid "Land Steward" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:47 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:54 msgid "Large Corporation" msgstr "" @@ -1746,6 +1849,10 @@ msgstr "" msgid "Last Updated:" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:56 +msgid "Learn about {creditClassName} credits sourced from {accountName} in {projectAddress}." +msgstr "" + #: src/components/organisms/RegistryLayout/components/ConnectWalletModal/ConnectWalletModal.constants.ts:5 #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:23 msgid "Learn how to" @@ -1753,7 +1860,7 @@ msgstr "" #: src/components/organisms/DetailsSection/DetailsSection.Credit.tsx:54 #: src/components/organisms/MethodologyDocumentationSection.tsx:102 -#: src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx:56 +#: src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx:68 msgid "learn more" msgstr "" @@ -1780,14 +1887,18 @@ msgid "Learn more about wallets in our <0>user guide." msgstr "" #: src/components/organisms/BasketOverview/BasketOverview.Tooltip.tsx:16 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:430 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:459 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:481 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:433 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:462 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:484 #: src/pages/ChooseCreditClass/ChooseCreditClass.config.tsx:10 msgid "Learn more»" msgstr "" -#: src/lib/constants/shared.constants.tsx:11 +#: src/pages/Certificate/Certificate.tsx:79 +msgid "Link copied to your clipboard" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:21 msgid "Link copied!" msgstr "" @@ -1808,8 +1919,12 @@ msgstr "" msgid "Loading..." msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:24 +msgid "location" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:135 -#: src/lib/constants/shared.constants.tsx:70 +#: src/lib/constants/shared.constants.tsx:53 #: src/pages/ProjectLocation/ProjectLocation.tsx:44 #: src/pages/ProjectReview/ProjectReview.tsx:211 msgid "Location" @@ -1819,8 +1934,8 @@ msgstr "" msgid "Location data available on request" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:99 -#: src/lib/constants/shared.constants.tsx:45 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:101 +#: src/lib/constants/shared.constants.tsx:150 msgid "Location of retirement" msgstr "" @@ -1879,15 +1994,16 @@ msgstr "" msgid "Make the location data private" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:80 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:82 msgid "Make your purchase anonymous. Your name will be hidden from the retirement certificate and the certificate will be hidden from your public profile." msgstr "" -#: src/lib/constants/shared.constants.tsx:66 +#: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:29 +#: src/lib/constants/shared.constants.tsx:49 msgid "Max" msgstr "" -#: src/lib/constants/shared.constants.tsx:110 +#: src/lib/constants/shared.constants.tsx:142 msgid "Maximum {maximumFractionDigits} decimal places" msgstr "" @@ -1903,6 +2019,10 @@ msgstr "" msgid "measurement approach" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:27 +msgid "media" +msgstr "" + #: src/pages/Media/Media.tsx:72 #: src/pages/ProjectReview/ProjectReview.tsx:236 msgid "Media" @@ -1916,6 +2036,10 @@ msgstr "" msgid "messages" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:28 +msgid "metadata" +msgstr "" + #: src/components/molecules/MetadataJSONField.tsx:53 #: src/components/organisms/CreditClassForms/CreditClassForm.tsx:105 #: src/components/organisms/CreditClassForms/CreditClassReview.tsx:40 @@ -1924,6 +2048,10 @@ msgstr "" msgid "Metadata" msgstr "" +#: src/lib/constants/shared.constants.tsx:195 +msgid "methodology" +msgstr "" + #: src/components/molecules/MethodologyDetailsColumn.tsx:66 msgid "methodology designer" msgstr "" @@ -1962,11 +2090,11 @@ msgstr "" msgid "More Projects" msgstr "" -#: src/lib/constants/shared.constants.tsx:72 +#: src/lib/constants/shared.constants.tsx:55 msgid "Move down" msgstr "" -#: src/lib/constants/shared.constants.tsx:71 +#: src/lib/constants/shared.constants.tsx:54 msgid "Move up" msgstr "" @@ -1974,12 +2102,16 @@ msgstr "" msgid "MsgCreateProject Error" msgstr "" -#: src/lib/constants/shared.constants.tsx:88 +#: src/lib/constants/shared.constants.tsx:71 msgid "Must be a date in the past" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:248 +msgid "Must be less than or equal to the max credit(s) available ({creditAvailable})." +msgstr "" + #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.constants.tsx:10 -#: src/lib/constants/shared.constants.tsx:99 +#: src/lib/constants/shared.constants.tsx:82 msgid "Must be positive" msgstr "" @@ -2027,11 +2159,11 @@ msgstr "" #: src/components/molecules/ProjectPageFooter.tsx:49 #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:11 -#: src/lib/constants/shared.constants.tsx:14 +#: src/lib/constants/shared.constants.tsx:24 msgid "Next" msgstr "" -#: src/components/organisms/BasketsTable.tsx:32 +#: src/components/organisms/BasketsTable.tsx:44 msgid "No basket tokens to display" msgstr "" @@ -2047,12 +2179,12 @@ msgstr "" msgid "No credit batches to display" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:93 +#: src/components/organisms/CreditBatches/CreditBatches.tsx:106 msgid "No credits issued" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:45 -#: src/components/organisms/EcocreditsTable.tsx:51 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:58 +#: src/components/organisms/EcocreditsTable.tsx:64 msgid "No ecocredits to display" msgstr "" @@ -2060,15 +2192,15 @@ msgstr "" msgid "No matching results found" msgstr "" -#: src/lib/constants/shared.constants.tsx:79 +#: src/lib/constants/shared.constants.tsx:62 msgid "No options available" msgstr "" -#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:53 +#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:66 msgid "No retirements to display" msgstr "" -#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:55 +#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:66 msgid "No sell orders found" msgstr "" @@ -2080,7 +2212,7 @@ msgstr "" msgid "No, my project does not include grasslands" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:43 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:49 msgid "Nonprofit" msgstr "" @@ -2088,7 +2220,7 @@ msgstr "" msgid "Not connected" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:114 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:128 msgid "Note / Link" msgstr "" @@ -2130,7 +2262,7 @@ msgstr "" msgid "Only the locations of the files will be hidden from public view." msgstr "" -#: src/lib/constants/shared.constants.tsx:136 +#: src/lib/constants/shared.constants.tsx:108 msgid "Oops! Page not found." msgstr "" @@ -2170,18 +2302,26 @@ msgstr "" #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:221 #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:340 #: src/components/organisms/MediaForm/MediaFormStory.tsx:209 -#: src/lib/constants/shared.constants.tsx:126 +#: src/lib/constants/shared.constants.tsx:98 msgid "Photo credit" msgstr "" -#: src/lib/constants/shared.constants.tsx:111 +#: src/lib/constants/shared.constants.tsx:83 msgid "Please check your email" msgstr "" -#: src/lib/constants/shared.constants.tsx:96 +#: src/lib/constants/shared.constants.tsx:38 +msgid "Please choose a country" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:79 msgid "Please choose a denom" msgstr "" +#: src/lib/constants/shared.constants.tsx:37 +msgid "Please choose a state" +msgstr "" + #: src/pages/VerifyEmail/VerifyEmail.tsx:44 msgid "Please confirm your email address" msgstr "" @@ -2198,42 +2338,42 @@ msgstr "" msgid "Please contact us at <0>support@regen.networkto resolve this issue. Do not reinitiate the transaction." msgstr "" -#: src/lib/constants/shared.constants.tsx:17 -#: src/lib/constants/shared.constants.tsx:34 -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:56 +#: src/lib/constants/shared.constants.tsx:27 +#: src/lib/constants/shared.constants.tsx:32 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:65 msgid "Please correct the errors above" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:109 -#: src/lib/constants/shared.constants.tsx:50 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:111 +#: src/lib/constants/shared.constants.tsx:155 msgid "Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:526 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:529 msgid "Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations. These credits will auto-retire." msgstr "" -#: src/lib/constants/shared.constants.tsx:85 +#: src/lib/constants/shared.constants.tsx:68 msgid "Please enter a valid amount" msgstr "" -#: src/lib/constants/shared.constants.tsx:81 +#: src/lib/constants/shared.constants.tsx:64 msgid "Please enter a valid email address" msgstr "" -#: src/lib/constants/shared.constants.tsx:89 +#: src/lib/constants/shared.constants.tsx:72 msgid "Please enter a valid URL" msgstr "" -#: src/lib/constants/shared.constants.tsx:92 +#: src/lib/constants/shared.constants.tsx:75 msgid "Please enter a valid VCS Project ID" msgstr "" -#: src/lib/constants/shared.constants.tsx:113 +#: src/lib/constants/shared.constants.tsx:85 msgid "Please enter the code from that email:" msgstr "" -#: src/lib/constants/shared.constants.tsx:93 +#: src/lib/constants/shared.constants.tsx:76 msgid "Please enter valid JSON-LD" msgstr "" @@ -2257,7 +2397,7 @@ msgstr "" msgid "Please switch to this address in Keplr to access this profile." msgstr "" -#: src/lib/constants/shared.constants.tsx:117 +#: src/lib/constants/shared.constants.tsx:89 msgid "Please wait while transaction processes" msgstr "" @@ -2266,7 +2406,7 @@ msgstr "" msgid "Portfolio" msgstr "" -#: src/lib/constants/shared.constants.tsx:63 +#: src/lib/constants/shared.constants.tsx:46 msgid "Position and size your image" msgstr "" @@ -2286,21 +2426,29 @@ msgstr "" msgid "Post is public" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:144 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:148 msgid "Postal code" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:165 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:575 -#: src/lib/constants/shared.constants.tsx:54 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:169 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:586 +#: src/lib/constants/shared.constants.tsx:159 msgid "Postal Code" msgstr "" +#: src/lib/constants/shared.constants.tsx:176 +msgid "prefinance" +msgstr "" + #: src/components/organisms/RegistryLayout/RegistryLayout.config.tsx:49 #: src/pages/Projects/Projects.tsx:83 msgid "Prefinance projects" msgstr "" +#: src/lib/constants/shared.constants.tsx:208 +msgid "prefinance this project" +msgstr "" + #: src/pages/Post/Post.constants.ts:13 msgid "prev" msgstr "" @@ -2309,6 +2457,10 @@ msgstr "" msgid "Previous" msgstr "" +#: src/lib/constants/shared.constants.tsx:177 +msgid "price" +msgstr "" + #: src/components/organisms/CreateSellOrderForm/CreateSellOrderForm.tsx:166 msgid "Price" msgstr "" @@ -2325,6 +2477,10 @@ msgstr "" msgid "PRICE (USD)" msgstr "" +#: src/lib/constants/shared.constants.tsx:181 +msgid "Price of credits for prefinance projects have specific terms, please click on the project to learn more." +msgstr "" + #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:122 #: src/pages/Marketplace/Storefront/hooks/useCancelSellOrderSubmit.tsx:84 msgid "price per credit" @@ -2334,7 +2490,7 @@ msgstr "" msgid "primary impact" msgstr "" -#: src/pages/Certificate/Certificate.tsx:87 +#: src/pages/Certificate/Certificate.tsx:88 msgid "print certificate" msgstr "" @@ -2358,6 +2514,10 @@ msgstr "" msgid "Proceed with caution: this cannot be undone!" msgstr "" +#: src/pages/ProfileEdit/ProfileEdit.Nav.tsx:22 +msgid "profile" +msgstr "" + #: src/pages/ProfileEdit/ProfileEdit.constants.ts:7 msgid "Profile" msgstr "" @@ -2393,6 +2553,7 @@ msgid "Program Guide" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:18 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:105 #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:139 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditRetireSubmit.tsx:113 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditSendSubmit.tsx:118 @@ -2403,11 +2564,13 @@ msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:37 #: src/components/molecules/ProjectSelect.tsx:84 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:58 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:102 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:118 -#: src/components/organisms/EcocreditsTable.tsx:68 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:72 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:115 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:132 +#: src/components/organisms/EcocreditsTable.tsx:82 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:18 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:183 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:79 #: src/pages/Certificate/Certificate.constants.ts:14 #: src/pages/Certificate/Certificate.utils.ts:36 msgid "Project" @@ -2430,7 +2593,7 @@ msgstr "" msgid "Project activity" msgstr "" -#: src/lib/constants/shared.constants.tsx:131 +#: src/lib/constants/shared.constants.tsx:103 msgid "Project Activity" msgstr "" @@ -2446,6 +2609,10 @@ msgstr "" msgid "project benefit" msgstr "" +#: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:110 +msgid "Project Design Document" +msgstr "" + #: src/components/templates/ProjectDetails/ProjectDetails.Stakeholders.tsx:49 msgid "project developer" msgstr "" @@ -2454,16 +2621,21 @@ msgstr "" msgid "Project Developer" msgstr "" +#: src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx:49 +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:25 +msgid "Project documentation" +msgstr "" + #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:133 msgid "project end date" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:50 +#: src/pages/ProjectFinished/ProjectFinished.tsx:54 msgid "Project has been created!" msgstr "" #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:72 -#: src/pages/ProjectFinished/ProjectFinished.tsx:68 +#: src/pages/ProjectFinished/ProjectFinished.tsx:72 msgid "project id" msgstr "" @@ -2479,10 +2651,10 @@ msgstr "" msgid "Project location" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:74 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:145 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:158 -#: src/components/organisms/EcocreditsTable.tsx:104 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:88 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:158 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:172 +#: src/components/organisms/EcocreditsTable.tsx:118 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:57 msgid "Project Location" msgstr "" @@ -2499,7 +2671,7 @@ msgstr "" msgid "Project methodology" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:78 +#: src/pages/ProjectFinished/ProjectFinished.tsx:82 msgid "project name" msgstr "" @@ -2537,6 +2709,7 @@ msgid "Project timeline" msgstr "" #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:102 +#: src/lib/constants/shared.constants.tsx:196 msgid "project type" msgstr "" @@ -2548,7 +2721,7 @@ msgstr "" msgid "PROJECTED:" msgstr "" -#: src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx:57 +#: src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx:68 #: src/components/organisms/RegistryLayout/RegistryLayout.config.tsx:36 #: src/components/organisms/RegistryLayout/RegistryLayout.Footer.tsx:24 #: src/pages/CreditClassDetails/CreditClassDetails.Projects.tsx:43 @@ -2565,7 +2738,7 @@ msgstr "" msgid "public profile tabs" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:406 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:409 msgid "Purchase options" msgstr "" @@ -2574,7 +2747,7 @@ msgid "PURCHASE OPTIONS" msgstr "" #: src/components/organisms/BasketOverview/BasketOverview.constants.ts:3 -#: src/lib/constants/shared.constants.tsx:33 +#: src/lib/constants/shared.constants.tsx:31 #: src/pages/Dashboard/MyEcocredits/MyEcocredits.constants.ts:15 msgid "Put in basket" msgstr "" @@ -2596,7 +2769,12 @@ msgstr "" msgid "Recipient" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:118 +msgid "Recipient {index}" +msgstr "" + #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:7 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:122 msgid "Recipient address" msgstr "" @@ -2628,10 +2806,12 @@ msgstr "" msgid "Regen impact address" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:52 #: src/siteMetadata.ts:4 msgid "Regen Marketplace" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:59 #: src/siteMetadata.ts:6 msgid "Regen Network" msgstr "" @@ -2676,7 +2856,7 @@ msgstr "" msgid "Required since you added a project story title" msgstr "" -#: src/lib/constants/shared.constants.tsx:56 +#: src/lib/constants/shared.constants.tsx:39 msgid "Required with postal code" msgstr "" @@ -2710,6 +2890,10 @@ msgstr "" msgid "Retirable" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:185 +msgid "RETIRABLE ONLY" +msgstr "" + #: src/components/organisms/CreditRetireForm/CreditRetireForm.tsx:136 #: src/components/organisms/Modals/CreditRetireModal/CreditRetireModal.constants.ts:3 msgid "Retire" @@ -2720,11 +2904,11 @@ msgid "Retire all credits upon transfer" msgstr "" #: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:13 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:418 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:421 msgid "Retire credits now" msgstr "" -#: src/lib/constants/shared.constants.tsx:36 +#: src/lib/constants/shared.constants.tsx:34 msgid "Retire credits upon transfer" msgstr "" @@ -2750,29 +2934,31 @@ msgid "Retirement date" msgstr "" #: src/components/organisms/CreditRetireForm/CreditRetireForm.RetirementReminder.tsx:14 -#: src/lib/constants/shared.constants.tsx:57 +#: src/lib/constants/shared.constants.tsx:40 msgid "Retirement is permanent and non-reversible." msgstr "" #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:54 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:139 #: src/pages/Certificate/Certificate.constants.ts:18 msgid "Retirement location" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:77 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:79 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:134 msgid "Retirement note" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:57 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:491 -#: src/lib/constants/shared.constants.tsx:40 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:59 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:494 +#: src/lib/constants/shared.constants.tsx:145 #: src/pages/Certificate/Certificate.constants.ts:17 msgid "Retirement reason" msgstr "" #: src/components/molecules/PlanStepper.tsx:17 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:37 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:38 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:35 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:36 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:67 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:68 #: src/pages/ProjectReview/ProjectReview.tsx:189 @@ -2796,7 +2982,7 @@ msgstr "" msgid "sad bee" msgstr "" -#: src/components/molecules/EditProjectPageFooter.tsx:84 +#: src/components/molecules/EditProjectPageFooter.tsx:86 #: src/components/molecules/ProjectPageFooter.tsx:43 #: src/components/organisms/EditProfileForm/EditProfileForm.constants.tsx:48 msgid "Save" @@ -2806,7 +2992,7 @@ msgstr "" msgid "save draft" msgstr "" -#: src/lib/constants/shared.constants.tsx:15 +#: src/lib/constants/shared.constants.tsx:25 msgid "Save draft & exit" msgstr "" @@ -2828,14 +3014,22 @@ msgstr "" msgid "sectoral scopes" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:222 +msgid "SEE ALL CREDIT BATCHES" +msgstr "" + #: src/components/organisms/ProjectTopSection/ProjectTopSection.constants.ts:3 msgid "See all methodologies" msgstr "" -#: src/lib/constants/shared.constants.tsx:74 +#: src/lib/constants/shared.constants.tsx:57 msgid "See an example»" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:170 +msgid "SEE CREDIT BATCH" +msgstr "" + #: src/components/organisms/CreditClassForms/CreditClassFinished.tsx:48 msgid "see credit class page" msgstr "" @@ -2864,11 +3058,16 @@ msgstr "" msgid "Select all" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:138 +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:139 +msgid "Select option" +msgstr "" + #: src/pages/Dashboard/MyEcocredits/MyEcocredits.constants.ts:11 msgid "Sell" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:273 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:275 #: src/pages/Marketplace/Storefront/hooks/useCheckSellOrderAvailabilty.tsx:48 msgid "Sell order" msgstr "" @@ -2877,6 +3076,10 @@ msgstr "" msgid "Sell Order #" msgstr "" +#: src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx:39 +msgid "Sell Order #{0}" +msgstr "" + #: src/components/organisms/SellOrdersTable/SellOrdersTable.constants.ts:15 msgid "SELL ORDER ID" msgstr "" @@ -2885,7 +3088,7 @@ msgstr "" msgid "sell order id:" msgstr "" -#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:42 +#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:52 #: src/pages/Marketplace/Storefront/Storefront.tsx:248 msgid "Sell orders" msgstr "" @@ -2907,11 +3110,20 @@ msgstr "" msgid "Sender" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:28 +msgid "Set max credits" +msgstr "" + #: src/components/organisms/RegistryLayout/components/ConnectWalletModal/ConnectWalletModal.constants.ts:6 #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:6 msgid "set up a Keplr wallet →" msgstr "" +#: src/pages/ProfileEdit/ProfileEdit.Nav.tsx:23 +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:29 +msgid "settings" +msgstr "" + #: src/pages/Dashboard/Dashboard.constants.tsx:56 #: src/pages/Settings/Settings.tsx:52 msgid "Settings" @@ -2921,7 +3133,7 @@ msgstr "" msgid "share" msgstr "" -#: src/lib/constants/shared.constants.tsx:133 +#: src/lib/constants/shared.constants.tsx:105 #: src/pages/Certificate/Certificate.tsx:74 msgid "Share" msgstr "" @@ -2983,7 +3195,7 @@ msgstr "" msgid "Slug can't be set to an on-chain project ID" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:39 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:44 msgid "Small or Medium Sized Business" msgstr "" @@ -2992,6 +3204,7 @@ msgid "Social Accounts" msgstr "" #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.constants.ts:6 +#: src/lib/constants/shared.constants.tsx:171 msgid "Sold Out" msgstr "" @@ -3011,19 +3224,29 @@ msgstr "" msgid "Sorry, you don’t have any REGEN to cover transaction fees" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:204 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:75 -#: src/lib/constants/shared.constants.tsx:119 +#: src/lib/constants/shared.constants.tsx:91 msgid "Sorry, your transaction was not successful." msgstr "" -#: src/pages/Projects/AllProjects/AllProjects.tsx:192 +#: src/pages/Projects/AllProjects/AllProjects.tsx:206 msgid "Sort by:" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:82 +msgid "Start and end date" +msgstr "" + #: src/components/organisms/CreditBatches/CreditBatches.config.ts:43 msgid "start date" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:199 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:200 +msgid "Start Date" +msgstr "" + #: src/components/organisms/BasketOverview/BasketOverview.tsx:142 msgid "start date window" msgstr "" @@ -3036,11 +3259,11 @@ msgstr "" msgid "Start typing the location" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:141 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:124 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:559 -#: src/lib/constants/shared.constants.tsx:53 -#: src/lib/constants/shared.constants.tsx:76 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:144 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:127 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:567 +#: src/lib/constants/shared.constants.tsx:59 +#: src/lib/constants/shared.constants.tsx:158 msgid "State / Region" msgstr "" @@ -3049,7 +3272,7 @@ msgstr "" msgid "Stats" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:95 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:109 msgid "Status" msgstr "" @@ -3082,11 +3305,11 @@ msgstr "" msgid "Story video or photo" msgstr "" -#: src/lib/constants/shared.constants.tsx:16 +#: src/lib/constants/shared.constants.tsx:26 msgid "submit" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:55 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:64 msgid "Submit" msgstr "" @@ -3118,7 +3341,7 @@ msgstr "" msgid "Switch wallet addresses in Keplr to add another address to your account" msgstr "" -#: src/lib/constants/shared.constants.tsx:38 +#: src/lib/constants/shared.constants.tsx:36 msgid "take from basket" msgstr "" @@ -3160,7 +3383,7 @@ msgstr "" msgid "The caption message must be under {CAPTION_CHART_LIMIT} characters." msgstr "" -#: src/lib/constants/shared.constants.tsx:37 +#: src/lib/constants/shared.constants.tsx:35 msgid "The creator of this basket has chosen that all credits must be retired upon take." msgstr "" @@ -3168,6 +3391,10 @@ msgstr "" msgid "The current address is already linked to your account.\\nPlease first switch wallet addresses in the Keplr app to be able to add another address to your account." msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:220 +msgid "The dates should correspond to the batch monitoring period or vintage." +msgstr "" + #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:25 msgid "The email address you are using to log in is associated with the above wallet address, so it must be the currently selected account in Keplr in order to continue." msgstr "" @@ -3176,7 +3403,7 @@ msgstr "" msgid "The individual or organization that is in charge of managing the project and will appear on the project page." msgstr "" -#: src/lib/constants/shared.constants.tsx:137 +#: src/lib/constants/shared.constants.tsx:109 msgid "The page you are looking for might have been temporarily removed or had its name changed." msgstr "" @@ -3200,14 +3427,14 @@ msgstr "" msgid "The recipient address cannot be the same as the sender address" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:103 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:96 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:521 -#: src/lib/constants/shared.constants.tsx:47 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:105 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:98 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:524 +#: src/lib/constants/shared.constants.tsx:152 msgid "The retirement location can be where you live or your business operates." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:467 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:470 msgid "The seller of these credits has chosen to only allow for immediate retiring of credits. These credits cannot be purchased as a tradable asset." msgstr "" @@ -3228,7 +3455,7 @@ msgstr "" msgid "These credits are currently sold out. More may become available in the future." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:443 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:446 msgid "These credits will be a tradable asset. They can be retired later via Regen Marketplace." msgstr "" @@ -3236,7 +3463,7 @@ msgstr "" msgid "These credits will be a tradeable asset. They can be retired later via Regen Marketplace." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:421 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:424 msgid "These credits will be retired upon purchase and will not be tradable. Retirement is permanent and non-reversible." msgstr "" @@ -3261,7 +3488,7 @@ msgstr "" msgid "This data is on chain or anchored on chain via a content hash." msgstr "" -#: src/lib/constants/shared.constants.tsx:80 +#: src/lib/constants/shared.constants.tsx:63 msgid "This field is required" msgstr "" @@ -3286,6 +3513,7 @@ msgid "This is the median average price for all open sell orders in this credit msgstr "" #: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.constants.ts:6 +#: src/lib/constants/shared.constants.tsx:174 msgid "This is the median average price of all open sell orders for this project." msgstr "" @@ -3298,11 +3526,11 @@ msgstr "" msgid "This is the Polygon address of the recipient." msgstr "" -#: src/lib/constants/shared.constants.tsx:69 +#: src/lib/constants/shared.constants.tsx:52 msgid "This may take some time if your file size is large." msgstr "" -#: src/lib/constants/shared.constants.tsx:118 +#: src/lib/constants/shared.constants.tsx:90 msgid "This may take up to 15 seconds." msgstr "" @@ -3335,7 +3563,7 @@ msgstr "" msgid "Timeline" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:92 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:106 msgid "Timestamp" msgstr "" @@ -3403,6 +3631,10 @@ msgstr "" msgid "Tradable" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:175 +msgid "TRADABLE AND RETIRABLE" +msgstr "" + #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.constants.ts:4 msgid "Tradable credits have no yet been retired and can be held, sold, or sent to another party." msgstr "" @@ -3420,7 +3652,7 @@ msgstr "" msgid "tx hash" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:91 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:105 msgid "Tx Hash" msgstr "" @@ -3436,6 +3668,7 @@ msgstr "" msgid "Unlock <0>Regenerative Finances<1>with <2>Regen Marketplace" msgstr "" +#: src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx:69 #: src/pages/ProfileEdit/ProfileEdit.constants.ts:12 msgid "Unnamed" msgstr "" @@ -3448,11 +3681,11 @@ msgstr "" msgid "Untitled" msgstr "" -#: src/lib/constants/shared.constants.tsx:60 +#: src/lib/constants/shared.constants.tsx:43 msgid "Update" msgstr "" -#: src/lib/constants/shared.constants.tsx:62 +#: src/lib/constants/shared.constants.tsx:45 msgid "Update image details" msgstr "" @@ -3464,11 +3697,11 @@ msgstr "" msgid "Upload image" msgstr "" -#: src/lib/constants/shared.constants.tsx:61 +#: src/lib/constants/shared.constants.tsx:44 msgid "Uploading image" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:100 +#: src/pages/ProjectFinished/ProjectFinished.tsx:104 msgid "url" msgstr "" @@ -3492,11 +3725,11 @@ msgstr "" msgid "useMultiStep must be used within a MultiStepProvider" msgstr "" -#: src/lib/constants/shared.constants.tsx:130 +#: src/lib/constants/shared.constants.tsx:102 msgid "user profile avatar" msgstr "" -#: src/lib/constants/shared.constants.tsx:129 +#: src/lib/constants/shared.constants.tsx:101 msgid "user profile background image" msgstr "" @@ -3532,10 +3765,19 @@ msgstr "" msgid "vcs retirement serial number" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:228 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:86 +msgid "VCS retirement serial number" +msgstr "" + #: src/pages/CreditClassDetails/CreditClassDetails.AdditionalInfo.tsx:95 msgid "verification method" msgstr "" +#: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:68 +msgid "Verification report" +msgstr "" + #: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:65 msgid "verification reports" msgstr "" @@ -3576,6 +3818,10 @@ msgstr "" msgid "view credit class doc" msgstr "" +#: src/lib/constants/shared.constants.tsx:169 +msgid "view details" +msgstr "" + #: src/components/organisms/Documentation/Documentation.constants.ts:16 #: src/components/organisms/MethodologyDocumentationSection.tsx:86 msgid "view document" @@ -3590,7 +3836,7 @@ msgid "view methodology" msgstr "" #: src/components/organisms/Documentation/Documentation.constants.ts:15 -#: src/lib/constants/shared.constants.tsx:135 +#: src/lib/constants/shared.constants.tsx:107 msgid "view on ledger" msgstr "" @@ -3610,6 +3856,10 @@ msgstr "" msgid "View Profile" msgstr "" +#: src/lib/constants/shared.constants.tsx:214 +msgid "view project" +msgstr "" + #: src/components/atoms/WrappedResourcesCard.tsx:33 msgid "view resource" msgstr "" @@ -3630,7 +3880,7 @@ msgstr "" msgid "View your ecocredits" msgstr "" -#: src/lib/constants/shared.constants.tsx:120 +#: src/lib/constants/shared.constants.tsx:92 msgid "view your portfolio" msgstr "" @@ -3638,11 +3888,23 @@ msgstr "" msgid "VIEW YOUR PORTFOLIO" msgstr "" +#: src/lib/constants/shared.constants.tsx:191 +msgid "vintage id" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:192 +msgid "vintage id (serial number)" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:193 +msgid "vintage period" +msgstr "" + #: src/features/marketplace/BridgeFlow/BridgeFlow.constants.ts:6 msgid "Visit toucan.earth to view the transaction." msgstr "" -#: src/lib/constants/shared.constants.tsx:139 +#: src/lib/constants/shared.constants.tsx:126 msgid "Visit Our Homepage <0> Instead" msgstr "" @@ -3674,7 +3936,7 @@ msgstr "" msgid "We will send your receipt to the email address below, which is already linked to your account." msgstr "" -#: src/lib/constants/shared.constants.tsx:112 +#: src/lib/constants/shared.constants.tsx:84 #: src/pages/VerifyEmail/VerifyEmail.tsx:48 msgid "We've just sent a confirmation email to:" msgstr "" @@ -3727,7 +3989,7 @@ msgstr "" msgid "yes, delete" msgstr "" -#: src/lib/constants/shared.constants.tsx:116 +#: src/lib/constants/shared.constants.tsx:88 msgid "yes, discard" msgstr "" @@ -3755,12 +4017,12 @@ msgstr "" msgid "You are not yet listed as an issuer on any credit classes" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:81 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:495 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:83 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:498 msgid "You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. 'Retired on behalf of ABC Organization')" msgstr "" -#: src/lib/constants/shared.constants.tsx:42 +#: src/lib/constants/shared.constants.tsx:147 msgid "You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. \"Retired on behalf of ABC Organization\")" msgstr "" @@ -3792,7 +4054,11 @@ msgstr "" msgid "You do not have any tradable credits to sell from this project." msgstr "" -#: src/lib/constants/shared.constants.tsx:35 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:244 +msgid "You don’t have enough {displayDenom}." +msgstr "" + +#: src/lib/constants/shared.constants.tsx:33 msgid "You don't have enough basket tokens" msgstr "" @@ -3816,7 +4082,7 @@ msgstr "" msgid "You must add at most {GALLERY_PHOTOS_MAX} photos to the photo gallery." msgstr "" -#: src/lib/constants/shared.constants.tsx:84 +#: src/lib/constants/shared.constants.tsx:67 msgid "You must agree to continue" msgstr "" diff --git a/web-marketplace/src/lib/i18n/locales/es.po b/web-marketplace/src/lib/i18n/locales/es.po index facbd9c1fb..353e163141 100644 --- a/web-marketplace/src/lib/i18n/locales/es.po +++ b/web-marketplace/src/lib/i18n/locales/es.po @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2024-09-18 09:25+0200\n" +"POT-Creation-Date: 2024-09-19 17:38+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -9,11 +9,11 @@ msgstr "" #: src/components/organisms/CreditActivityTable/CreditActivityTable.tsx:65 #: src/components/organisms/Documentation/Documentation.constants.ts:11 -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:31 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:35 msgid "" msgstr "" -#: src/lib/constants/shared.constants.tsx:124 +#: src/lib/constants/shared.constants.tsx:96 msgid "- see less" msgstr "" @@ -29,11 +29,11 @@ msgstr "" msgid "(file will be associated with the project location by default)" msgstr "" -#: src/lib/constants/shared.constants.tsx:78 +#: src/lib/constants/shared.constants.tsx:61 msgid "(optional)" msgstr "" -#: src/lib/constants/shared.constants.tsx:77 +#: src/lib/constants/shared.constants.tsx:60 msgid "(preferable)" msgstr "" @@ -53,6 +53,18 @@ msgstr "" msgid "{ADDRESS_USED_ERROR} Do you want to merge these accounts?" msgstr "" +#: src/lib/constants/shared.constants.tsx:230 +msgid "{from}–{displayedTo} of {count}" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:231 +msgid "{from}–{displayedTo} of more than {to}" +msgstr "" + +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:85 +msgid "{price} {displayDenom}/credit:" +msgstr "" + #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:329 msgid "{remainingCaptionCharacters, plural, one {{remainingCaptionCharacters} character remaining} other {{remainingCaptionCharacters} characters remaining}}" msgstr "" @@ -79,11 +91,15 @@ msgstr "" msgid "{remainingTitleCharacters, plural, one {{remainingTitleCharacters} character remaining} other {{remainingTitleCharacters} characters remaining}}" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:90 +msgid "{truncatedQuantity} credit(s) available" +msgstr "" + #: src/pages/CreditClassDetails/CreditClassDetails.ApprovedMethodologies.tsx:57 msgid "+ {0} more" msgstr "" -#: src/lib/constants/shared.constants.tsx:73 +#: src/lib/constants/shared.constants.tsx:56 msgid "+ add" msgstr "" @@ -91,6 +107,10 @@ msgstr "" msgid "+ add another issuer'" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:300 +msgid "+ add certification" +msgstr "" + #: src/components/organisms/RolesForm/components/RoleField/RoleField.AddNewProfile.tsx:34 msgid "+ Add New Profile" msgstr "" @@ -105,7 +125,7 @@ msgstr "" msgid "+ create post" msgstr "" -#: src/lib/constants/shared.constants.tsx:125 +#: src/lib/constants/shared.constants.tsx:97 msgid "+ see more" msgstr "" @@ -202,7 +222,7 @@ msgstr "" msgid "actions" msgstr "" -#: src/lib/constants/shared.constants.tsx:134 +#: src/lib/constants/shared.constants.tsx:106 msgid "Actions" msgstr "" @@ -213,6 +233,7 @@ msgid "Activity" msgstr "" #: src/components/templates/ProjectDetails/ProjectDetails.constant.ts:24 +#: src/lib/constants/shared.constants.tsx:184 msgid "Actual number of credits issued may be different from the estimated issuance." msgstr "" @@ -240,6 +261,14 @@ msgstr "" msgid "Additional Certificate" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:163 +msgid "Additional certification {index}" +msgstr "" + +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:170 +msgid "Additional certification {index} url" +msgstr "" + #: src/components/organisms/CertificationForm/CertificationForm.tsx:62 msgid "Additional certification name" msgstr "" @@ -249,10 +278,16 @@ msgid "Additional certification url" msgstr "" #: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:49 +#: src/lib/constants/shared.constants.tsx:197 msgid "additional certifications" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:256 +msgid "Additional Certifications" +msgstr "" + #: src/components/molecules/BatchMetadata/BatchMetadata.tsx:27 +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:50 #: src/pages/CreditClassDetails/tables/CreditClassDetails.TableTabs.config.tsx:33 msgid "Additional Info" msgstr "" @@ -303,18 +338,19 @@ msgid "All uploaded files and their location data will be hidden from public vie msgstr "" #: src/features/marketplace/BridgeFlow/hooks/useCreditBridgeSubmit.tsx:113 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:119 #: src/pages/Marketplace/Storefront/hooks/useCancelSellOrderSubmit.tsx:116 msgid "amount" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:31 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:64 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:38 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:78 #: src/components/organisms/BridgeForm/BridgeForm.tsx:127 -#: src/lib/constants/shared.constants.tsx:32 +#: src/lib/constants/shared.constants.tsx:30 msgid "Amount" msgstr "" -#: src/components/organisms/BasketsTable.tsx:56 +#: src/components/organisms/BasketsTable.tsx:69 msgid "Amount available" msgstr "" @@ -323,11 +359,11 @@ msgstr "" msgid "AMOUNT AVAILABLE" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:125 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:138 msgid "Amount Bridgable" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:141 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:155 msgid "Amount Bridged" msgstr "" @@ -339,7 +375,7 @@ msgstr "" msgid "Amount cannot exceed" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:90 +#: src/components/organisms/EcocreditsTable.tsx:104 msgid "Amount Escrowed" msgstr "" @@ -348,7 +384,7 @@ msgstr "" msgid "amount of credits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:294 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:296 #: src/components/organisms/CreditSendForm/CreditSendForm.tsx:151 msgid "Amount of credits" msgstr "" @@ -359,10 +395,11 @@ msgid "amount retired" msgstr "" #: src/components/organisms/CreditRetireForm/CreditRetireForm.tsx:108 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:130 msgid "Amount retired" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:86 +#: src/components/organisms/EcocreditsTable.tsx:100 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:42 #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:9 msgid "Amount Retired" @@ -372,15 +409,16 @@ msgstr "" msgid "amount sent" msgstr "" -#: src/lib/constants/shared.constants.tsx:65 +#: src/lib/constants/shared.constants.tsx:48 msgid "Amount to sell" msgstr "" #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:8 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:125 msgid "Amount tradable" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:83 +#: src/components/organisms/EcocreditsTable.tsx:97 msgid "Amount Tradable" msgstr "" @@ -392,7 +430,7 @@ msgstr "" msgid "and" msgstr "" -#: src/lib/constants/shared.constants.tsx:58 +#: src/lib/constants/shared.constants.tsx:41 msgid "Apply" msgstr "" @@ -417,11 +455,11 @@ msgstr "" msgid "Are you sure you want to delete this post?" msgstr "" -#: src/lib/constants/shared.constants.tsx:114 +#: src/lib/constants/shared.constants.tsx:86 msgid "Are you sure you want to discard your changes?" msgstr "" -#: src/components/organisms/BasketsTable.tsx:54 +#: src/components/organisms/BasketsTable.tsx:67 msgid "Asset" msgstr "" @@ -445,10 +483,14 @@ msgstr "" msgid "Attest" msgstr "" -#: src/lib/constants/shared.constants.tsx:64 +#: src/lib/constants/shared.constants.tsx:47 msgid "Available" msgstr "" +#: src/lib/constants/shared.constants.tsx:172 +msgid "Avg Price" +msgstr "" + #: src/pages/ProjectEdit/ProjectEdit.tsx:250 msgid "back to projects" msgstr "" @@ -457,12 +499,20 @@ msgstr "" msgid "Background image" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:23 +msgid "basic info" +msgstr "" + #: src/pages/BasicInfo/BasicInfo.tsx:66 #: src/pages/ProjectReview/ProjectReview.tsx:193 msgid "Basic Info" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:50 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:101 +msgid "basket" +msgstr "" + +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:63 msgid "basket ecocredits table" msgstr "" @@ -470,11 +520,12 @@ msgstr "" msgid "Basket Tokens" msgstr "" -#: src/components/organisms/BasketsTable.tsx:40 +#: src/components/organisms/BasketsTable.tsx:52 msgid "baskets table" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:20 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:146 msgid "batch denom" msgstr "" @@ -483,8 +534,8 @@ msgid "Batch denom" msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:34 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:61 -#: src/components/organisms/EcocreditsTable.tsx:79 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:75 +#: src/components/organisms/EcocreditsTable.tsx:93 msgid "Batch Denom" msgstr "" @@ -496,14 +547,14 @@ msgstr "" msgid "batch denom:" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:321 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:323 msgid "Batch denom:" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:72 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:142 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:155 -#: src/components/organisms/EcocreditsTable.tsx:103 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:86 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:155 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:169 +#: src/components/organisms/EcocreditsTable.tsx:117 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:51 msgid "Batch End Date" msgstr "" @@ -516,10 +567,10 @@ msgstr "" msgid "Batch start and end date" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:69 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:137 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:150 -#: src/components/organisms/EcocreditsTable.tsx:102 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:83 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:150 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:164 +#: src/components/organisms/EcocreditsTable.tsx:116 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:48 msgid "Batch Start Date" msgstr "" @@ -533,8 +584,8 @@ msgid "block height" msgstr "" #: src/components/organisms/PostFlow/PostFlow.constants.ts:49 -#: src/lib/constants/shared.constants.tsx:122 -#: src/pages/ProjectFinished/ProjectFinished.tsx:89 +#: src/lib/constants/shared.constants.tsx:94 +#: src/pages/ProjectFinished/ProjectFinished.tsx:93 msgid "blockchain record" msgstr "" @@ -558,7 +609,7 @@ msgstr "" msgid "Bridgable ecocredits" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:81 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:93 msgid "bridgable ecocredits table" msgstr "" @@ -576,7 +627,7 @@ msgstr "" msgid "Bridged ecocredits" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:85 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:98 msgid "bridged ecocredits table" msgstr "" @@ -601,7 +652,7 @@ msgstr "" msgid "Buy" msgstr "" -#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:205 +#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:207 #: src/pages/Marketplace/Storefront/Storefront.constants.ts:5 msgid "BUY" msgstr "" @@ -618,7 +669,7 @@ msgstr "" msgid "buy credits" msgstr "" -#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:205 +#: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.tsx:207 msgid "BUY CREDITS" msgstr "" @@ -631,7 +682,11 @@ msgstr "" msgid "buy ecocredits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:193 +#: src/lib/constants/shared.constants.tsx:204 +msgid "Buy ecocredits" +msgstr "" + +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:195 msgid "Buy Ecocredits" msgstr "" @@ -640,7 +695,7 @@ msgid "buy NCT" msgstr "" #: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:20 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:440 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:443 msgid "Buy tradable ecocredits" msgstr "" @@ -666,7 +721,7 @@ msgstr "" msgid "cancel" msgstr "" -#: src/lib/constants/shared.constants.tsx:59 +#: src/lib/constants/shared.constants.tsx:42 #: src/pages/Marketplace/Storefront/Storefront.constants.ts:10 msgid "Cancel" msgstr "" @@ -715,7 +770,7 @@ msgstr "" msgid "Changes have been saved" msgstr "" -#: src/lib/constants/shared.constants.tsx:67 +#: src/lib/constants/shared.constants.tsx:50 msgid "Character" msgstr "" @@ -744,15 +799,19 @@ msgstr "" msgid "Choose a practice start date" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:166 +msgid "Choose a sell order" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:192 msgid "Choose a specific location on the map" msgstr "" -#: src/lib/constants/shared.constants.tsx:21 +#: src/lib/constants/shared.constants.tsx:114 msgid "Choose any ecocredits that are eligible for this basket.<0>Learn more»" msgstr "" -#: src/lib/constants/shared.constants.tsx:31 +#: src/lib/constants/shared.constants.tsx:29 msgid "Choose basket" msgstr "" @@ -764,7 +823,7 @@ msgstr "" msgid "Choose denom" msgstr "" -#: src/lib/constants/shared.constants.tsx:19 +#: src/lib/constants/shared.constants.tsx:28 msgid "Choose ecocredits batch" msgstr "" @@ -804,7 +863,7 @@ msgstr "" #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:4 #: src/features/marketplace/BridgeFlow/BridgeFlow.tsx:209 -#: src/lib/constants/shared.constants.tsx:123 +#: src/lib/constants/shared.constants.tsx:95 msgid "CLOSE WINDOW" msgstr "" @@ -812,6 +871,10 @@ msgstr "" msgid "co-benefit" msgstr "" +#: src/lib/constants/shared.constants.tsx:167 +msgid "coming soon" +msgstr "" + #: src/components/organisms/PostForm/PostForm.tsx:278 msgid "Comment" msgstr "" @@ -837,7 +900,7 @@ msgstr "" msgid "Congrats! Your purchase was successful." msgstr "" -#: src/lib/constants/shared.constants.tsx:121 +#: src/lib/constants/shared.constants.tsx:93 msgid "Congrats! Your transaction was successful." msgstr "" @@ -865,7 +928,7 @@ msgstr "" msgid "Connect wallet address" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:35 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:39 msgid "Consumer/Individual/myself" msgstr "" @@ -881,7 +944,7 @@ msgstr "" msgid "Copy and paste an embeddable video url. Supported types include: YouTube, Facebook, Vimeo, Twitch, and DailyMotion." msgstr "" -#: src/lib/constants/shared.constants.tsx:128 +#: src/lib/constants/shared.constants.tsx:100 msgid "Copy link to profile" msgstr "" @@ -889,9 +952,9 @@ msgstr "" msgid "Copy link to project page" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:542 -#: src/lib/constants/shared.constants.tsx:52 -#: src/lib/constants/shared.constants.tsx:75 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:545 +#: src/lib/constants/shared.constants.tsx:58 +#: src/lib/constants/shared.constants.tsx:157 msgid "Country" msgstr "" @@ -908,12 +971,14 @@ msgstr "" msgid "create credit batch" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:141 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:209 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:58 msgid "Create Credit Batch" msgstr "" -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:30 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:31 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:28 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:29 #: src/components/organisms/CreditClassForms/CreditClassFinished.tsx:28 msgid "Create Credit Class" msgstr "" @@ -927,7 +992,7 @@ msgid "create post" msgstr "" #: src/components/molecules/PlanStepper.tsx:16 -#: src/pages/ProjectFinished/ProjectFinished.tsx:62 +#: src/pages/ProjectFinished/ProjectFinished.tsx:66 msgid "Create Project" msgstr "" @@ -944,7 +1009,7 @@ msgstr "" msgid "Created by" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:311 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:313 msgid "credit" msgstr "" @@ -961,6 +1026,7 @@ msgid "Credit Batch Details" msgstr "" #: src/features/marketplace/BridgeFlow/hooks/useCreditBridgeSubmit.tsx:109 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:112 #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:146 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditRetireSubmit.tsx:122 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditSendSubmit.tsx:127 @@ -969,16 +1035,24 @@ msgstr "" msgid "credit batch id" msgstr "" -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:115 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:131 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:128 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:145 msgid "Credit Batch Id" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:113 +#: src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx:42 +msgid "credit batch id{0, plural, one {} other {(s)}}" +msgstr "" + +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:74 +msgid "Credit Batch Info" +msgstr "" + +#: src/components/organisms/CreditBatches/CreditBatches.tsx:126 msgid "credit batch table" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:226 +#: src/components/organisms/CreditBatches/CreditBatches.tsx:242 #: src/components/organisms/CreditBatchesSection/CreditBatchesSection.tsx:24 #: src/pages/Dashboard/Dashboard.constants.tsx:37 #: src/pages/EcocreditsByAccount/EcocreditsByAccount.tsx:93 @@ -986,6 +1060,7 @@ msgid "Credit Batches" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:19 +#: src/lib/constants/shared.constants.tsx:194 msgid "credit class" msgstr "" @@ -995,10 +1070,10 @@ msgid "Credit class" msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:47 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:66 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:122 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:138 -#: src/components/organisms/EcocreditsTable.tsx:81 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:80 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:135 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:152 +#: src/components/organisms/EcocreditsTable.tsx:95 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:39 #: src/pages/Projects/AllProjects/AllProjects.constants.ts:10 msgid "Credit Class" @@ -1048,6 +1123,7 @@ msgstr "" msgid "Credit Details" msgstr "" +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:35 #: src/pages/CreditClassDetails/tables/CreditClassDetails.TableTabs.config.tsx:20 msgid "Credit Issuance" msgstr "" @@ -1056,12 +1132,12 @@ msgstr "" msgid "credit name" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:146 +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:150 msgid "Credit prices vary. By default the lowest priced credits will be purchased first." msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:92 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:517 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:94 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:520 msgid "Credit retirement location" msgstr "" @@ -1082,20 +1158,21 @@ msgstr "" msgid "Credit unit definition" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsInput.tsx:67 +#: src/components/molecules/CreditsAmount/CreditsInput.tsx:69 msgid "credits" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:218 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:220 msgid "Credits" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:96 +#: src/components/organisms/EcocreditsTable.tsx:110 msgid "Credits are held in escrow when a sell order is created, and taken out of escrow when the sell order is either cancelled, updated with a reduced quantity, or processed." msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:45 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:52 #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.AdvanceSettings.tsx:71 +#: src/lib/constants/shared.constants.tsx:179 msgid "credits available" msgstr "" @@ -1127,10 +1204,18 @@ msgstr "" msgid "Credits have been issued!" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsInput.tsx:55 +msgid "Credits Input" +msgstr "" + #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.tsx:64 msgid "Credits issued" msgstr "" +#: src/lib/constants/shared.constants.tsx:168 +msgid "credits purchased" +msgstr "" + #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.CryptoOptions.tsx:30 msgid "Credits purchased with crypto can be purchased in either a retired or tradable state." msgstr "" @@ -1153,11 +1238,11 @@ msgstr "" msgid "Cropland" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:25 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:28 msgid "Cropland-based credits" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:51 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:59 msgid "Crypto Organization" msgstr "" @@ -1169,6 +1254,10 @@ msgstr "" msgid "CURRENCY DENOM" msgstr "" +#: src/components/molecules/CreditsAmount/CurrencyInput.tsx:91 +msgid "Currency Input" +msgstr "" + #: src/components/organisms/ConnectWalletFlow/ConnectWalletFlow.constants.ts:14 msgid "current account" msgstr "" @@ -1214,6 +1303,10 @@ msgstr "" msgid "Delivery dates may vary widely as this project is still in the early stages of development." msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:26 +msgid "description" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:104 #: src/components/organisms/EditProfileForm/EditProfileForm.tsx:206 #: src/components/organisms/RolesForm/components/ProfileModal/ProfileModal.tsx:155 @@ -1256,7 +1349,7 @@ msgid "Don’t see anything? <0>Resend email." msgstr "" #: src/components/organisms/MediaSection.tsx:50 -#: src/lib/constants/shared.constants.tsx:13 +#: src/lib/constants/shared.constants.tsx:23 #: src/pages/Post/Post.constants.ts:16 msgid "Draft" msgstr "" @@ -1321,11 +1414,11 @@ msgstr "" msgid "ecocredits retired" msgstr "" -#: src/components/organisms/EcocreditsTable.tsx:59 +#: src/components/organisms/EcocreditsTable.tsx:72 msgid "ecocredits table" msgstr "" -#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:61 +#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:74 msgid "Ecocredits table" msgstr "" @@ -1346,7 +1439,7 @@ msgstr "" msgid "Ecological Outcomes" msgstr "" -#: src/lib/constants/shared.constants.tsx:132 +#: src/lib/constants/shared.constants.tsx:104 msgid "Ecosystem" msgstr "" @@ -1354,11 +1447,11 @@ msgstr "" msgid "ecosystem type" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:117 +#: src/pages/ProjectFinished/ProjectFinished.tsx:121 msgid "edit" msgstr "" -#: src/lib/constants/shared.constants.tsx:12 +#: src/lib/constants/shared.constants.tsx:22 msgid "Edit" msgstr "" @@ -1370,7 +1463,7 @@ msgstr "" msgid "Edit filters" msgstr "" -#: src/components/organisms/RolesForm/components/RoleField/RoleField.tsx:219 +#: src/components/organisms/RolesForm/components/RoleField/RoleField.tsx:220 msgid "edit profile" msgstr "" @@ -1379,7 +1472,7 @@ msgstr "" msgid "Edit profile" msgstr "" -#: src/lib/constants/shared.constants.tsx:127 +#: src/lib/constants/shared.constants.tsx:99 msgid "Edit Profile" msgstr "" @@ -1399,8 +1492,8 @@ msgstr "" msgid "Edit your file" msgstr "" -#: src/pages/Additionality/Additionality.tsx:26 -#: src/pages/Eligibility/Eligibility.tsx:36 +#: src/pages/Additionality/Additionality.tsx:22 +#: src/pages/Eligibility/Eligibility.tsx:32 msgid "Eligibility" msgstr "" @@ -1420,6 +1513,11 @@ msgstr "" msgid "end date" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:209 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:210 +msgid "End Date" +msgstr "" + #: src/components/organisms/PaymentInfoForm/PaymentInfoForm.PaymentInfo.tsx:59 msgid "Enter a new credit card" msgstr "" @@ -1432,22 +1530,27 @@ msgstr "" msgid "Equivalent to" msgstr "" +#: src/lib/constants/shared.constants.tsx:170 +msgid "Error fetching price" +msgstr "" + #: src/pages/ProjectReview/ProjectReview.tsx:164 msgid "Error getting ISO string for jurisdiction. Please edit your location." msgstr "" #: src/components/templates/ProjectDetails/ProjectDetails.constant.ts:23 +#: src/lib/constants/shared.constants.tsx:178 msgid "estimated issuance" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:61 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:63 msgid "Examples of a retirement reason include: “company travel 2025”, “offsetting my personal footprint”, or the name of a specific person or organization." msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:87 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:67 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:503 -#: src/lib/constants/shared.constants.tsx:44 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:89 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:69 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:506 +#: src/lib/constants/shared.constants.tsx:149 msgid "Explain the reason you are retiring these credits" msgstr "" @@ -1473,7 +1576,7 @@ msgstr "" msgid "Featured Projects" msgstr "" -#: src/lib/constants/shared.constants.tsx:68 +#: src/lib/constants/shared.constants.tsx:51 msgid "File is uploading" msgstr "" @@ -1511,8 +1614,8 @@ msgid "Filters" msgstr "" #: src/components/molecules/PlanStepper.tsx:18 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:42 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:43 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:40 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:41 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:72 msgid "Finished" msgstr "" @@ -1533,7 +1636,7 @@ msgstr "" msgid "For Land Stewards" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:17 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:18 msgid "Forestry-based credits" msgstr "" @@ -1553,7 +1656,7 @@ msgstr "" msgid "Grassland is defined as land made up of large open areas of grasses and herbaceous vegetation which account for greater than 80% of the total vegetation. Grassland projects are not subjective to intensive management such as tilling, but may include pasturelands where grasses and/or legumes are planted for livestock grazing, and land managed with agroforestry practices." msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:21 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:23 msgid "Grasslands-based credits" msgstr "" @@ -1620,7 +1723,7 @@ msgstr "" msgid "If you merge these accounts, you can log in with either your wallet address, email or google to the same account." msgstr "" -#: src/lib/constants/shared.constants.tsx:115 +#: src/lib/constants/shared.constants.tsx:87 msgid "If you proceed, you will lose all unsaved changes you made. This cannot be undone." msgstr "" @@ -1640,7 +1743,7 @@ msgstr "" msgid "Impact" msgstr "" -#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:50 +#: src/components/molecules/CreditsAmount/CreditsAmount.Header.tsx:57 msgid "in" msgstr "" @@ -1672,15 +1775,15 @@ msgstr "" msgid "Input an email address to receive a receipt of your purchase.<0>Take note: we will email you a prompt to associate this email with your account for easier future access. This is entirely optional." msgstr "" -#: src/lib/constants/shared.constants.tsx:87 +#: src/lib/constants/shared.constants.tsx:70 msgid "Invalid date" msgstr "" -#: src/lib/constants/shared.constants.tsx:95 +#: src/lib/constants/shared.constants.tsx:78 msgid "Invalid Polygon address" msgstr "" -#: src/lib/constants/shared.constants.tsx:94 +#: src/lib/constants/shared.constants.tsx:77 msgid "Invalid regen address" msgstr "" @@ -1692,10 +1795,10 @@ msgstr "" msgid "issuer" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:63 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:134 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:147 -#: src/components/organisms/EcocreditsTable.tsx:101 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:77 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:147 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:161 +#: src/components/organisms/EcocreditsTable.tsx:115 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:45 msgid "Issuer" msgstr "" @@ -1738,7 +1841,7 @@ msgstr "" msgid "Land Steward" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:47 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:54 msgid "Large Corporation" msgstr "" @@ -1746,6 +1849,10 @@ msgstr "" msgid "Last Updated:" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:56 +msgid "Learn about {creditClassName} credits sourced from {accountName} in {projectAddress}." +msgstr "" + #: src/components/organisms/RegistryLayout/components/ConnectWalletModal/ConnectWalletModal.constants.ts:5 #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:23 msgid "Learn how to" @@ -1753,7 +1860,7 @@ msgstr "" #: src/components/organisms/DetailsSection/DetailsSection.Credit.tsx:54 #: src/components/organisms/MethodologyDocumentationSection.tsx:102 -#: src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx:56 +#: src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx:68 msgid "learn more" msgstr "" @@ -1780,14 +1887,18 @@ msgid "Learn more about wallets in our <0>user guide." msgstr "" #: src/components/organisms/BasketOverview/BasketOverview.Tooltip.tsx:16 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:430 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:459 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:481 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:433 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:462 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:484 #: src/pages/ChooseCreditClass/ChooseCreditClass.config.tsx:10 msgid "Learn more»" msgstr "" -#: src/lib/constants/shared.constants.tsx:11 +#: src/pages/Certificate/Certificate.tsx:79 +msgid "Link copied to your clipboard" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:21 msgid "Link copied!" msgstr "" @@ -1808,8 +1919,12 @@ msgstr "" msgid "Loading..." msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:24 +msgid "location" +msgstr "" + #: src/components/organisms/EditFileForm/EditFileForm.tsx:135 -#: src/lib/constants/shared.constants.tsx:70 +#: src/lib/constants/shared.constants.tsx:53 #: src/pages/ProjectLocation/ProjectLocation.tsx:44 #: src/pages/ProjectReview/ProjectReview.tsx:211 msgid "Location" @@ -1819,8 +1934,8 @@ msgstr "" msgid "Location data available on request" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:99 -#: src/lib/constants/shared.constants.tsx:45 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:101 +#: src/lib/constants/shared.constants.tsx:150 msgid "Location of retirement" msgstr "" @@ -1879,15 +1994,16 @@ msgstr "" msgid "Make the location data private" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:80 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:82 msgid "Make your purchase anonymous. Your name will be hidden from the retirement certificate and the certificate will be hidden from your public profile." msgstr "" -#: src/lib/constants/shared.constants.tsx:66 +#: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:29 +#: src/lib/constants/shared.constants.tsx:49 msgid "Max" msgstr "" -#: src/lib/constants/shared.constants.tsx:110 +#: src/lib/constants/shared.constants.tsx:142 msgid "Maximum {maximumFractionDigits} decimal places" msgstr "" @@ -1903,6 +2019,10 @@ msgstr "" msgid "measurement approach" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:27 +msgid "media" +msgstr "" + #: src/pages/Media/Media.tsx:72 #: src/pages/ProjectReview/ProjectReview.tsx:236 msgid "Media" @@ -1916,6 +2036,10 @@ msgstr "" msgid "messages" msgstr "" +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:28 +msgid "metadata" +msgstr "" + #: src/components/molecules/MetadataJSONField.tsx:53 #: src/components/organisms/CreditClassForms/CreditClassForm.tsx:105 #: src/components/organisms/CreditClassForms/CreditClassReview.tsx:40 @@ -1924,6 +2048,10 @@ msgstr "" msgid "Metadata" msgstr "" +#: src/lib/constants/shared.constants.tsx:195 +msgid "methodology" +msgstr "" + #: src/components/molecules/MethodologyDetailsColumn.tsx:66 msgid "methodology designer" msgstr "" @@ -1962,11 +2090,11 @@ msgstr "" msgid "More Projects" msgstr "" -#: src/lib/constants/shared.constants.tsx:72 +#: src/lib/constants/shared.constants.tsx:55 msgid "Move down" msgstr "" -#: src/lib/constants/shared.constants.tsx:71 +#: src/lib/constants/shared.constants.tsx:54 msgid "Move up" msgstr "" @@ -1974,12 +2102,16 @@ msgstr "" msgid "MsgCreateProject Error" msgstr "" -#: src/lib/constants/shared.constants.tsx:88 +#: src/lib/constants/shared.constants.tsx:71 msgid "Must be a date in the past" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:248 +msgid "Must be less than or equal to the max credit(s) available ({creditAvailable})." +msgstr "" + #: src/components/organisms/ChooseCreditsForm/ChooseCreditsForm.constants.tsx:10 -#: src/lib/constants/shared.constants.tsx:99 +#: src/lib/constants/shared.constants.tsx:82 msgid "Must be positive" msgstr "" @@ -2027,11 +2159,11 @@ msgstr "" #: src/components/molecules/ProjectPageFooter.tsx:49 #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:11 -#: src/lib/constants/shared.constants.tsx:14 +#: src/lib/constants/shared.constants.tsx:24 msgid "Next" msgstr "" -#: src/components/organisms/BasketsTable.tsx:32 +#: src/components/organisms/BasketsTable.tsx:44 msgid "No basket tokens to display" msgstr "" @@ -2047,12 +2179,12 @@ msgstr "" msgid "No credit batches to display" msgstr "" -#: src/components/organisms/CreditBatches/CreditBatches.tsx:93 +#: src/components/organisms/CreditBatches/CreditBatches.tsx:106 msgid "No credits issued" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:45 -#: src/components/organisms/EcocreditsTable.tsx:51 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:58 +#: src/components/organisms/EcocreditsTable.tsx:64 msgid "No ecocredits to display" msgstr "" @@ -2060,15 +2192,15 @@ msgstr "" msgid "No matching results found" msgstr "" -#: src/lib/constants/shared.constants.tsx:79 +#: src/lib/constants/shared.constants.tsx:62 msgid "No options available" msgstr "" -#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:53 +#: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.tsx:66 msgid "No retirements to display" msgstr "" -#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:55 +#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:66 msgid "No sell orders found" msgstr "" @@ -2080,7 +2212,7 @@ msgstr "" msgid "No, my project does not include grasslands" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:43 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:49 msgid "Nonprofit" msgstr "" @@ -2088,7 +2220,7 @@ msgstr "" msgid "Not connected" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:114 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:128 msgid "Note / Link" msgstr "" @@ -2130,7 +2262,7 @@ msgstr "" msgid "Only the locations of the files will be hidden from public view." msgstr "" -#: src/lib/constants/shared.constants.tsx:136 +#: src/lib/constants/shared.constants.tsx:108 msgid "Oops! Page not found." msgstr "" @@ -2170,18 +2302,26 @@ msgstr "" #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:221 #: src/components/organisms/MediaForm/MediaFormPhotos.tsx:340 #: src/components/organisms/MediaForm/MediaFormStory.tsx:209 -#: src/lib/constants/shared.constants.tsx:126 +#: src/lib/constants/shared.constants.tsx:98 msgid "Photo credit" msgstr "" -#: src/lib/constants/shared.constants.tsx:111 +#: src/lib/constants/shared.constants.tsx:83 msgid "Please check your email" msgstr "" -#: src/lib/constants/shared.constants.tsx:96 +#: src/lib/constants/shared.constants.tsx:38 +msgid "Please choose a country" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:79 msgid "Please choose a denom" msgstr "" +#: src/lib/constants/shared.constants.tsx:37 +msgid "Please choose a state" +msgstr "" + #: src/pages/VerifyEmail/VerifyEmail.tsx:44 msgid "Please confirm your email address" msgstr "" @@ -2198,42 +2338,42 @@ msgstr "" msgid "Please contact us at <0>support@regen.networkto resolve this issue. Do not reinitiate the transaction." msgstr "" -#: src/lib/constants/shared.constants.tsx:17 -#: src/lib/constants/shared.constants.tsx:34 -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:56 +#: src/lib/constants/shared.constants.tsx:27 +#: src/lib/constants/shared.constants.tsx:32 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:65 msgid "Please correct the errors above" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:109 -#: src/lib/constants/shared.constants.tsx:50 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:111 +#: src/lib/constants/shared.constants.tsx:155 msgid "Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:526 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:529 msgid "Please enter a location for the retirement of these credits. This prevents double counting of credits in different locations. These credits will auto-retire." msgstr "" -#: src/lib/constants/shared.constants.tsx:85 +#: src/lib/constants/shared.constants.tsx:68 msgid "Please enter a valid amount" msgstr "" -#: src/lib/constants/shared.constants.tsx:81 +#: src/lib/constants/shared.constants.tsx:64 msgid "Please enter a valid email address" msgstr "" -#: src/lib/constants/shared.constants.tsx:89 +#: src/lib/constants/shared.constants.tsx:72 msgid "Please enter a valid URL" msgstr "" -#: src/lib/constants/shared.constants.tsx:92 +#: src/lib/constants/shared.constants.tsx:75 msgid "Please enter a valid VCS Project ID" msgstr "" -#: src/lib/constants/shared.constants.tsx:113 +#: src/lib/constants/shared.constants.tsx:85 msgid "Please enter the code from that email:" msgstr "" -#: src/lib/constants/shared.constants.tsx:93 +#: src/lib/constants/shared.constants.tsx:76 msgid "Please enter valid JSON-LD" msgstr "" @@ -2257,7 +2397,7 @@ msgstr "" msgid "Please switch to this address in Keplr to access this profile." msgstr "" -#: src/lib/constants/shared.constants.tsx:117 +#: src/lib/constants/shared.constants.tsx:89 msgid "Please wait while transaction processes" msgstr "" @@ -2266,7 +2406,7 @@ msgstr "" msgid "Portfolio" msgstr "" -#: src/lib/constants/shared.constants.tsx:63 +#: src/lib/constants/shared.constants.tsx:46 msgid "Position and size your image" msgstr "" @@ -2286,21 +2426,29 @@ msgstr "" msgid "Post is public" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:144 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:148 msgid "Postal code" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:165 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:575 -#: src/lib/constants/shared.constants.tsx:54 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:169 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:586 +#: src/lib/constants/shared.constants.tsx:159 msgid "Postal Code" msgstr "" +#: src/lib/constants/shared.constants.tsx:176 +msgid "prefinance" +msgstr "" + #: src/components/organisms/RegistryLayout/RegistryLayout.config.tsx:49 #: src/pages/Projects/Projects.tsx:83 msgid "Prefinance projects" msgstr "" +#: src/lib/constants/shared.constants.tsx:208 +msgid "prefinance this project" +msgstr "" + #: src/pages/Post/Post.constants.ts:13 msgid "prev" msgstr "" @@ -2309,6 +2457,10 @@ msgstr "" msgid "Previous" msgstr "" +#: src/lib/constants/shared.constants.tsx:177 +msgid "price" +msgstr "" + #: src/components/organisms/CreateSellOrderForm/CreateSellOrderForm.tsx:166 msgid "Price" msgstr "" @@ -2325,6 +2477,10 @@ msgstr "" msgid "PRICE (USD)" msgstr "" +#: src/lib/constants/shared.constants.tsx:181 +msgid "Price of credits for prefinance projects have specific terms, please click on the project to learn more." +msgstr "" + #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:122 #: src/pages/Marketplace/Storefront/hooks/useCancelSellOrderSubmit.tsx:84 msgid "price per credit" @@ -2334,7 +2490,7 @@ msgstr "" msgid "primary impact" msgstr "" -#: src/pages/Certificate/Certificate.tsx:87 +#: src/pages/Certificate/Certificate.tsx:88 msgid "print certificate" msgstr "" @@ -2358,6 +2514,10 @@ msgstr "" msgid "Proceed with caution: this cannot be undone!" msgstr "" +#: src/pages/ProfileEdit/ProfileEdit.Nav.tsx:22 +msgid "profile" +msgstr "" + #: src/pages/ProfileEdit/ProfileEdit.constants.ts:7 msgid "Profile" msgstr "" @@ -2393,6 +2553,7 @@ msgid "Program Guide" msgstr "" #: src/components/organisms/CreditBatches/CreditBatches.config.ts:18 +#: src/pages/Dashboard/MyEcocredits/hooks/useBasketPutSubmit.tsx:105 #: src/pages/Dashboard/MyEcocredits/hooks/useCreateSellOrderSubmit.tsx:139 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditRetireSubmit.tsx:113 #: src/pages/Dashboard/MyEcocredits/hooks/useCreditSendSubmit.tsx:118 @@ -2403,11 +2564,13 @@ msgstr "" #: src/components/molecules/BatchInfoGrid.tsx:37 #: src/components/molecules/ProjectSelect.tsx:84 -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:58 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:102 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:118 -#: src/components/organisms/EcocreditsTable.tsx:68 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:72 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:115 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:132 +#: src/components/organisms/EcocreditsTable.tsx:82 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:18 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:183 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:79 #: src/pages/Certificate/Certificate.constants.ts:14 #: src/pages/Certificate/Certificate.utils.ts:36 msgid "Project" @@ -2430,7 +2593,7 @@ msgstr "" msgid "Project activity" msgstr "" -#: src/lib/constants/shared.constants.tsx:131 +#: src/lib/constants/shared.constants.tsx:103 msgid "Project Activity" msgstr "" @@ -2446,6 +2609,10 @@ msgstr "" msgid "project benefit" msgstr "" +#: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:110 +msgid "Project Design Document" +msgstr "" + #: src/components/templates/ProjectDetails/ProjectDetails.Stakeholders.tsx:49 msgid "project developer" msgstr "" @@ -2454,16 +2621,21 @@ msgstr "" msgid "Project Developer" msgstr "" +#: src/components/templates/ProjectDetails/tables/documentation/ProjectDetails.Documentation.tsx:49 +#: src/components/templates/ProjectDetails/tables/ProjectDetails.TableTabs.config.tsx:25 +msgid "Project documentation" +msgstr "" + #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:133 msgid "project end date" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:50 +#: src/pages/ProjectFinished/ProjectFinished.tsx:54 msgid "Project has been created!" msgstr "" #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:72 -#: src/pages/ProjectFinished/ProjectFinished.tsx:68 +#: src/pages/ProjectFinished/ProjectFinished.tsx:72 msgid "project id" msgstr "" @@ -2479,10 +2651,10 @@ msgstr "" msgid "Project location" msgstr "" -#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:74 -#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:145 -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:158 -#: src/components/organisms/EcocreditsTable.tsx:104 +#: src/components/organisms/BasketEcocreditsTable/BasketEcocreditsTable.tsx:88 +#: src/components/organisms/BridgableEcocreditsTable/BridgableEcocreditsTable.tsx:158 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:172 +#: src/components/organisms/EcocreditsTable.tsx:118 #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:57 msgid "Project Location" msgstr "" @@ -2499,7 +2671,7 @@ msgstr "" msgid "Project methodology" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:78 +#: src/pages/ProjectFinished/ProjectFinished.tsx:82 msgid "project name" msgstr "" @@ -2537,6 +2709,7 @@ msgid "Project timeline" msgstr "" #: src/components/molecules/ProjectPageMetadata/ProjectPageMetadata.tsx:102 +#: src/lib/constants/shared.constants.tsx:196 msgid "project type" msgstr "" @@ -2548,7 +2721,7 @@ msgstr "" msgid "PROJECTED:" msgstr "" -#: src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx:57 +#: src/components/organisms/ProjectCardsSection/ProjectCardsSection.tsx:68 #: src/components/organisms/RegistryLayout/RegistryLayout.config.tsx:36 #: src/components/organisms/RegistryLayout/RegistryLayout.Footer.tsx:24 #: src/pages/CreditClassDetails/CreditClassDetails.Projects.tsx:43 @@ -2565,7 +2738,7 @@ msgstr "" msgid "public profile tabs" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:406 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:409 msgid "Purchase options" msgstr "" @@ -2574,7 +2747,7 @@ msgid "PURCHASE OPTIONS" msgstr "" #: src/components/organisms/BasketOverview/BasketOverview.constants.ts:3 -#: src/lib/constants/shared.constants.tsx:33 +#: src/lib/constants/shared.constants.tsx:31 #: src/pages/Dashboard/MyEcocredits/MyEcocredits.constants.ts:15 msgid "Put in basket" msgstr "" @@ -2596,7 +2769,12 @@ msgstr "" msgid "Recipient" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:118 +msgid "Recipient {index}" +msgstr "" + #: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreateBatchMultiStepForm.constants.ts:7 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:122 msgid "Recipient address" msgstr "" @@ -2628,10 +2806,12 @@ msgstr "" msgid "Regen impact address" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:52 #: src/siteMetadata.ts:4 msgid "Regen Marketplace" msgstr "" +#: src/components/templates/ProjectDetails/hooks/useSeo.ts:59 #: src/siteMetadata.ts:6 msgid "Regen Network" msgstr "" @@ -2676,7 +2856,7 @@ msgstr "" msgid "Required since you added a project story title" msgstr "" -#: src/lib/constants/shared.constants.tsx:56 +#: src/lib/constants/shared.constants.tsx:39 msgid "Required with postal code" msgstr "" @@ -2710,6 +2890,10 @@ msgstr "" msgid "Retirable" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:185 +msgid "RETIRABLE ONLY" +msgstr "" + #: src/components/organisms/CreditRetireForm/CreditRetireForm.tsx:136 #: src/components/organisms/Modals/CreditRetireModal/CreditRetireModal.constants.ts:3 msgid "Retire" @@ -2720,11 +2904,11 @@ msgid "Retire all credits upon transfer" msgstr "" #: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:13 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:418 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:421 msgid "Retire credits now" msgstr "" -#: src/lib/constants/shared.constants.tsx:36 +#: src/lib/constants/shared.constants.tsx:34 msgid "Retire credits upon transfer" msgstr "" @@ -2750,29 +2934,31 @@ msgid "Retirement date" msgstr "" #: src/components/organisms/CreditRetireForm/CreditRetireForm.RetirementReminder.tsx:14 -#: src/lib/constants/shared.constants.tsx:57 +#: src/lib/constants/shared.constants.tsx:40 msgid "Retirement is permanent and non-reversible." msgstr "" #: src/components/organisms/RetirementCertificatesTable/RetirementCertificatesTable.headers.tsx:54 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:139 #: src/pages/Certificate/Certificate.constants.ts:18 msgid "Retirement location" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:77 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:79 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:134 msgid "Retirement note" msgstr "" -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:57 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:491 -#: src/lib/constants/shared.constants.tsx:40 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:59 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:494 +#: src/lib/constants/shared.constants.tsx:145 #: src/pages/Certificate/Certificate.constants.ts:17 msgid "Retirement reason" msgstr "" #: src/components/molecules/PlanStepper.tsx:17 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:37 -#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:38 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:35 +#: src/components/organisms/CreditClassForms/CreateCreditClassForm.tsx:36 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:67 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:68 #: src/pages/ProjectReview/ProjectReview.tsx:189 @@ -2796,7 +2982,7 @@ msgstr "" msgid "sad bee" msgstr "" -#: src/components/molecules/EditProjectPageFooter.tsx:84 +#: src/components/molecules/EditProjectPageFooter.tsx:86 #: src/components/molecules/ProjectPageFooter.tsx:43 #: src/components/organisms/EditProfileForm/EditProfileForm.constants.tsx:48 msgid "Save" @@ -2806,7 +2992,7 @@ msgstr "" msgid "save draft" msgstr "" -#: src/lib/constants/shared.constants.tsx:15 +#: src/lib/constants/shared.constants.tsx:25 msgid "Save draft & exit" msgstr "" @@ -2828,14 +3014,22 @@ msgstr "" msgid "sectoral scopes" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:222 +msgid "SEE ALL CREDIT BATCHES" +msgstr "" + #: src/components/organisms/ProjectTopSection/ProjectTopSection.constants.ts:3 msgid "See all methodologies" msgstr "" -#: src/lib/constants/shared.constants.tsx:74 +#: src/lib/constants/shared.constants.tsx:57 msgid "See an example»" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:170 +msgid "SEE CREDIT BATCH" +msgstr "" + #: src/components/organisms/CreditClassForms/CreditClassFinished.tsx:48 msgid "see credit class page" msgstr "" @@ -2864,11 +3058,16 @@ msgstr "" msgid "Select all" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:138 +#: src/components/molecules/CreditsAmount/CreditsAmount.tsx:139 +msgid "Select option" +msgstr "" + #: src/pages/Dashboard/MyEcocredits/MyEcocredits.constants.ts:11 msgid "Sell" msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:273 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:275 #: src/pages/Marketplace/Storefront/hooks/useCheckSellOrderAvailabilty.tsx:48 msgid "Sell order" msgstr "" @@ -2877,6 +3076,10 @@ msgstr "" msgid "Sell Order #" msgstr "" +#: src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx:39 +msgid "Sell Order #{0}" +msgstr "" + #: src/components/organisms/SellOrdersTable/SellOrdersTable.constants.ts:15 msgid "SELL ORDER ID" msgstr "" @@ -2885,7 +3088,7 @@ msgstr "" msgid "sell order id:" msgstr "" -#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:42 +#: src/components/organisms/SellOrdersTable/SellOrdersTable.tsx:52 #: src/pages/Marketplace/Storefront/Storefront.tsx:248 msgid "Sell orders" msgstr "" @@ -2907,11 +3110,20 @@ msgstr "" msgid "Sender" msgstr "" +#: src/components/molecules/CreditsAmount/CreditsAmount.constants.ts:28 +msgid "Set max credits" +msgstr "" + #: src/components/organisms/RegistryLayout/components/ConnectWalletModal/ConnectWalletModal.constants.ts:6 #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:6 msgid "set up a Keplr wallet →" msgstr "" +#: src/pages/ProfileEdit/ProfileEdit.Nav.tsx:23 +#: src/pages/ProjectEdit/ProjectEdit.Nav.tsx:29 +msgid "settings" +msgstr "" + #: src/pages/Dashboard/Dashboard.constants.tsx:56 #: src/pages/Settings/Settings.tsx:52 msgid "Settings" @@ -2921,7 +3133,7 @@ msgstr "" msgid "share" msgstr "" -#: src/lib/constants/shared.constants.tsx:133 +#: src/lib/constants/shared.constants.tsx:105 #: src/pages/Certificate/Certificate.tsx:74 msgid "Share" msgstr "" @@ -2983,7 +3195,7 @@ msgstr "" msgid "Slug can't be set to an on-chain project ID" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:39 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:44 msgid "Small or Medium Sized Business" msgstr "" @@ -2992,6 +3204,7 @@ msgid "Social Accounts" msgstr "" #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.constants.ts:6 +#: src/lib/constants/shared.constants.tsx:171 msgid "Sold Out" msgstr "" @@ -3011,19 +3224,29 @@ msgstr "" msgid "Sorry, you don’t have any REGEN to cover transaction fees" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Result.tsx:204 #: src/features/ecocredit/CreateBatchBySteps/form-model.ts:75 -#: src/lib/constants/shared.constants.tsx:119 +#: src/lib/constants/shared.constants.tsx:91 msgid "Sorry, your transaction was not successful." msgstr "" -#: src/pages/Projects/AllProjects/AllProjects.tsx:192 +#: src/pages/Projects/AllProjects/AllProjects.tsx:206 msgid "Sort by:" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:82 +msgid "Start and end date" +msgstr "" + #: src/components/organisms/CreditBatches/CreditBatches.config.ts:43 msgid "start date" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:199 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:200 +msgid "Start Date" +msgstr "" + #: src/components/organisms/BasketOverview/BasketOverview.tsx:142 msgid "start date window" msgstr "" @@ -3036,11 +3259,11 @@ msgstr "" msgid "Start typing the location" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:141 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:124 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:559 -#: src/lib/constants/shared.constants.tsx:53 -#: src/lib/constants/shared.constants.tsx:76 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:144 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:127 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:567 +#: src/lib/constants/shared.constants.tsx:59 +#: src/lib/constants/shared.constants.tsx:158 msgid "State / Region" msgstr "" @@ -3049,7 +3272,7 @@ msgstr "" msgid "Stats" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:95 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:109 msgid "Status" msgstr "" @@ -3082,11 +3305,11 @@ msgstr "" msgid "Story video or photo" msgstr "" -#: src/lib/constants/shared.constants.tsx:16 +#: src/lib/constants/shared.constants.tsx:26 msgid "submit" msgstr "" -#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:55 +#: src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts:64 msgid "Submit" msgstr "" @@ -3118,7 +3341,7 @@ msgstr "" msgid "Switch wallet addresses in Keplr to add another address to your account" msgstr "" -#: src/lib/constants/shared.constants.tsx:38 +#: src/lib/constants/shared.constants.tsx:36 msgid "take from basket" msgstr "" @@ -3160,7 +3383,7 @@ msgstr "" msgid "The caption message must be under {CAPTION_CHART_LIMIT} characters." msgstr "" -#: src/lib/constants/shared.constants.tsx:37 +#: src/lib/constants/shared.constants.tsx:35 msgid "The creator of this basket has chosen that all credits must be retired upon take." msgstr "" @@ -3168,6 +3391,10 @@ msgstr "" msgid "The current address is already linked to your account.\\nPlease first switch wallet addresses in the Keplr app to be able to add another address to your account." msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:220 +msgid "The dates should correspond to the batch monitoring period or vintage." +msgstr "" + #: src/components/organisms/RegistryLayout/RegistryLayout.constants.ts:25 msgid "The email address you are using to log in is associated with the above wallet address, so it must be the currently selected account in Keplr in order to continue." msgstr "" @@ -3176,7 +3403,7 @@ msgstr "" msgid "The individual or organization that is in charge of managing the project and will appear on the project page." msgstr "" -#: src/lib/constants/shared.constants.tsx:137 +#: src/lib/constants/shared.constants.tsx:109 msgid "The page you are looking for might have been temporarily removed or had its name changed." msgstr "" @@ -3200,14 +3427,14 @@ msgstr "" msgid "The recipient address cannot be the same as the sender address" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:103 -#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:96 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:521 -#: src/lib/constants/shared.constants.tsx:47 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:105 +#: src/components/organisms/AgreePurchaseForm/AgreePurchaseForm.Retirement.tsx:98 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:524 +#: src/lib/constants/shared.constants.tsx:152 msgid "The retirement location can be where you live or your business operates." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:467 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:470 msgid "The seller of these credits has chosen to only allow for immediate retiring of credits. These credits cannot be purchased as a tradable asset." msgstr "" @@ -3228,7 +3455,7 @@ msgstr "" msgid "These credits are currently sold out. More may become available in the future." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:443 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:446 msgid "These credits will be a tradable asset. They can be retired later via Regen Marketplace." msgstr "" @@ -3236,7 +3463,7 @@ msgstr "" msgid "These credits will be a tradeable asset. They can be retired later via Regen Marketplace." msgstr "" -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:421 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:424 msgid "These credits will be retired upon purchase and will not be tradable. Retirement is permanent and non-reversible." msgstr "" @@ -3261,7 +3488,7 @@ msgstr "" msgid "This data is on chain or anchored on chain via a content hash." msgstr "" -#: src/lib/constants/shared.constants.tsx:80 +#: src/lib/constants/shared.constants.tsx:63 msgid "This field is required" msgstr "" @@ -3286,6 +3513,7 @@ msgid "This is the median average price for all open sell orders in this credit msgstr "" #: src/components/organisms/SellOrdersActionsBar/SellOrdersActionsBar.constants.ts:6 +#: src/lib/constants/shared.constants.tsx:174 msgid "This is the median average price of all open sell orders for this project." msgstr "" @@ -3298,11 +3526,11 @@ msgstr "" msgid "This is the Polygon address of the recipient." msgstr "" -#: src/lib/constants/shared.constants.tsx:69 +#: src/lib/constants/shared.constants.tsx:52 msgid "This may take some time if your file size is large." msgstr "" -#: src/lib/constants/shared.constants.tsx:118 +#: src/lib/constants/shared.constants.tsx:90 msgid "This may take up to 15 seconds." msgstr "" @@ -3335,7 +3563,7 @@ msgstr "" msgid "Timeline" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:92 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:106 msgid "Timestamp" msgstr "" @@ -3403,6 +3631,10 @@ msgstr "" msgid "Tradable" msgstr "" +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:175 +msgid "TRADABLE AND RETIRABLE" +msgstr "" + #: src/components/molecules/ProjectBatchTotals/ProjectBatchTotals.constants.ts:4 msgid "Tradable credits have no yet been retired and can be held, sold, or sent to another party." msgstr "" @@ -3420,7 +3652,7 @@ msgstr "" msgid "tx hash" msgstr "" -#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:91 +#: src/components/organisms/BridgedEcocreditsTable/BridgedEcocreditsTable.tsx:105 msgid "Tx Hash" msgstr "" @@ -3436,6 +3668,7 @@ msgstr "" msgid "Unlock <0>Regenerative Finances<1>with <2>Regen Marketplace" msgstr "" +#: src/components/organisms/RolesForm/components/RoleField/RoleField.utils.tsx:69 #: src/pages/ProfileEdit/ProfileEdit.constants.ts:12 msgid "Unnamed" msgstr "" @@ -3448,11 +3681,11 @@ msgstr "" msgid "Untitled" msgstr "" -#: src/lib/constants/shared.constants.tsx:60 +#: src/lib/constants/shared.constants.tsx:43 msgid "Update" msgstr "" -#: src/lib/constants/shared.constants.tsx:62 +#: src/lib/constants/shared.constants.tsx:45 msgid "Update image details" msgstr "" @@ -3464,11 +3697,11 @@ msgstr "" msgid "Upload image" msgstr "" -#: src/lib/constants/shared.constants.tsx:61 +#: src/lib/constants/shared.constants.tsx:44 msgid "Uploading image" msgstr "" -#: src/pages/ProjectFinished/ProjectFinished.tsx:100 +#: src/pages/ProjectFinished/ProjectFinished.tsx:104 msgid "url" msgstr "" @@ -3492,11 +3725,11 @@ msgstr "" msgid "useMultiStep must be used within a MultiStepProvider" msgstr "" -#: src/lib/constants/shared.constants.tsx:130 +#: src/lib/constants/shared.constants.tsx:102 msgid "user profile avatar" msgstr "" -#: src/lib/constants/shared.constants.tsx:129 +#: src/lib/constants/shared.constants.tsx:101 msgid "user profile background image" msgstr "" @@ -3532,10 +3765,19 @@ msgstr "" msgid "vcs retirement serial number" msgstr "" +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/CreditBasics.tsx:228 +#: src/features/ecocredit/CreateBatchBySteps/CreateBatchMultiStepForm/Review.tsx:86 +msgid "VCS retirement serial number" +msgstr "" + #: src/pages/CreditClassDetails/CreditClassDetails.AdditionalInfo.tsx:95 msgid "verification method" msgstr "" +#: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:68 +msgid "Verification report" +msgstr "" + #: src/components/molecules/BatchMetadata/BatchMetadata.AdditionalInfo.tsx:65 msgid "verification reports" msgstr "" @@ -3576,6 +3818,10 @@ msgstr "" msgid "view credit class doc" msgstr "" +#: src/lib/constants/shared.constants.tsx:169 +msgid "view details" +msgstr "" + #: src/components/organisms/Documentation/Documentation.constants.ts:16 #: src/components/organisms/MethodologyDocumentationSection.tsx:86 msgid "view document" @@ -3590,7 +3836,7 @@ msgid "view methodology" msgstr "" #: src/components/organisms/Documentation/Documentation.constants.ts:15 -#: src/lib/constants/shared.constants.tsx:135 +#: src/lib/constants/shared.constants.tsx:107 msgid "view on ledger" msgstr "" @@ -3610,6 +3856,10 @@ msgstr "" msgid "View Profile" msgstr "" +#: src/lib/constants/shared.constants.tsx:214 +msgid "view project" +msgstr "" + #: src/components/atoms/WrappedResourcesCard.tsx:33 msgid "view resource" msgstr "" @@ -3630,7 +3880,7 @@ msgstr "" msgid "View your ecocredits" msgstr "" -#: src/lib/constants/shared.constants.tsx:120 +#: src/lib/constants/shared.constants.tsx:92 msgid "view your portfolio" msgstr "" @@ -3638,11 +3888,23 @@ msgstr "" msgid "VIEW YOUR PORTFOLIO" msgstr "" +#: src/lib/constants/shared.constants.tsx:191 +msgid "vintage id" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:192 +msgid "vintage id (serial number)" +msgstr "" + +#: src/lib/constants/shared.constants.tsx:193 +msgid "vintage period" +msgstr "" + #: src/features/marketplace/BridgeFlow/BridgeFlow.constants.ts:6 msgid "Visit toucan.earth to view the transaction." msgstr "" -#: src/lib/constants/shared.constants.tsx:139 +#: src/lib/constants/shared.constants.tsx:126 msgid "Visit Our Homepage <0> Instead" msgstr "" @@ -3674,7 +3936,7 @@ msgstr "" msgid "We will send your receipt to the email address below, which is already linked to your account." msgstr "" -#: src/lib/constants/shared.constants.tsx:112 +#: src/lib/constants/shared.constants.tsx:84 #: src/pages/VerifyEmail/VerifyEmail.tsx:48 msgid "We've just sent a confirmation email to:" msgstr "" @@ -3727,7 +3989,7 @@ msgstr "" msgid "yes, delete" msgstr "" -#: src/lib/constants/shared.constants.tsx:116 +#: src/lib/constants/shared.constants.tsx:88 msgid "yes, discard" msgstr "" @@ -3755,12 +4017,12 @@ msgstr "" msgid "You are not yet listed as an issuer on any credit classes" msgstr "" -#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:81 -#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:495 +#: src/components/molecules/BottomCreditRetireFields/BottomCreditRetireFields.tsx:83 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.tsx:498 msgid "You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. 'Retired on behalf of ABC Organization')" msgstr "" -#: src/lib/constants/shared.constants.tsx:42 +#: src/lib/constants/shared.constants.tsx:147 msgid "You can add the name of the organization or person you are retiring the credits on behalf of here (i.e. \"Retired on behalf of ABC Organization\")" msgstr "" @@ -3792,7 +4054,11 @@ msgstr "" msgid "You do not have any tradable credits to sell from this project." msgstr "" -#: src/lib/constants/shared.constants.tsx:35 +#: src/components/organisms/BuyCreditsModal/BuyCreditsModal.utils.tsx:244 +msgid "You don’t have enough {displayDenom}." +msgstr "" + +#: src/lib/constants/shared.constants.tsx:33 msgid "You don't have enough basket tokens" msgstr "" @@ -3816,7 +4082,7 @@ msgstr "" msgid "You must add at most {GALLERY_PHOTOS_MAX} photos to the photo gallery." msgstr "" -#: src/lib/constants/shared.constants.tsx:84 +#: src/lib/constants/shared.constants.tsx:67 msgid "You must agree to continue" msgstr "" diff --git a/web-marketplace/src/lib/ibc/transfer/api.ts b/web-marketplace/src/lib/ibc/transfer/api.ts index 3b14aeb0d3..cafa94aeb0 100644 --- a/web-marketplace/src/lib/ibc/transfer/api.ts +++ b/web-marketplace/src/lib/ibc/transfer/api.ts @@ -14,6 +14,7 @@ export const queryDenomTrace = async ( return client.DenomTrace({ hash }); } catch (err) { throw new Error( + // eslint-disable-next-line lingui/no-unlocalized-strings `Error fetching denom trace with hash: ${hash}, err: ${err}`, ); } @@ -24,6 +25,7 @@ export const queryDenomTraces = async (): Promise => { try { return client.DenomTraces({}); } catch (err) { + // eslint-disable-next-line lingui/no-unlocalized-strings throw new Error(`Error fetching denom traces, err: ${err}`); } }; diff --git a/web-marketplace/src/lib/normalizers/projects/normalizeProjectsWithCreditClass.ts b/web-marketplace/src/lib/normalizers/projects/normalizeProjectsWithCreditClass.ts index aaae86e0c4..dd1d92923c 100644 --- a/web-marketplace/src/lib/normalizers/projects/normalizeProjectsWithCreditClass.ts +++ b/web-marketplace/src/lib/normalizers/projects/normalizeProjectsWithCreditClass.ts @@ -5,7 +5,12 @@ import { ProjectCardProps } from 'web-components/src/components/cards/ProjectCar import { AccountFieldsFragment, Maybe } from 'generated/graphql'; import { AllCreditClassQuery } from 'generated/sanity-graphql'; -import { DRAFT_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { AnchoredProjectMetadataBaseLD, CreditClassMetadataLD, @@ -41,6 +46,7 @@ export const normalizeProjectsWithCreditClass = ({ _, }: Params): ProjectCardProps[] => projects?.map((project, index) => { + const buttons = getProjectCardButtonMapping(_); const projectMetadata = projectsMetadata?.[index]; const creditClassMetadata = classesMetadata?.[index]; const projectPageMetadata = projectPagesMetadata?.[index]; @@ -94,5 +100,8 @@ export const normalizeProjectsWithCreditClass = ({ }, program, draftText: _(DRAFT_TEXT), + bodyTexts: getProjectCardBodyTextMapping(_), + buttons, + purchaseDetailsTitles: getProjectCardPurchaseDetailsTitleMapping(_), }; }) ?? []; diff --git a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassIssuersQuery/getClassIssuersQuery.constants.ts b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassIssuersQuery/getClassIssuersQuery.constants.ts index e103535010..7aa779d012 100644 --- a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassIssuersQuery/getClassIssuersQuery.constants.ts +++ b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassIssuersQuery/getClassIssuersQuery.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ export const getClassIssuersKey = (classId?: string) => [ 'ClassIssuers', classId, diff --git a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesByAdminQuery/getClassesByAdminQuery.constants.ts b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesByAdminQuery/getClassesByAdminQuery.constants.ts index f3cc7319d7..a8b9b8464f 100644 --- a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesByAdminQuery/getClassesByAdminQuery.constants.ts +++ b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesByAdminQuery/getClassesByAdminQuery.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { Maybe } from 'generated/graphql'; type Props = { diff --git a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesQuery/getClassesQuery.ts b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesQuery/getClassesQuery.ts index 294c717470..df46527fa4 100644 --- a/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesQuery/getClassesQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/ecocredit/getClassesQuery/getClassesQuery.ts @@ -1,4 +1,5 @@ import { queryClasses } from 'lib/ecocredit/api'; + import { CLASSES_KEY } from './getClassesQuery.constants'; import { ReactQueryClassesProps, diff --git a/web-marketplace/src/lib/queries/react-query/ecocredit/getProjectsByAdmin/getProjectsByAdmin.constants.ts b/web-marketplace/src/lib/queries/react-query/ecocredit/getProjectsByAdmin/getProjectsByAdmin.constants.ts index f7a37c10e9..ddcce5a481 100644 --- a/web-marketplace/src/lib/queries/react-query/ecocredit/getProjectsByAdmin/getProjectsByAdmin.constants.ts +++ b/web-marketplace/src/lib/queries/react-query/ecocredit/getProjectsByAdmin/getProjectsByAdmin.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { Maybe } from 'generated/graphql'; type Props = { diff --git a/web-marketplace/src/lib/queries/react-query/ibc/transfer/getDenomTraceByHashesQuery/getDenomTraceByHashesQuery.ts b/web-marketplace/src/lib/queries/react-query/ibc/transfer/getDenomTraceByHashesQuery/getDenomTraceByHashesQuery.ts index a1c7217514..054ef11d46 100644 --- a/web-marketplace/src/lib/queries/react-query/ibc/transfer/getDenomTraceByHashesQuery/getDenomTraceByHashesQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/ibc/transfer/getDenomTraceByHashesQuery/getDenomTraceByHashesQuery.ts @@ -9,6 +9,7 @@ export const getDenomTraceByHashesQuery = ({ hashes, ...params }: ReactQueryDenomTraceByHashesProps): ReactQueryAddDataToBatchResponse => ({ + // eslint-disable-next-line lingui/no-unlocalized-strings queryKey: ['DenomTraceByHashes', hashes.join('-')], queryFn: async () => { return queryDenomTraceByHashes({ hashes }); diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getAllProjectsQuery/getAllProjectsQuery.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getAllProjectsQuery/getAllProjectsQuery.ts index 7af5345d2e..e679a8683c 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getAllProjectsQuery/getAllProjectsQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getAllProjectsQuery/getAllProjectsQuery.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { AllProjectsDocument, AllProjectsQuery } from 'generated/graphql'; import { jsonLdCompact } from 'lib/rdf'; diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getMoreProjectsQuery/getMoreProjectsQuery.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getMoreProjectsQuery/getMoreProjectsQuery.ts index 0821f60b3e..8c90d0e2bb 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getMoreProjectsQuery/getMoreProjectsQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getMoreProjectsQuery/getMoreProjectsQuery.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { MoreProjectsDocument, MoreProjectsQuery } from 'generated/graphql'; import { jsonLdCompact } from 'lib/rdf'; diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getProjectBySlugQuery/getProjectBySlugQuery.constants.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getProjectBySlugQuery/getProjectBySlugQuery.constants.ts index 11d628a0a8..befdf8054c 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getProjectBySlugQuery/getProjectBySlugQuery.constants.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/getProjectBySlugQuery/getProjectBySlugQuery.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ export const getProjectBySlugKey = (slug: string): string[] => [ 'graphql', 'ProjectBySlug', diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllEcocreditTxes/getAllEcocreditTxes.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllEcocreditTxes/getAllEcocreditTxes.ts index ad608dd0ef..6513c99c78 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllEcocreditTxes/getAllEcocreditTxes.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllEcocreditTxes/getAllEcocreditTxes.ts @@ -32,6 +32,7 @@ export const getAllEcocreditTxesQuery = ({ return data; } catch (e) { + // eslint-disable-next-line no-console console.error(e); return null; } diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllTxes/getAllTxes.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllTxes/getAllTxes.ts index 0c8307a8cc..0bd9f6f454 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllTxes/getAllTxes.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getAllTxes/getAllTxes.ts @@ -35,6 +35,7 @@ export const getAllTxes = ({ return data; } catch (e) { + // eslint-disable-next-line no-console console.log(e); return null; } diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.constants.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.constants.ts index 857d4c75f4..2cf83180ab 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.constants.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { Maybe } from 'generated/graphql'; type Props = { diff --git a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.ts b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.ts index 79d4ccd9f5..6b2543fe19 100644 --- a/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.ts +++ b/web-marketplace/src/lib/queries/react-query/registry-server/graphql/indexer/getClassesByIssuer/getClassesByIssuer.ts @@ -28,6 +28,7 @@ export const getClassesByIssuerQuery = ({ return data; } catch (e) { + // eslint-disable-next-line no-console console.error(e); return null; } diff --git a/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditClassesQuery/getAllCreditClassesQuery.ts b/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditClassesQuery/getAllCreditClassesQuery.ts index 7c205d9d3d..9fdf9aa699 100644 --- a/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditClassesQuery/getAllCreditClassesQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditClassesQuery/getAllCreditClassesQuery.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { AllCreditClassDocument, AllCreditClassQuery, diff --git a/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditTypeQuery/getAllCreditTypeQuery.ts b/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditTypeQuery/getAllCreditTypeQuery.ts index 977a4f2007..8721de2fa1 100644 --- a/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditTypeQuery/getAllCreditTypeQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/sanity/getAllCreditTypeQuery/getAllCreditTypeQuery.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { AllCreditTypeDocument, AllCreditTypeQuery, diff --git a/web-marketplace/src/lib/queries/react-query/sanity/getAllPrefinanceProjectsQuery/getAllPrefinanceProjectsQuery.ts b/web-marketplace/src/lib/queries/react-query/sanity/getAllPrefinanceProjectsQuery/getAllPrefinanceProjectsQuery.ts index 1e9a44d26a..e7b39f7f87 100644 --- a/web-marketplace/src/lib/queries/react-query/sanity/getAllPrefinanceProjectsQuery/getAllPrefinanceProjectsQuery.ts +++ b/web-marketplace/src/lib/queries/react-query/sanity/getAllPrefinanceProjectsQuery/getAllPrefinanceProjectsQuery.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { AllPrefinanceProjectDocument, AllPrefinanceProjectQuery, diff --git a/web-marketplace/src/lib/sort/createSortHandler.ts b/web-marketplace/src/lib/sort/createSortHandler.ts index 5893414081..4f556c111f 100644 --- a/web-marketplace/src/lib/sort/createSortHandler.ts +++ b/web-marketplace/src/lib/sort/createSortHandler.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ type SortArgType = string | number; function isSortArgType(a: unknown): a is SortArgType { return typeof a === 'string' || typeof a === 'number'; diff --git a/web-marketplace/src/lib/wallet/hooks/useConnect.tsx b/web-marketplace/src/lib/wallet/hooks/useConnect.tsx index 1d48d69dbb..68733aa93e 100644 --- a/web-marketplace/src/lib/wallet/hooks/useConnect.tsx +++ b/web-marketplace/src/lib/wallet/hooks/useConnect.tsx @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ import { useCallback } from 'react'; import { useSetAtom } from 'jotai'; diff --git a/web-marketplace/src/lib/wallet/hooks/useLogin.tsx b/web-marketplace/src/lib/wallet/hooks/useLogin.tsx index 189af70929..79c48ab79c 100644 --- a/web-marketplace/src/lib/wallet/hooks/useLogin.tsx +++ b/web-marketplace/src/lib/wallet/hooks/useLogin.tsx @@ -89,7 +89,15 @@ export const useLogin = ({ setError(e); } }, - [signArbitrary, token, retryCsrfRequest, reactQueryClient, setError, track], + [ + signArbitrary, + token, + logout, + retryCsrfRequest, + track, + reactQueryClient, + setError, + ], ); return login; diff --git a/web-marketplace/src/lib/wallet/hooks/useOnAccountChange.tsx b/web-marketplace/src/lib/wallet/hooks/useOnAccountChange.tsx index 18b87ad46c..ce5b35076e 100644 --- a/web-marketplace/src/lib/wallet/hooks/useOnAccountChange.tsx +++ b/web-marketplace/src/lib/wallet/hooks/useOnAccountChange.tsx @@ -5,12 +5,12 @@ import { useApolloClient, } from '@apollo/client'; import { useQuery, useQueryClient } from '@tanstack/react-query'; -import { postData } from 'utils/fetch/postData'; +import { useSetAtom } from 'jotai'; +import { AccountByIdQuery } from 'generated/graphql'; import { UseStateSetter } from 'types/react/use-state'; -import { apiUri } from 'lib/apiUri'; +import { accountSwitchModalAtom } from 'lib/atoms/modals.atoms'; import { useRetryCsrfRequest } from 'lib/errors/hooks/useRetryCsrfRequest'; -import { GET_ACCOUNTS_QUERY_KEY } from 'lib/queries/react-query/registry-server/getAccounts/getAccountsQuery.constants'; import { getCsrfTokenQuery } from 'lib/queries/react-query/registry-server/getCsrfTokenQuery/getCsrfTokenQuery'; import { getAccountByAddrQuery } from 'lib/queries/react-query/registry-server/graphql/getAccountByAddrQuery/getAccountByAddrQuery'; @@ -19,9 +19,6 @@ import { Wallet } from '../wallet'; import { getWallet } from '../wallet.utils'; import { WalletConfig, WalletType } from '../walletsConfig/walletsConfig.types'; import { ConnectWalletType } from './useConnectWallet'; -import { accountSwitchModalAtom } from 'lib/atoms/modals.atoms'; -import { useSetAtom } from 'jotai'; -import { AccountByIdQuery } from 'generated/graphql'; type Props = { wallet: Wallet; @@ -113,6 +110,8 @@ export const useOnAccountChange = ({ keplrMobileWeb, walletConfigRef, setAccountChanging, + activeAccount?.addr, + setAccountSwitchModalAtom, ]); // Prompt the user to login to the new account if different from the current account @@ -156,5 +155,6 @@ export const useOnAccountChange = ({ authenticatedAccountIds, reactQueryClient, retryCsrfRequest, + setAccountSwitchModalAtom, ]); }; diff --git a/web-marketplace/src/lib/wallet/wallet.constants.ts b/web-marketplace/src/lib/wallet/wallet.constants.ts index ea9b83ffd1..dc8b748779 100644 --- a/web-marketplace/src/lib/wallet/wallet.constants.ts +++ b/web-marketplace/src/lib/wallet/wallet.constants.ts @@ -1,3 +1,4 @@ +/* eslint-disable lingui/no-unlocalized-strings */ export const AUTO_CONNECT_WALLET_KEY = 'auto_connect_wallet'; export const WALLET_CONNECT_KEY = 'walletconnect'; export const WALLET_CONNECT_RELAY_URL = 'wss://relay.walletconnect.org'; diff --git a/web-marketplace/src/lib/wallet/wallet.utils.ts b/web-marketplace/src/lib/wallet/wallet.utils.ts index b6e7f89fd2..f38b86dfd7 100644 --- a/web-marketplace/src/lib/wallet/wallet.utils.ts +++ b/web-marketplace/src/lib/wallet/wallet.utils.ts @@ -14,7 +14,6 @@ import { import { WalletClient, WalletConfig, - WalletType, } from './walletsConfig/walletsConfig.types'; /* getWallet */ diff --git a/web-marketplace/src/pages/Additionality/Additionality.tsx b/web-marketplace/src/pages/Additionality/Additionality.tsx index af019729cb..70a67a607c 100644 --- a/web-marketplace/src/pages/Additionality/Additionality.tsx +++ b/web-marketplace/src/pages/Additionality/Additionality.tsx @@ -11,10 +11,6 @@ import { OnboardingFormTemplate } from '../../components/templates'; const Additionality: React.FC> = () => { const { _ } = useLingui(); - async function saveAndExit(): Promise { - // TODO: functionality - } - async function submitAdditionality( values: AdditionalityValues, ): Promise { diff --git a/web-marketplace/src/pages/Certificate/Certificate.tsx b/web-marketplace/src/pages/Certificate/Certificate.tsx index 7c6fc92d9f..6f052d9569 100644 --- a/web-marketplace/src/pages/Certificate/Certificate.tsx +++ b/web-marketplace/src/pages/Certificate/Certificate.tsx @@ -1,6 +1,6 @@ import { useMemo, useRef } from 'react'; import { useParams } from 'react-router-dom'; -import { Trans } from '@lingui/macro'; +import { msg, Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; import { Box, useTheme } from '@mui/material'; import Grid from '@mui/material/Grid'; @@ -76,6 +76,7 @@ function CertificatePage(): JSX.Element { diff --git a/web-marketplace/src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts b/web-marketplace/src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts index 7798f3fcf3..7678a25c7c 100644 --- a/web-marketplace/src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts +++ b/web-marketplace/src/pages/CreditClassDetails/CreditClassDetailsWithContent/CreditClassDetailsWithContent.constants.ts @@ -11,18 +11,22 @@ export const CREDIT_CLASS_USD_TEXT = msg`USD`; export const CREDIT_CLASS_PROTEC_TYPES_OPTIONS = [ { label: msg`All nature based carbon credits`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'All nature based carbon credits', }, { label: msg`Forestry-based credits`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Forestry-based credits', }, { label: msg`Grasslands-based credits`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Grasslands-based credits', }, { label: msg`Cropland-based credits`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Cropland-based credits', }, ]; @@ -33,22 +37,27 @@ export const CREDIT_CLASS_ON_BEHALF_OF_OPTIONS = [ }, { label: msg`Consumer/Individual/myself`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Consumer/Individual/myself', }, { label: msg`Small or Medium Sized Business`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Small or Medium Sized Business', }, { label: msg`Nonprofit`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Nonprofit', }, { label: msg`Large Corporation`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Large Corporation', }, { label: msg`Crypto Organization`, + // eslint-disable-next-line lingui/no-unlocalized-strings value: 'Crypto Organization', }, ]; diff --git a/web-marketplace/src/pages/Dashboard/MyCreditClasses/MyCreditClasses.tsx b/web-marketplace/src/pages/Dashboard/MyCreditClasses/MyCreditClasses.tsx index 2121669a80..68b4735b02 100644 --- a/web-marketplace/src/pages/Dashboard/MyCreditClasses/MyCreditClasses.tsx +++ b/web-marketplace/src/pages/Dashboard/MyCreditClasses/MyCreditClasses.tsx @@ -1,3 +1,4 @@ +import { useMemo } from 'react'; import { useLingui } from '@lingui/react'; import { Grid } from '@mui/material'; @@ -5,6 +6,7 @@ import EditIcon from 'web-components/src/components/icons/EditIcon'; import { CreditClassGridCard } from 'web-components/src/components/molecules/CreditClassGridCard/CreditClassGridCard'; import { LinkComponentType } from 'web-components/src/types/shared/linkComponentType'; +import { getProjectCardBodyTextMapping } from 'lib/constants/shared.constants'; import { useWallet } from 'lib/wallet/wallet'; import { Link } from 'components/atoms'; @@ -20,6 +22,7 @@ export const MyCreditClasses = (): JSX.Element => { useFetchCreditClassesWithOrder({ admin: wallet?.address, }); + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); return ( { {creditClasses.map(creditClass => ( onBroadcast(), { + await signAndBroadcast({ msgs: [msgPut] }, () => onBroadcast(), { onError, onSuccess, }); diff --git a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useFetchRetirements.tsx b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useFetchRetirements.tsx index 6352bb9107..dd53bbe905 100644 --- a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useFetchRetirements.tsx +++ b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useFetchRetirements.tsx @@ -140,7 +140,7 @@ export const useFetchRetirements = ({ address, hideRetirements }: Props) => { address ?? wallet?.address ?? '', ), }); - }, [reactQueryClient, wallet?.address]); + }, [address, reactQueryClient, wallet?.address]); return { retirements: normalizedRetirements, diff --git a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx index 8a1cb3d21c..a55ac17712 100644 --- a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx +++ b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateCardItemsTakeBasket.tsx @@ -1,5 +1,7 @@ import { useEffect, useState } from 'react'; import { DeliverTxResponse } from '@cosmjs/stargate'; +import { msg, plural } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; import { Item } from 'web-components/src/components/modal/TxModal'; @@ -21,6 +23,7 @@ export const useUpdateCardItemsTakeBasket = ({ cardItems, setCardItems, }: Props): Output => { + const { _ } = useLingui(); const [cardItemsTakeDone, setCardItemsTakeDone] = useState(false); useEffect(() => { @@ -35,7 +38,12 @@ export const useUpdateCardItemsTakeBasket = ({ setCardItems([ ...cardItems.slice(0, 1), { - label: `credit batch id${moreThanOne ? '(s)' : ''}`, + label: _( + msg`credit batch id${plural(batchesFromTake.length, { + one: '', + other: '(s)', + })}`, + ), value: moreThanOne ? [...batchesFromTake] : { ...batchesFromTake[0] }, }, ...cardItems.slice(1), @@ -48,6 +56,7 @@ export const useUpdateCardItemsTakeBasket = ({ setCardItems, cardItemsTakeDone, setCardItemsTakeDone, + _, ]); return { setCardItemsTakeDone }; diff --git a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx index ee8eedbfa6..f1da599fe7 100644 --- a/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx +++ b/web-marketplace/src/pages/Dashboard/MyEcocredits/hooks/useUpdateTxModalTitle.tsx @@ -1,5 +1,7 @@ import { useEffect } from 'react'; import { DeliverTxResponse } from '@cosmjs/stargate'; +import { msg } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; import { UseStateSetter } from 'types/react/use-state'; @@ -16,6 +18,7 @@ export const useUpdateTxModalTitle = ({ deliverTxResponse, setTxModalTitle, }: Props) => { + const { _ } = useLingui(); const rawLog = deliverTxResponse?.rawLog; useEffect(() => { @@ -33,8 +36,8 @@ export const useUpdateTxModalTitle = ({ (attribute: any) => attribute.key === SELL_ORDER_ATTRIBUTE_KEY, )?.value; - setTxModalTitle(`Sell Order #${sellOrderId.replaceAll('"', '')}`); + setTxModalTitle(_(msg`Sell Order #${sellOrderId.replaceAll('"', '')}`)); } } - }, [rawLog, setTxModalTitle]); + }, [_, rawLog, setTxModalTitle]); }; diff --git a/web-marketplace/src/pages/Dashboard/MyProjects/MyProjects.utils.tsx b/web-marketplace/src/pages/Dashboard/MyProjects/MyProjects.utils.tsx index a9c92667b1..c8a58720e0 100644 --- a/web-marketplace/src/pages/Dashboard/MyProjects/MyProjects.utils.tsx +++ b/web-marketplace/src/pages/Dashboard/MyProjects/MyProjects.utils.tsx @@ -1,7 +1,12 @@ import { ProjectCardProps } from 'web-components/src/components/cards/ProjectCard'; import EditIcon from 'web-components/src/components/icons/EditIcon'; -import { DRAFT_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { TranslatorType } from 'lib/i18n/i18n.types'; import { ProjectsDraftStatus } from 'pages/ProjectCreate/ProjectCreate.store'; @@ -31,6 +36,9 @@ export const getDefaultProject = ( disabled, }, draftText: _(DRAFT_TEXT), + bodyTexts: getProjectCardBodyTextMapping(_), + buttons: getProjectCardButtonMapping(_), + purchaseDetailsTitles: getProjectCardPurchaseDetailsTitleMapping(_), }); export const handleProjectsDraftStatus = ( diff --git a/web-marketplace/src/pages/EcocreditsByAccount/CreditClassTab/CreditClassTab.tsx b/web-marketplace/src/pages/EcocreditsByAccount/CreditClassTab/CreditClassTab.tsx index 96109634d2..929e5add42 100644 --- a/web-marketplace/src/pages/EcocreditsByAccount/CreditClassTab/CreditClassTab.tsx +++ b/web-marketplace/src/pages/EcocreditsByAccount/CreditClassTab/CreditClassTab.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { useMemo, useState } from 'react'; import { useLingui } from '@lingui/react'; import { Grid } from '@mui/material'; @@ -6,6 +6,7 @@ import CurrentCreditsIcon from 'web-components/src/components/icons/CurrentCredi import { CreditClassGridCard } from 'web-components/src/components/molecules/CreditClassGridCard/CreditClassGridCard'; import { LinkComponentType } from 'web-components/src/types/shared/linkComponentType'; +import { getProjectCardBodyTextMapping } from 'lib/constants/shared.constants'; import { useWallet } from 'lib/wallet/wallet'; import { BuySellOrderFlow } from 'features/marketplace/BuySellOrderFlow/BuySellOrderFlow'; @@ -31,6 +32,7 @@ export const CreditClassTab = () => { admin: address, userAddress: wallet?.address, }); + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); return ( <> @@ -42,6 +44,7 @@ export const CreditClassTab = () => { {creditClasses.map(creditClass => ( { ) { navigate(`/profiles/${accountAddressOrId}/projects`, { replace: true }); } - }, [address, isLoading]); + }, [ + account?.hideEcocredits, + account?.hideRetirements, + accountAddressOrId, + address, + isLoading, + navigate, + ]); const hideEcocredits = !!account?.hideEcocredits; const hideRetirements = !!account?.hideRetirements; diff --git a/web-marketplace/src/pages/Eligibility/Eligibility.tsx b/web-marketplace/src/pages/Eligibility/Eligibility.tsx index f30bbbca93..414a2cbc54 100644 --- a/web-marketplace/src/pages/Eligibility/Eligibility.tsx +++ b/web-marketplace/src/pages/Eligibility/Eligibility.tsx @@ -13,10 +13,6 @@ const Eligibility: React.FC> = () => { const { _ } = useLingui(); const navigate = useNavigate(); - async function saveAndExit(): Promise { - // TODO: functionality - } - function next(): void { navigate('/project-plans/eligibility/additionality'); } diff --git a/web-marketplace/src/pages/Faucet/hook/useRequestFunds.tsx b/web-marketplace/src/pages/Faucet/hook/useRequestFunds.tsx index abd8cfe504..d6d848b629 100644 --- a/web-marketplace/src/pages/Faucet/hook/useRequestFunds.tsx +++ b/web-marketplace/src/pages/Faucet/hook/useRequestFunds.tsx @@ -32,6 +32,7 @@ export const useRequestFunds = () => { setBannerTextAtom(_(msg`Funds successfully requested!`)); } catch (error) { setErrorBannerTextAtom(_(msg`Failed to request funds`)); + // eslint-disable-next-line no-console console.error(error); } finally { setIsLoading(false); diff --git a/web-marketplace/src/pages/ProfileEdit/ProfileEdit.Nav.tsx b/web-marketplace/src/pages/ProfileEdit/ProfileEdit.Nav.tsx index b55797286a..bf93ae092f 100644 --- a/web-marketplace/src/pages/ProfileEdit/ProfileEdit.Nav.tsx +++ b/web-marketplace/src/pages/ProfileEdit/ProfileEdit.Nav.tsx @@ -1,3 +1,6 @@ +import { msg } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; + import Navigation from 'web-components/src/components/faq/Navigation'; import { useProfileEditStyles } from './ProfileEdit.styles'; @@ -9,11 +12,16 @@ type Props = { }; export const ProfileEditNav = ({ section, onNavClick, className }: Props) => { + const { _ } = useLingui(); + const { classes: styles } = useProfileEditStyles(); return ( { setErrorBannerTextAtom(String(e)); } }, - [retryCsrfRequest, reactQueryClient, setErrorBannerTextAtom, token], + [ + token, + retryCsrfRequest, + track, + activeAccount?.id, + activeAccount?.addr, + reactQueryClient, + setErrorBannerTextAtom, + ], ); const socialProviders: SocialProvider[] = [ { id: 'google', + // eslint-disable-next-line lingui/no-unlocalized-strings name: 'Google', connect: async () => { await track('connectGoogle', { @@ -61,6 +70,7 @@ export const useSocialProviders = () => { window.location.href = `${apiUri}/marketplace/v1/auth/google/connect`; }, disconnect: () => + // eslint-disable-next-line lingui/no-unlocalized-strings disconnect('Google', '/marketplace/v1/auth/google/disconnect'), }, ]; diff --git a/web-marketplace/src/pages/ProjectEdit/ProjectEdit.Nav.tsx b/web-marketplace/src/pages/ProjectEdit/ProjectEdit.Nav.tsx index 0548a5b360..0182e7689e 100644 --- a/web-marketplace/src/pages/ProjectEdit/ProjectEdit.Nav.tsx +++ b/web-marketplace/src/pages/ProjectEdit/ProjectEdit.Nav.tsx @@ -1,3 +1,6 @@ +import { msg } from '@lingui/macro'; +import { useLingui } from '@lingui/react'; + import Navigation from 'web-components/src/components/faq/Navigation'; import { useProjectEditStyles } from './ProjectEdit.styles'; @@ -9,21 +12,25 @@ type Props = { }; export const ProjectEditNav = ({ section, onNavClick, isOnChain }: Props) => { + const { _ } = useLingui(); const { classes: styles } = useProjectEditStyles(); + return ( Boolean(category)) as string[] - } + categories={[ + // eslint-disable-next-line lingui/no-unlocalized-strings + { label: _(msg`basic info`), value: 'basic info' }, + { label: _(msg`location`), value: 'location' }, + // 'roles', + { label: _(msg`description`), value: 'description' }, + { label: _(msg`media`), value: 'media' }, + isOnChain ? { label: _(msg`metadata`), value: 'metadata' } : undefined, + { label: _(msg`settings`), value: 'settings' }, + ].filter( + (category): category is { label: string; value: string } => + category !== undefined, + )} category={section?.replace('-', ' ')} onClick={onNavClick} showIcon diff --git a/web-marketplace/src/pages/ProjectFinished/ProjectFinished.tsx b/web-marketplace/src/pages/ProjectFinished/ProjectFinished.tsx index d28db9cbf6..606a712247 100644 --- a/web-marketplace/src/pages/ProjectFinished/ProjectFinished.tsx +++ b/web-marketplace/src/pages/ProjectFinished/ProjectFinished.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; import { useApolloClient } from '@apollo/client'; import { msg, Trans } from '@lingui/macro'; @@ -8,13 +8,16 @@ import { useQuery } from '@tanstack/react-query'; import OutlinedButton from 'web-components/src/components/buttons/OutlinedButton'; import OnBoardingCard from 'web-components/src/components/cards/OnBoardingCard'; -import { VIEW_PROJECT_BUTTON } from 'web-components/src/components/cards/ProjectCard/ProjectCard.constants'; import EditIcon from 'web-components/src/components/icons/EditIcon'; import { CardItem } from 'web-components/src/components/modal/TxModal'; import { Body, Label, Title } from 'web-components/src/components/typography'; import { truncateHash } from 'web-components/src/utils/truncate'; -import { SEE_LESS, SEE_MORE } from 'lib/constants/shared.constants'; +import { + getProjectCardButtonMapping, + SEE_LESS, + SEE_MORE, +} from 'lib/constants/shared.constants'; import { getProjectByIdQuery } from 'lib/queries/react-query/registry-server/graphql/getProjectByIdQuery/getProjectByIdQuery'; import { Link } from '../../components/atoms'; @@ -35,6 +38,7 @@ const ProjectFinished: React.FC> = () => { id: projectId, }), ); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); const project = data?.data?.projectById; const projectOnChainId = project?.onChainId; @@ -131,7 +135,7 @@ const ProjectFinished: React.FC> = () => { role="link" onClick={() => navigate(`/project/${currentProjectId}`)} > - {VIEW_PROJECT_BUTTON.text} + {buttons.view.text} diff --git a/web-marketplace/src/pages/ProjectReview/ProjectReview.util.tsx b/web-marketplace/src/pages/ProjectReview/ProjectReview.util.tsx index 18e19031a5..510578ed36 100644 --- a/web-marketplace/src/pages/ProjectReview/ProjectReview.util.tsx +++ b/web-marketplace/src/pages/ProjectReview/ProjectReview.util.tsx @@ -24,6 +24,7 @@ export const getOnChainProjectId = ( const rawLog = JSON.parse(deliverTxResponse?.rawLog); // regen.ecocredit.v1.EventCreateProject const event = rawLog?.[0]?.events?.find((event: any) => + // eslint-disable-next-line lingui/no-unlocalized-strings event?.type?.includes('EventCreateProject'), ); const projectId = event?.attributes @@ -38,11 +39,13 @@ export const getJurisdiction = async ( const location = metadata?.['schema:location']; if (!location) { + // eslint-disable-next-line lingui/no-unlocalized-strings throw new Error('Cannot get Jurisdiction. Location data is missing.'); } const { context, place_name, properties } = location; if (!context && !place_name) { + // eslint-disable-next-line lingui/no-unlocalized-strings throw new Error('Please select a location for this project.'); } diff --git a/web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx b/web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx index 87b2790e0b..3f2cc3f4e9 100644 --- a/web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx +++ b/web-marketplace/src/pages/Projects/AllProjects/AllProjects.tsx @@ -23,7 +23,13 @@ import { useCommunityProjectsAtom, } from 'lib/atoms/projects.atoms'; import { client as sanityClient } from 'lib/clients/sanity'; -import { DRAFT_TEXT, EMPTY_OPTION_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + EMPTY_OPTION_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { CREDIT_CLASS_FILTERS_TO_DESELECT } from 'lib/env'; import { getAllSanityCreditClassesQuery } from 'lib/queries/react-query/sanity/getAllCreditClassesQuery/getAllCreditClassesQuery'; import { useTracker } from 'lib/tracker/useTracker'; @@ -56,6 +62,14 @@ export const AllProjects: React.FC> = () => { const { track } = useTracker(); const location = useLocation(); const config = getClientConfig(); + + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); + const purchaseDetailsTitles = useMemo( + () => getProjectCardPurchaseDetailsTitleMapping(_), + [_], + ); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); + const [useCommunityProjects, setUseCommunityProjects] = useAtom( useCommunityProjectsAtom, ); @@ -232,6 +246,9 @@ export const AllProjects: React.FC> = () => { projectPrefinancing={project.projectPrefinancing} offChain={config.buyButton ? project.offChain : true} draftText={_(DRAFT_TEXT)} + bodyTexts={bodyTexts} + purchaseDetailsTitles={purchaseDetailsTitles} + buttons={buttons} /> ); diff --git a/web-marketplace/src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx b/web-marketplace/src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx index 48813f7cae..2d12348dd6 100644 --- a/web-marketplace/src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx +++ b/web-marketplace/src/pages/Projects/PrefinanceProjects/PrefinanceProjects.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; import { Trans } from '@lingui/macro'; import { useLingui } from '@lingui/react'; @@ -9,7 +9,12 @@ import { ProjectCard } from 'web-components/src/components/cards/ProjectCard'; import SmallArrowIcon from 'web-components/src/components/icons/SmallArrowIcon'; import { Body } from 'web-components/src/components/typography'; -import { DRAFT_TEXT } from 'lib/constants/shared.constants'; +import { + DRAFT_TEXT, + getProjectCardBodyTextMapping, + getProjectCardButtonMapping, + getProjectCardPurchaseDetailsTitleMapping, +} from 'lib/constants/shared.constants'; import { useTracker } from 'lib/tracker/useTracker'; import { @@ -30,6 +35,13 @@ export const PrefinanceProjects: React.FC> = soldOutProjectsIds, } = useProjectsContext(); + const bodyTexts = useMemo(() => getProjectCardBodyTextMapping(_), [_]); + const purchaseDetailsTitles = useMemo( + () => getProjectCardPurchaseDetailsTitleMapping(_), + [_], + ); + const buttons = useMemo(() => getProjectCardButtonMapping(_), [_]); + return ( <> {prefinanceProjectsContent && ( @@ -88,6 +100,9 @@ export const PrefinanceProjects: React.FC> = offChain={project.offChain} isSoldOut={isSoldOut} draftText={_(DRAFT_TEXT)} + bodyTexts={bodyTexts} + purchaseDetailsTitles={purchaseDetailsTitles} + buttons={buttons} />
); diff --git a/web-marketplace/src/pages/Projects/Projects.tsx b/web-marketplace/src/pages/Projects/Projects.tsx index 4c3a6b7f9f..ad0589025e 100644 --- a/web-marketplace/src/pages/Projects/Projects.tsx +++ b/web-marketplace/src/pages/Projects/Projects.tsx @@ -36,7 +36,7 @@ const Projects = (): JSX.Element => { const [sort] = useAtom(projectsSortAtom); const [creditClassSelectedFilters] = useAtom(creditClassSelectedFiltersAtom); - const { data: allHomePageData, isFetching: isFetchingAllHomePage } = useQuery( + const { data: allHomePageData } = useQuery( getAllHomePageQuery({ sanityClient, enabled: !!sanityClient }), ); const sortPinnedIds = diff --git a/web-marketplace/src/pages/Settings/hooks/useSettingsSubmit.tsx b/web-marketplace/src/pages/Settings/hooks/useSettingsSubmit.tsx index 24c34e7baf..1a87fbdbef 100644 --- a/web-marketplace/src/pages/Settings/hooks/useSettingsSubmit.tsx +++ b/web-marketplace/src/pages/Settings/hooks/useSettingsSubmit.tsx @@ -31,6 +31,7 @@ export const useSettingsSubmit = ({ offChainProject }: Props): Return => { projectPatch, }); } catch (e) { + // eslint-disable-next-line no-console console.log(e); } }, diff --git a/web-www/components/templates/buyers/Buyers.FeaturedProjectsSection.tsx b/web-www/components/templates/buyers/Buyers.FeaturedProjectsSection.tsx index 1949123998..eaf62850c9 100644 --- a/web-www/components/templates/buyers/Buyers.FeaturedProjectsSection.tsx +++ b/web-www/components/templates/buyers/Buyers.FeaturedProjectsSection.tsx @@ -10,7 +10,12 @@ import { AllBuyersPageQuery, FeaturedProjectCard, } from '@/generated/sanity-graphql'; -import { DRAFT_TEXT } from '@/lib/constants/shared.constants'; +import { + DRAFT_TEXT, + projectCardBodyTextMapping, + projectCardButtonMapping, + projectCardPurchaseDetailsTitleMapping, +} from '@/lib/constants/shared.constants'; interface Props { content: AllBuyersPageQuery['allBuyersPage'][0]['featuredProjectCardsSection']; @@ -65,6 +70,9 @@ const BuyersFeaturedProjectsSection = ({ content, sx }: Props) => { image: image?.asset?.url, }} draftText={DRAFT_TEXT} + bodyTexts={projectCardBodyTextMapping} + purchaseDetailsTitles={projectCardPurchaseDetailsTitleMapping} + buttons={projectCardButtonMapping} /> ); })} diff --git a/web-www/components/templates/press-kit/PhotosSection/PhotosSection.tsx b/web-www/components/templates/press-kit/PhotosSection/PhotosSection.tsx index 66f2519a37..2695381d81 100644 --- a/web-www/components/templates/press-kit/PhotosSection/PhotosSection.tsx +++ b/web-www/components/templates/press-kit/PhotosSection/PhotosSection.tsx @@ -6,6 +6,7 @@ import ProjectMedia, { import { usePhotosSectionStyles } from './PhotosSection.styles'; import { PressKitPhotosSectionFieldsFragment } from '@/generated/sanity-graphql'; +import { projectCardBodyTextMapping } from '@/lib/constants/shared.constants'; type Props = { photosSectionData?: PressKitPhotosSectionFieldsFragment['photosSection']; @@ -27,7 +28,11 @@ const PhotosSection = ({ photosSectionData }: Props): JSX.Element => { classes={{ root: styles.root, title: styles.title }} >
- +
); diff --git a/web-www/lib/constants/shared.constants.ts b/web-www/lib/constants/shared.constants.ts deleted file mode 100644 index fa4a6b0068..0000000000 --- a/web-www/lib/constants/shared.constants.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ArticleType } from 'web-components/src/components/cards/ArticleCard/ArticleCard.types'; - -export const DRAFT_TEXT = 'Draft'; -export const ARTICLE_CARD_BTN_TEXT_MAPPING: Record = { - video: 'watch video', - article: 'read article', - podcast: 'listen to podcast', -}; -export const REQUIRED_MESSAGE = 'This field is required'; -export const INVALID_EMAIL_MESSAGE = 'Please enter a valid email address'; diff --git a/web-www/lib/constants/shared.constants.tsx b/web-www/lib/constants/shared.constants.tsx new file mode 100644 index 0000000000..5da8977365 --- /dev/null +++ b/web-www/lib/constants/shared.constants.tsx @@ -0,0 +1,65 @@ +import { ArticleType } from 'web-components/src/components/cards/ArticleCard/ArticleCard.types'; +import { + ProjectCardBodyTextsMapping, + ProjectCardButtonsMapping, + ProjectCardTitlesMapping, +} from 'web-components/src/components/cards/ProjectCard/ProjectCard.types'; +import CurrentCreditsIcon from 'web-components/src/components/icons/CurrentCreditsIcon'; +import EyeIcon from 'web-components/src/components/icons/EyeIcon'; +import { PrefinanceIcon } from 'web-components/src/components/icons/PrefinanceIcon'; + +export const DRAFT_TEXT = 'Draft'; +export const ARTICLE_CARD_BTN_TEXT_MAPPING: Record = { + video: 'watch video', + article: 'read article', + podcast: 'listen to podcast', +}; +export const REQUIRED_MESSAGE = 'This field is required'; +export const INVALID_EMAIL_MESSAGE = 'Please enter a valid email address'; + +export const projectCardBodyTextMapping: ProjectCardBodyTextsMapping = { + comingSoon: 'coming soon', + creditsPurchased: 'credits purchased', + viewDetails: 'view details', + errorCardPrice: 'Error fetching price', + soldOut: 'Sold Out', + avgPriceLabel: 'Avg Price', + avgPriceTooltip: + 'This is the median average price of all open sell orders for this project.', + prefinance: 'prefinance', + price: 'price', + estimatedIssuance: 'estimated issuance', + creditsAvailable: 'credits available', + prefinancePriceTooltip: + 'Price of credits for prefinance projects have specific terms, please click on the project to learn more.', + estimatedIssuanceTooltip: + 'Actual number of credits issued may be different from the estimated issuance.', +}; + +export const projectCardPurchaseDetailsTitleMapping: ProjectCardTitlesMapping = + { + vintageId: 'vintage id', + vintageIdWithSerial: 'vintage id (serial number)', + vintagePeriod: 'vintage period', + creditClass: 'credit class', + methodology: 'methodology', + projectType: 'project type', + additionalCertifications: 'additional certifications', + }; + +export const projectCardButtonMapping: ProjectCardButtonsMapping = { + default: { + text: 'Buy ecocredits', + startIcon: , + }, + prefinance: { + text: 'prefinance this project', + startIcon: , + className: + '[border-image:linear-gradient(179deg,#515D89_19.77%,#7DC9BF_114.05%,#FAEBD1_200.67%)_1] text-purple-400 hover:bg-purple-100 hover:border-purple-100', + }, + view: { + text: 'view project', + startIcon: , + }, +};