chore: add translations

This commit is contained in:
Tom (plebeius.eth)
2024-06-14 17:18:48 +02:00
parent 3206631e89
commit 3e42947154
38 changed files with 369 additions and 50 deletions
@@ -104,21 +104,21 @@ const ViewOnButton = ({ cid, isDescription, isInAllView, isInSubscriptionsView,
};
export const BlockUserButton = ({ address }: { address: string }) => {
const { t } = useTranslation();
const { blocked, unblock, block } = useBlock({ address });
return (
<div className={styles.postMenuItem} onClick={blocked ? unblock : block}>
{blocked ? 'Unblock' : 'Block'} user
{blocked ? t('unblock_user') : t('block_user')}
</div>
);
};
export const BlockBoardButton = ({ address }: { address: string }) => {
const { t } = useTranslation();
const { blocked, unblock, block } = useBlock({ address });
return (
<div className={styles.postMenuItem} onClick={blocked ? unblock : block}>
{blocked ? 'Unblock' : 'Block'} board
{blocked ? t('unblock_board') : t('block_board')}
</div>
);
};
@@ -3,13 +3,13 @@
margin-bottom: 10px;
}
.blockedAddresses {
padding-top: 5px;
.blockedAddress {
padding-bottom: 5px;
margin-left: 20px;
}
.blockedAddress {
padding-top: 5px;
margin-left: 20px;
.unblockAll {
padding-bottom: 10px;
}
.button {
@@ -28,11 +28,15 @@ const BlockedAddressesSetting = () => {
<div className={styles.setting}>
{addressList.length > 0 ? (
<>
[
<span className={styles.button} onClick={unblockAll}>
{t('unblock_all')}
</span>
]
{addressList.length > 1 && (
<div className={styles.unblockAll}>
[
<span className={styles.button} onClick={unblockAll}>
{t('unblock_all')}
</span>
]
</div>
)}
<ul className={styles.blockedAddresses}>
{addressList.map((address: string) => (
<li key={address} className={styles.blockedAddress}>
@@ -42,7 +46,7 @@ const BlockedAddressesSetting = () => {
</ul>
</>
) : (
'You have not blocked any board address or user address.'
t('you_have_not_blocked')
)}
</div>
);