Skip to content

Commit

Permalink
some more fixes and additions to translations
Browse files Browse the repository at this point in the history
  • Loading branch information
ronickg committed Dec 23, 2024
1 parent 07d1a80 commit 901d604
Show file tree
Hide file tree
Showing 19 changed files with 735 additions and 782 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:lingui/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint-plugin-lingui": "^0.9.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"postcss": "^8.4.47",
Expand Down
86 changes: 86 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/ConfirmationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default function ConfirmationDialog({
onConfirm,
}: ConfirmationDialogProps) {
const walletState = useWalletState();
const ticker = walletState.sync.unit.ticker;

const { addError } = useErrors();

Expand Down Expand Up @@ -141,8 +142,7 @@ export default function ConfirmationDialog({
</AlertTitle>
<AlertDescription>
<Trans>
Fee exceeds recommended maximum of 0.001{' '}
{walletState.sync.unit.ticker}
Fee exceeds recommended maximum of 0.001 {ticker}
</Trans>
</AlertDescription>
</Alert>
Expand Down
6 changes: 4 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ export default function Header(

const initialized = useInitialization();
const wallet = useWallet(initialized);

const { peers } = usePeers();

const walletState = useWalletState();
const syncedCoins = walletState.sync.synced_coins;
const totalCoins = walletState.sync.total_coins;
const isSynced = useMemo(
() => walletState.sync.synced_coins === walletState.sync.total_coins,
[walletState.sync.synced_coins, walletState.sync.total_coins],
Expand Down Expand Up @@ -129,8 +132,7 @@ export default function Header(
</>
) : (
<Trans>
Syncing {walletState.sync.synced_coins} /{' '}
{walletState.sync.total_coins}
Syncing {syncedCoins} / {totalCoins}
</Trans>
)}
</Link>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default function Layout(props: PropsWithChildren<object>) {
const { peers } = usePeers();

const walletState = useWalletState();
const syncedCoins = walletState.sync.synced_coins;
const totalCoins = walletState.sync.total_coins;
const isSynced = useMemo(
() => walletState.sync.synced_coins === walletState.sync.total_coins,
[walletState.sync.synced_coins, walletState.sync.total_coins],
Expand Down Expand Up @@ -83,8 +85,7 @@ export default function Layout(props: PropsWithChildren<object>) {
</>
) : (
<Trans>
Syncing {walletState.sync.synced_coins} /{' '}
{walletState.sync.total_coins}
Syncing {syncedCoins} / {totalCoins}
</Trans>
)}
</Link>
Expand Down
7 changes: 4 additions & 3 deletions src/components/MultiSelectActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function MultiSelectActions({
}: MultiSelectActionsProps) {
const walletState = useWalletState();
const { addError } = useErrors();
const selectedCount = selected.length;

const [transferOpen, setTransferOpen] = useState(false);
const [assignOpen, setAssignOpen] = useState(false);
Expand Down Expand Up @@ -82,7 +83,7 @@ export function MultiSelectActions({
<>
<div className='absolute flex justify-between items-center gap-3 bottom-6 w-60 px-5 p-3 rounded-lg shadow-md shadow-black/20 left-1/2 -translate-x-1/2 bg-white border border-neutral-200 dark:border-neutral-800 dark:bg-neutral-900'>
<span className='flex-shrink-0 text-neutral-900 dark:text-white'>
<Trans>{selected.length} selected</Trans>
<Trans>{selectedCount} selected</Trans>
</span>
<DropdownMenu>
<DropdownMenuTrigger asChild>
Expand Down Expand Up @@ -156,7 +157,7 @@ export function MultiSelectActions({
onSubmit={onTransferSubmit}
>
<Trans>
This will bulk transfer {selected.length} NFTs to another wallet. Are
This will bulk transfer {selectedCount} NFTs to another wallet. Are
you sure you want to proceed?
</Trans>
</TransferDialog>
Expand Down Expand Up @@ -186,7 +187,7 @@ export function MultiSelectActions({
onSubmit={onBurnSubmit}
>
<Trans>
This will bulk burn {selected.length} NFTs. This cannot be undone. Are
This will bulk burn {selectedCount} NFTs. This cannot be undone. Are
you sure you want to proceed?
</Trans>
</FeeOnlyDialog>
Expand Down
Loading

0 comments on commit 901d604

Please sign in to comment.