From 98477901682d7b7dceda9c968b362019d66a34f3 Mon Sep 17 00:00:00 2001 From: viktoriabakun Date: Mon, 4 Nov 2024 16:39:11 +0100 Subject: [PATCH 1/5] feat(tolgee-keys): governance Signed-off-by: viktoriabakun --- apps/shell/messages/en.json | 4 +- libs/governance/src/index.ts | 1 + .../components/parameter-change-proposal.tsx | 4 +- .../lib/components/proposal-deposit-modal.tsx | 22 ++- .../src/lib/components/proposal-list-card.tsx | 4 +- .../components/software-upgrade-proposal.tsx | 4 +- .../src/lib/hooks/useGetProposalTypeText.tsx | 44 +++++ .../src/lib/proposal-details-page.tsx | 157 +++++++++--------- .../governance/src/lib/proposal-list-page.tsx | 8 +- 9 files changed, 158 insertions(+), 90 deletions(-) create mode 100644 libs/governance/src/lib/hooks/useGetProposalTypeText.tsx diff --git a/apps/shell/messages/en.json b/apps/shell/messages/en.json index 5cbfcdab8..a8b47ca9f 100644 --- a/apps/shell/messages/en.json +++ b/apps/shell/messages/en.json @@ -45,7 +45,9 @@ "confirm-button": "Confirm", "send-button": "Send" }, - "governance": {}, + "governance": { + "your-balance": "Your balance: {{localedBalance}} {{localedSymbolUpperCase}}" + }, "main": {}, "staking": { "attention-withdrawal-warning": "Attention! If in the future you want to withdraw the staked funds, it will take {{count}} day{count, plural, one {} other {s}}", diff --git a/libs/governance/src/index.ts b/libs/governance/src/index.ts index 5873e7a12..dfc96009f 100644 --- a/libs/governance/src/index.ts +++ b/libs/governance/src/index.ts @@ -1,3 +1,4 @@ export * from './lib/proposal-list-page'; export * from './lib/proposal-details-page'; export * from './lib/components/proposal-list-card'; +export * from './lib/hooks/useGetProposalTypeText'; diff --git a/libs/governance/src/lib/components/parameter-change-proposal.tsx b/libs/governance/src/lib/components/parameter-change-proposal.tsx index cceb252a7..193872130 100644 --- a/libs/governance/src/lib/components/parameter-change-proposal.tsx +++ b/libs/governance/src/lib/components/parameter-change-proposal.tsx @@ -1,4 +1,5 @@ import { ParameterChangeProposalContent } from '@evmos/provider'; +import { useTranslate } from '@tolgee/react'; import { Heading } from '@haqq/shell-ui-kit/server'; import { Metadata } from './metadata'; @@ -7,6 +8,7 @@ export function ParameterChangeProposalDetails({ }: { content: ParameterChangeProposalContent; }) { + const { t } = useTranslate('governance'); return (
@@ -26,7 +28,7 @@ export function ParameterChangeProposalDetails({ - Parameter changes + {t('parameter-changes', 'Parameter changes')}
{JSON.stringify(content.changes, null, 2)} diff --git a/libs/governance/src/lib/components/proposal-deposit-modal.tsx b/libs/governance/src/lib/components/proposal-deposit-modal.tsx index c262a88f2..ad6de4164 100644 --- a/libs/governance/src/lib/components/proposal-deposit-modal.tsx +++ b/libs/governance/src/lib/components/proposal-deposit-modal.tsx @@ -1,5 +1,6 @@ 'use client'; import { useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslate } from '@tolgee/react'; import clsx from 'clsx'; import { Button, @@ -65,6 +66,7 @@ export function ProposalDepositModal({ onSubmit: (amount: number) => void; isPending?: boolean; }) { + const { t } = useTranslate('governance'); const [depositAmount, setDepositAmount] = useState( undefined, ); @@ -101,13 +103,21 @@ export function ProposalDepositModal({ const amountHint = useMemo(() => { if (amountError === 'min') { - return Bellow minimal value; + return ( + + {t('amount-error-min', 'Bellow minimal value')} + + ); } else if (amountError === 'max') { - return More than you have; + return ( + + {t('amount-error-more-than-have', 'More than you have')} + + ); } return undefined; - }, [amountError]); + }, [amountError, t]); const handleMaxButtonClick = useCallback(() => { setDepositAmount(balance); @@ -129,12 +139,12 @@ export function ProposalDepositModal({
- Deposit + {t('deposit', 'Deposit')}
@@ -157,7 +167,7 @@ export function ProposalDepositModal({ disabled={!isDepositEnabled || !depositAmount} isLoading={isPending} > - Confirm delegation + {t('confirm-delegation', 'Confirm delegation')}
diff --git a/libs/governance/src/lib/components/proposal-list-card.tsx b/libs/governance/src/lib/components/proposal-list-card.tsx index f40f369de..a391e1c3e 100644 --- a/libs/governance/src/lib/components/proposal-list-card.tsx +++ b/libs/governance/src/lib/components/proposal-list-card.tsx @@ -6,7 +6,7 @@ import { TallyResults, } from '@haqq/data-access-cosmos'; import { ProposalCard, ProposalStatusEnum } from '@haqq/shell-ui-kit/server'; -import { getProposalTypeText } from '../proposal-details-page'; +import { useGetProposalTypeText } from '../hooks/useGetProposalTypeText'; export function ProposalListCard({ proposal, @@ -54,7 +54,7 @@ export function ProposalListCard({ minDeposit={minDeposit} results={proposalTally} symbol={symbol} - type={getProposalTypeText(proposal.content['@type'])} + type={useGetProposalTypeText(proposal.content['@type'])} userVote={userVote} className={className} /> diff --git a/libs/governance/src/lib/components/software-upgrade-proposal.tsx b/libs/governance/src/lib/components/software-upgrade-proposal.tsx index 2ca1cb0ca..93579308f 100644 --- a/libs/governance/src/lib/components/software-upgrade-proposal.tsx +++ b/libs/governance/src/lib/components/software-upgrade-proposal.tsx @@ -1,4 +1,5 @@ import { useMemo } from 'react'; +import { useTranslate } from '@tolgee/react'; import { Heading } from '@haqq/shell-ui-kit/server'; import { Metadata } from './metadata'; @@ -15,6 +16,7 @@ export function SoftwareUpgradeProposalDetails({ }: { plan: SoftwareUpgradeProposalPlan; }) { + const { t } = useTranslate('governance'); const formattedPlan = useMemo(() => { return { name: plan.name, @@ -44,7 +46,7 @@ export function SoftwareUpgradeProposalDetails({ - Upgrade plan + {t('upgrade-plan', 'Upgrade plan')}
diff --git a/libs/governance/src/lib/hooks/useGetProposalTypeText.tsx b/libs/governance/src/lib/hooks/useGetProposalTypeText.tsx new file mode 100644 index 000000000..2306d0f0a --- /dev/null +++ b/libs/governance/src/lib/hooks/useGetProposalTypeText.tsx @@ -0,0 +1,44 @@ +import { useTranslate } from '@tolgee/react'; + +export const enum ProposalTypes { + Text = '/cosmos.gov.v1beta1.TextProposal', + SoftwareUpgrade = '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', + CancelSoftwareUpgrade = '/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', + ParameterChange = '/cosmos.params.v1beta1.ParameterChangeProposal', + ClientUpdate = '/ibc.core.client.v1.ClientUpdateProposal', + RegisterCoin = '/evmos.erc20.v1.RegisterCoinProposal', + RegisterERC20 = '/evmos.erc20.v1.RegisterERC20Proposal', +} + +export function useGetProposalTypeText(type: string) { + const { t } = useTranslate('governance'); + + switch (type) { + case ProposalTypes.Text: + return t('proposal-types.text', 'Text'); + + case ProposalTypes.SoftwareUpgrade: + return t('proposal-types.software-upgrade', 'Software upgrade'); + + case ProposalTypes.CancelSoftwareUpgrade: + return t( + 'proposal-types.cancel-software-upgrade', + 'Cancel software upgrade', + ); + + case ProposalTypes.ClientUpdate: + return t('proposal-types.client-update', 'Client update'); + + case ProposalTypes.ParameterChange: + return t('proposal-types.parameter-change', 'Parameter change'); + + case ProposalTypes.RegisterCoin: + return t('proposal-types.register-coin', 'Register coin'); + + case ProposalTypes.RegisterERC20: + return t('proposal-types.register-erc20', 'Register ERC20'); + + default: + return type; + } +} diff --git a/libs/governance/src/lib/proposal-details-page.tsx b/libs/governance/src/lib/proposal-details-page.tsx index 69fe7efc5..385b2ca2d 100644 --- a/libs/governance/src/lib/proposal-details-page.tsx +++ b/libs/governance/src/lib/proposal-details-page.tsx @@ -12,6 +12,7 @@ import { Proposal, SoftwareUpgradeProposalContent, } from '@evmos/provider'; +import { useTranslate } from '@tolgee/react'; import clsx from 'clsx'; import Markdown from 'marked-react'; import Link from 'next/link'; @@ -67,52 +68,19 @@ import { } from '@haqq/shell-ui-kit/server'; import { ParameterChangeProposalDetails } from './components/parameter-change-proposal'; import { SoftwareUpgradeProposalDetails } from './components/software-upgrade-proposal'; - -const enum ProposalTypes { - Text = '/cosmos.gov.v1beta1.TextProposal', - SoftwareUpgrade = '/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', - CancelSoftwareUpgrade = '/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', - ParameterChange = '/cosmos.params.v1beta1.ParameterChangeProposal', - ClientUpdate = '/ibc.core.client.v1.ClientUpdateProposal', - RegisterCoin = '/evmos.erc20.v1.RegisterCoinProposal', - RegisterERC20 = '/evmos.erc20.v1.RegisterERC20Proposal', -} - -export function getProposalTypeText(type: string) { - switch (type) { - case ProposalTypes.Text: - return 'Text'; - - case ProposalTypes.SoftwareUpgrade: - return 'Software upgrade'; - - case ProposalTypes.CancelSoftwareUpgrade: - return 'Cancel software upgrade'; - - case ProposalTypes.ClientUpdate: - return 'Client update'; - - case ProposalTypes.ParameterChange: - return 'Parameter change'; - - case ProposalTypes.RegisterCoin: - return 'Register coin'; - - case ProposalTypes.RegisterERC20: - return 'Register ERC20'; - - default: - return type; - } -} +import { + ProposalTypes, + useGetProposalTypeText, +} from './hooks/useGetProposalTypeText'; function ShowDateToggleButton({ onClick }: { onClick: () => void }) { + const { t } = useTranslate('governance'); return (
- {getProposalTypeText(proposalDetails.content['@type'])} + {useGetProposalTypeText(proposalDetails.content['@type'])}
@@ -430,7 +401,7 @@ export function ProposalDetailsComponent({
- Info + {t('info', 'Info')}
@@ -443,7 +414,7 @@ export function ProposalDetailsComponent({
*/}
- + {formatNumber(totalDeposit)}{' '} {symbol.toLocaleUpperCase()} @@ -451,7 +422,7 @@ export function ProposalDetailsComponent({
- Description + {t('description', 'Description')}
- Dates + {t('dates', 'Dates')}
- + {formatDate(new Date(proposalDetails.submit_time))} - + {formatDate(new Date(proposalDetails.deposit_end_time))} {proposalDetails.status !== ProposalStatusEnum.Deposit && ( - + {formatDate( new Date(proposalDetails.voting_start_time), )} - + {formatDate( new Date(proposalDetails.voting_end_time), )} @@ -573,7 +544,7 @@ export function ProposalDetailsComponent({ - Created at (gmt) + {t('created-at', 'Created at (gmt)')} @@ -594,7 +565,7 @@ export function ProposalDetailsComponent({ - Deposit end (gmt) + {t('deposit-end', 'Deposit end (gmt)')} @@ -617,7 +588,7 @@ export function ProposalDetailsComponent({ - Vote start (gmt) + {t('vote-start', 'Vote start (gmt)')} @@ -640,7 +611,7 @@ export function ProposalDetailsComponent({ - Vote end (gmt) + {t('vote-end', 'Vote end (gmt)')} @@ -694,7 +665,7 @@ export function ProposalDetailsComponent({ )} {proposalDetails.status === ProposalStatusEnum.Voting && @@ -702,7 +673,7 @@ export function ProposalDetailsComponent({ )}
@@ -838,19 +809,20 @@ function ProposalActionsMobile({ isCanVote?: boolean; userVote?: string | null; }) { + const { t } = useTranslate('common'); if (!isConnected) { return (
- You should connect wallet first + {t('connect-wallet-message', 'You should connect wallet first')}
@@ -891,6 +863,7 @@ function ProposalActionsMobile({ } function ProposalInfo({ proposalId }: { proposalId: string }) { + const { t } = useTranslate('governance'); const { data: proposalDetails, isFetched } = useProposalDetailsQuery(proposalId); const { data: proposalTally } = useProposalTallyQuery(proposalId); @@ -907,7 +880,7 @@ function ProposalInfo({ proposalId }: { proposalId: string }) {
- Fetching proposal details + {t('fetching-proposal-details', 'Fetching proposal details')}
) : ( @@ -922,12 +895,13 @@ function ProposalInfo({ proposalId }: { proposalId: string }) { } export function ProposalDetailsPage({ proposalId }: { proposalId: string }) { + const { t } = useTranslate('common'); return (
- Governance + {t('governance', 'Governance')}
@@ -944,6 +918,7 @@ export function VoteActions({ proposalId: number; userVote?: string | null; }) { + const { t } = useTranslate('governance'); const { vote, getVoteEstimatedFee } = useProposalActions(); const toast = useToast(); const { executeIfNetworkSupported } = useNetworkAwareAction(); @@ -969,7 +944,11 @@ export function VoteActions({ ); await toast.promise(votePromise, { - loading: Vote in progress, + loading: ( + + {t('vote-in-progress', 'Vote in progress')} + + ), success: (tx) => { console.log('Vote successful', { tx }); const txHash = tx?.txhash; @@ -977,7 +956,9 @@ export function VoteActions({ return (
-
Your vote will be counted!!!
+
+ {t('vote-will-count', 'Your vote will be counted!!!')} +
{ console.error(error); - return For some reason your vote failed.; + return ( + + {t('vote-fail-error', 'For some reason your vote failed.')} + + ); }, }); posthog.capture('vote success', { chainId }); @@ -1012,6 +997,7 @@ export function VoteActions({ memo, posthog, proposalId, + t, toast, vote, ], @@ -1024,9 +1010,14 @@ export function VoteActions({ return (
- Cast your vote + + {t('cast-vote', 'Cast your vote')} +
- You can change your vote while the voting is in progress + {t( + 'change-vote-message', + 'You can change your vote while the voting is in progress', + )}
@@ -1038,7 +1029,7 @@ export function VoteActions({ setMemoVisible(true); }} > - Add memo + {t('add-memo', 'Add memo')}
) : ( @@ -1055,7 +1046,7 @@ export function VoteActions({ 'rounded-[6px] bg-[#252528]', 'disabled:cursor-not-allowed', )} - placeholder="Add your memo" + placeholder={t('add-your-memo', 'Add your memo')} autoFocus />
@@ -1075,7 +1066,7 @@ export function VoteActions({ voteOptionFromJSON(userVote) === VoteOption.VOTE_OPTION_YES } > - Yes + {t('vote-option-yes', 'Yes')}
@@ -1091,7 +1082,7 @@ export function VoteActions({ voteOptionFromJSON(userVote) === VoteOption.VOTE_OPTION_NO } > - No + {t('vote-option-no', 'No')}
@@ -1107,7 +1098,7 @@ export function VoteActions({ voteOptionFromJSON(userVote) === VoteOption.VOTE_OPTION_ABSTAIN } > - Abstain + {t('vote-option-abstain', 'Abstain')}
@@ -1124,7 +1115,7 @@ export function VoteActions({ VoteOption.VOTE_OPTION_NO_WITH_VETO } > - Veto + {t('vote-option-veto', 'Veto')}
@@ -1141,6 +1132,7 @@ export function DepositActionsDesktop({ onDepositSubmit: (depositAmount: number) => void; isConnected: boolean; }) { + const { t } = useTranslate('governance'); const [depositAmount, setDepositAmount] = useState( undefined, ); @@ -1152,14 +1144,21 @@ export function DepositActionsDesktop({ const symbol = 'ISLM'; const { executeIfNetworkSupported } = useNetworkAwareAction(); + const localedBalance = balance.toLocaleString(); + const localedSymbolUpperCase = symbol.toLocaleUpperCase(); + return (
- Enter the amount you want to deposit + {t('enter-deposit-message', 'Enter the amount you want to deposit')}
- You balance: {balance.toLocaleString()} {symbol.toLocaleUpperCase()} + {t( + 'your-balance', + 'Your balance: {localedBalance} {localedSymbolUpperCase}', + { localedBalance, localedSymbolUpperCase }, + )}
@@ -1179,7 +1178,7 @@ export function DepositActionsDesktop({ !isConnected || (depositAmount && depositAmount === 0), )} > - Deposit + {t('deposit', 'Deposit')}
@@ -1197,11 +1196,12 @@ export function DepositInput({ value: number | undefined; disabled?: boolean; }) { + const { t } = useTranslate('governance'); return (
- If the proposal does not collect the required number of deposits in a - certain time, it will reject + {t( + 'proposal-deposit-alert', + 'If the proposal does not collect the required number of deposits in a certain time, it will reject', + )} ); } diff --git a/libs/governance/src/lib/proposal-list-page.tsx b/libs/governance/src/lib/proposal-list-page.tsx index 5c96bb157..cb09e777d 100644 --- a/libs/governance/src/lib/proposal-list-page.tsx +++ b/libs/governance/src/lib/proposal-list-page.tsx @@ -1,6 +1,7 @@ 'use client'; import { useMemo } from 'react'; import { ProposalStatus } from '@evmos/provider'; +import { useTranslate } from '@tolgee/react'; import Link from 'next/link'; import { useAddress, @@ -14,6 +15,7 @@ import { Container, SpinnerLoader } from '@haqq/shell-ui-kit/server'; import { ProposalListCard } from './components/proposal-list-card'; export function ProposalListPage() { + const { t } = useTranslate(); const { data: govParams } = useGovernanceParamsQuery(); const { data: proposalsData } = useProposalListQuery(); const symbol = 'ISLM'; @@ -98,7 +100,7 @@ export function ProposalListPage() {
- Governance + {t('governance-title', 'Governance', { ns: 'common' })}
@@ -111,7 +113,9 @@ export function ProposalListPage() {
- Fetching proposals + {t('fetching-proposals', 'Fetching proposals', { + ns: 'governance', + })}
From 22271f651c6c872ffe5e5abee645c92d9bd8170c Mon Sep 17 00:00:00 2001 From: viktoriabakun Date: Mon, 4 Nov 2024 16:39:11 +0100 Subject: [PATCH 2/5] feat(tolgee-keys): governance Signed-off-by: viktoriabakun --- apps/shell/messages/en.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/shell/messages/en.json b/apps/shell/messages/en.json index a8b47ca9f..5cbfcdab8 100644 --- a/apps/shell/messages/en.json +++ b/apps/shell/messages/en.json @@ -45,9 +45,7 @@ "confirm-button": "Confirm", "send-button": "Send" }, - "governance": { - "your-balance": "Your balance: {{localedBalance}} {{localedSymbolUpperCase}}" - }, + "governance": {}, "main": {}, "staking": { "attention-withdrawal-warning": "Attention! If in the future you want to withdraw the staked funds, it will take {{count}} day{count, plural, one {} other {s}}", From 687fe1e14808ad2212a2d3e682cd14b1358d79ce Mon Sep 17 00:00:00 2001 From: viktoriabakun Date: Tue, 5 Nov 2024 10:31:17 +0100 Subject: [PATCH 3/5] fix(governance): simplify your-balance params Signed-off-by: viktoriabakun --- apps/shell/messages/en.json | 4 +++- libs/governance/src/lib/proposal-details-page.tsx | 12 ++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/shell/messages/en.json b/apps/shell/messages/en.json index 5cbfcdab8..b2c5197d8 100644 --- a/apps/shell/messages/en.json +++ b/apps/shell/messages/en.json @@ -45,7 +45,9 @@ "confirm-button": "Confirm", "send-button": "Send" }, - "governance": {}, + "governance": { + "your-balance": "Your balance: {{balance}} {{symbol}}" + }, "main": {}, "staking": { "attention-withdrawal-warning": "Attention! If in the future you want to withdraw the staked funds, it will take {{count}} day{count, plural, one {} other {s}}", diff --git a/libs/governance/src/lib/proposal-details-page.tsx b/libs/governance/src/lib/proposal-details-page.tsx index 385b2ca2d..6680d1014 100644 --- a/libs/governance/src/lib/proposal-details-page.tsx +++ b/libs/governance/src/lib/proposal-details-page.tsx @@ -1144,9 +1144,6 @@ export function DepositActionsDesktop({ const symbol = 'ISLM'; const { executeIfNetworkSupported } = useNetworkAwareAction(); - const localedBalance = balance.toLocaleString(); - const localedSymbolUpperCase = symbol.toLocaleUpperCase(); - return (
@@ -1154,11 +1151,10 @@ export function DepositActionsDesktop({ {t('enter-deposit-message', 'Enter the amount you want to deposit')}
- {t( - 'your-balance', - 'Your balance: {localedBalance} {localedSymbolUpperCase}', - { localedBalance, localedSymbolUpperCase }, - )} + {t('your-balance', 'Your balance: {balance} {symbol}', { + balance: balance.toLocaleString(), + symbol: symbol.toLocaleUpperCase(), + })}
From e4df692e325b2c88584e31e66ad01725fdadcaba Mon Sep 17 00:00:00 2001 From: viktoriabakun Date: Tue, 5 Nov 2024 10:44:27 +0100 Subject: [PATCH 4/5] feat(governance): extract tolgee keys Signed-off-by: viktoriabakun --- apps/shell/messages/en.json | 42 +++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 43 insertions(+) diff --git a/apps/shell/messages/en.json b/apps/shell/messages/en.json index b2c5197d8..718a23c92 100644 --- a/apps/shell/messages/en.json +++ b/apps/shell/messages/en.json @@ -46,6 +46,48 @@ "send-button": "Send" }, "governance": { + "add-memo": "Add memo", + "add-your-memo": "Add your memo", + "amount-error-min": "Bellow minimal value", + "amount-error-more-than-have": "More than you have", + "cast-vote": "Cast your vote", + "change-vote-message": "You can change your vote while the voting is in progress", + "confirm-delegation": "Confirm delegation", + "created-at": "Created at (gmt)", + "dates": "Dates", + "deposit": "Deposit", + "deposit-end": "Deposit end", + "description": "Description", + "enter-amount": "Enter Amount", + "enter-deposit-message": "Enter the amount you want to deposit", + "fetching-proposal-details": "Fetching proposal details", + "fetching-proposals": "Fetching proposals", + "info": "Info", + "my-balance": "My balance", + "parameter-changes": "Parameter changes", + "proposal-deposit-alert": "If the proposal does not collect the required number of deposits in a certain time, it will reject", + "proposal-types": { + "cancel-software-upgrade": "Cancel software upgrade", + "client-update": "Client update", + "parameter-change": "Parameter change", + "register-coin": "Register coin", + "register-erc20": "Register ERC20", + "software-upgrade": "Software upgrade", + "text": "Text" + }, + "show-all-dates": "Show all dates", + "total-deposit": "Total deposit", + "upgrade-plan": "Upgrade plan", + "vote-end": "Vote end (gmt)", + "vote-fail-error": "For some reason your vote failed.", + "vote-in-progress": "Vote in progress", + "vote-option-abstain": "Abstain", + "vote-option-no": "No", + "vote-option-veto": "Veto", + "vote-option-yes": "Yes", + "vote-start": "Vote start (gmt)", + "vote-will-count": "Your vote will be counted!!!", + "voting-end": "Voting end", "your-balance": "Your balance: {{balance}} {{symbol}}" }, "main": {}, diff --git a/package.json b/package.json index b8064c206..6f2c0f71b 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "format": "pnpm exec prettier --write '**/*.{ts,js,tsx,jsx,cjs,mjs,css,json,md,mdx,html,yaml,yml}'", "prepare": "pnpm exec husky", "tolgee": "pnpm exec tolgee --config ./apps/shell/.tolgeerc.js", + "tolgee:sync": "pnpm exec tolgee sync --config ./apps/shell/.tolgeerc.js", "tolgee:pull": "pnpm exec tolgee pull --config ./apps/shell/.tolgeerc.js", "tolgee:push": "pnpm exec tolgee push --config ./apps/shell/.tolgeerc.js", "tolgee:extract:check": "pnpm exec tolgee extract check --config ./apps/shell/.tolgeerc.js", From f859881ea1c1adc7e59e5343272a1ffe7909792b Mon Sep 17 00:00:00 2001 From: viktoriabakun Date: Tue, 5 Nov 2024 10:51:07 +0100 Subject: [PATCH 5/5] chore: fix build Signed-off-by: viktoriabakun --- apps/shell/src/components/locale-dropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/shell/src/components/locale-dropdown.tsx b/apps/shell/src/components/locale-dropdown.tsx index 7c1cff9b7..5f4d64bf0 100644 --- a/apps/shell/src/components/locale-dropdown.tsx +++ b/apps/shell/src/components/locale-dropdown.tsx @@ -1,5 +1,5 @@ -import { useLocaleSwitcher } from '../hooks/use-locale-switcher'; import { LocaleDropdown } from '@haqq/shell-ui-kit'; +import { useLocaleSwitcher } from '../hooks/use-locale-switcher'; export function AppLocaleDropdown() { const { switchLocale, locales, currentLocale } = useLocaleSwitcher();