Skip to content

Commit

Permalink
feat: restructure translations
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Sep 18, 2023
1 parent bb39069 commit 56b6278
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 32 deletions.
10 changes: 4 additions & 6 deletions src/app/components/Enable/AlbyEnable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function AlbyEnableComponent(props: Props) {
domain: props.origin.domain,
host: props.origin.host,
});
alert(tCommon("block_added", { host: props.origin.host }));
alert(tCommon("enable.block_added", { host: props.origin.host }));
msg.error(USER_REJECTED_ERROR);
}

Expand All @@ -63,13 +63,11 @@ function AlbyEnableComponent(props: Props) {
/>

<div className="dark:text-white pt-6">
<p className="mb-2">{tCommon("allow")}</p>
<p className="mb-2">{tCommon("enable.allow")}</p>

<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
<p className="dark:text-white">
{tCommon("request_transaction_approval")}
</p>
<p className="dark:text-white">{tCommon("enable.request1")}</p>
</div>
<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
Expand All @@ -90,7 +88,7 @@ function AlbyEnableComponent(props: Props) {
href="#"
onClick={block}
>
{tCommon("actions.block_and_ignore", { host: props.origin.host })}
{tCommon("enable.block_and_ignore", { host: props.origin.host })}
</a>
</div>
</Container>
Expand Down
10 changes: 4 additions & 6 deletions src/app/components/Enable/LiquidEnable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function LiquidEnableComponent(props: Props) {
domain: props.origin.domain,
host: props.origin.host,
});
alert(tCommon("block_added", { host: props.origin.host }));
alert(tCommon("enable.block_added", { host: props.origin.host }));
msg.error(USER_REJECTED_ERROR);
}

Expand All @@ -63,13 +63,11 @@ function LiquidEnableComponent(props: Props) {
/>

<div className="dark:text-white pt-6">
<p className="mb-2">{tCommon("allow")}</p>
<p className="mb-2">{tCommon("enable.allow")}</p>

<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
<p className="dark:text-white">
{tCommon("request_transaction_approval")}
</p>
<p className="dark:text-white">{tCommon("enable.request1")}</p>
</div>
<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
Expand All @@ -90,7 +88,7 @@ function LiquidEnableComponent(props: Props) {
href="#"
onClick={block}
>
{tCommon("actions.block_and_ignore", { host: props.origin.host })}
{tCommon("enable.block_and_ignore", { host: props.origin.host })}
</a>
</div>
</Container>
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/Enable/NostrEnable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function NostrEnableComponent(props: Props) {
domain: props.origin.domain,
host: props.origin.host,
});
alert(tCommon("block_added", { host: props.origin.host }));
alert(tCommon("enable.block_added", { host: props.origin.host }));
msg.error(USER_REJECTED_ERROR);
}

Expand All @@ -63,7 +63,7 @@ function NostrEnableComponent(props: Props) {
/>

<div className="dark:text-white pt-6">
<p className="mb-2">{tCommon("allow")}</p>
<p className="mb-2">{tCommon("enable.allow")}</p>

<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
Expand All @@ -88,7 +88,7 @@ function NostrEnableComponent(props: Props) {
href="#"
onClick={block}
>
{tCommon("actions.block_and_ignore", { host: props.origin.host })}
{tCommon("enable.block_and_ignore", { host: props.origin.host })}
</a>
</div>
</Container>
Expand Down
10 changes: 4 additions & 6 deletions src/app/components/Enable/WebbtcEnable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function WebbtcEnableComponent(props: Props) {
domain: props.origin.domain,
host: props.origin.host,
});
alert(tCommon("block_added", { host: props.origin.host }));
alert(tCommon("enable.block_added", { host: props.origin.host }));
msg.error(USER_REJECTED_ERROR);
}

Expand All @@ -63,13 +63,11 @@ function WebbtcEnableComponent(props: Props) {
/>

<div className="dark:text-white pt-6">
<p className="mb-2">{tCommon("allow")}</p>
<p className="mb-2">{tCommon("enable.allow")}</p>

<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
<p className="dark:text-white">
{tCommon("request_transaction_approval")}
</p>
<p className="dark:text-white">{tCommon("enable.request1")}</p>
</div>
<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
Expand All @@ -90,7 +88,7 @@ function WebbtcEnableComponent(props: Props) {
href="#"
onClick={block}
>
{tCommon("actions.block_and_ignore", { host: props.origin.host })}
{tCommon("enable.block_and_ignore", { host: props.origin.host })}
</a>
</div>
</Container>
Expand Down
10 changes: 4 additions & 6 deletions src/app/components/Enable/WeblnEnable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function WeblnEnableComponent(props: Props) {
domain: props.origin.domain,
host: props.origin.host,
});
alert(tCommon("block_added", { host: props.origin.host }));
alert(tCommon("enable.block_added", { host: props.origin.host }));
msg.error(USER_REJECTED_ERROR);
}

Expand All @@ -63,13 +63,11 @@ function WeblnEnableComponent(props: Props) {
/>

<div className="dark:text-white pt-6">
<p className="mb-2">{tCommon("allow")}</p>
<p className="mb-2">{tCommon("enable.allow")}</p>

<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
<p className="dark:text-white">
{tCommon("request_transaction_approval")}
</p>
<p className="dark:text-white">{tCommon("enable.request1")}</p>
</div>
<div className="mb-2 flex items-center">
<CheckIcon className="w-5 h-5 mr-2" />
Expand All @@ -90,7 +88,7 @@ function WeblnEnableComponent(props: Props) {
href="#"
onClick={block}
>
{tCommon("actions.block_and_ignore", { host: props.origin.host })}
{tCommon("enable.block_and_ignore", { host: props.origin.host })}
</a>
</div>
</Container>
Expand Down
12 changes: 7 additions & 5 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,6 @@
}
},
"common": {
"allow": "Allow this website to:",
"password": "Password",
"confirm_password": "Confirm Password",
"advanced": "Advanced",
Expand All @@ -998,8 +997,6 @@
"help": "Help",
"balance": "Balance",
"or": "or",
"block_added": "Added {{host}} to the blocklist, please reload the website.",
"request_transaction_approval": "Request approval for transactions",
"actions": {
"back": "Back",
"delete": "Delete",
Expand Down Expand Up @@ -1032,8 +1029,7 @@
"more": "More",
"disconnect": "Disconnect",
"review": "Review",
"download": "Download",
"block_and_ignore": "Block and ignore {{host}}"
"download": "Download"
},
"connectors": {
"lnd": "LND",
Expand All @@ -1056,6 +1052,12 @@
"between": "between {{min}} and {{max}}",
"lessThanOrEqual": "≤ {{max}}",
"greaterOrEqual": "≥ {{min}}"
},
"enable": {
"allow": "Allow this website to:",
"block_added": "Added {{host}} to the blocklist, please reload the website.",
"request1": "Request approval for transactions",
"block_and_ignore": "Block and ignore {{host}}"
}
},
"components": {
Expand Down

0 comments on commit 56b6278

Please sign in to comment.