Skip to content

Commit

Permalink
check unlocalized strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ttwishing committed Jan 22, 2025
1 parent e5a2f0d commit 8786022
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 18 deletions.
15 changes: 14 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"common_complete": "Complete",
"common_confirm": "Confirm",
"common_connect_wallet": "Connect Wallet",
"common_contract": "Contract",
"common_copied_result": "Copied!",
"common_copy": "Copy",
"common_cpu_total": "Total CPU",
Expand Down Expand Up @@ -146,6 +147,8 @@
"common_transaction_complete": "Transaction Complete",
"common_transaction_error": "Transaction Error",
"common_transaction_error_subtitle": "There was an error submitting your transaction.",
"common_transaction_unit_multi": "Transactions",
"common_transaction_unit_single": "Transaction",
"common_transfer_to_another_account": "Transfer tokens to another account.",
"common_trx_id": "Transaction ID",
"common_trx_not_found": "Transaction Not Found",
Expand Down Expand Up @@ -224,6 +227,7 @@
"homepage_staking_description": "The {network} staking rewards program proportionally distributes 85.6k {token} daily to token holders who have staked their tokens. These tokens can be unstaked and will be usable again after a 21 day lockup period.",
"homepage_staking_intro": "Stake {network} today for an estimated {apr}% APR",
"homepage_staking_intro_legend": "APR is based on the total amount staked and dynamically changes over time.",
"key_404": "Key not found: {error}",
"key_page_description": "A public key associated with {accounts} account(s) on the {network} network.",
"key_page_subtitle": "The {accounts} account(s) associated with this public key",
"key_page_title": "Public Key",
Expand Down Expand Up @@ -314,6 +318,8 @@
"ram_metadata_buy_title": "{token}/RAM Market | {network} Network",
"ram_metadata_overview_description": "An overview of RAM Market on the {network} network that provides access to buy and sell RAM with {token} using an {network} compatible wallet.",
"ram_metadata_sell_description": "Exchange RAM for {token} on the {network} network using an {network} compatible wallet.",
"ram_overview_subtitlle": "An overview of the {token}/RAM market on the {network} Network.",
"ram_overview_titlle": "{token}/RAM Market",
"ram_page_sell_subtitle": "Exchange RAM for {token} on the {network} network.",
"ram_page_subtitle": "Exchange {token} for RAM on the {network} network.",
"ram_purchase_value": "RAM Purchase Value",
Expand All @@ -326,9 +332,15 @@
"resources_rent_confirm": "Confirm Rent",
"resources_rent_confirm_with_cost": "Rent for {cost}",
"resources_rent_for_self": "Rent Resources for my account",
"resources_rent_metadata_description": "Rent CPU and NET resources on the {network} Network using an {network} compatible wallet.",
"resources_rent_metadata_title": "Rent Resources | {network} Network",
"resources_rent_receiving_placeholder": "Enter the account name",
"resources_rent_renting": "Renting",
"resources_rent_subtitle": "Rent CPU and NET resources on the {network} Network.",
"resources_rent_title": "Rent Resources",
"resources_rent_with_powerup": "Rent resources with PowerUp",
"resources_rent_with_rex": "Rent resources with REX",
"resources_rent_with_rex_simple": "Rent with Rex",
"resources_rent_with_stake": "Stake {symbolName} for resources",
"resources_usable_time_24h": "24 Hours",
"resources_usable_time_30days": "30 Days",
Expand Down Expand Up @@ -380,9 +392,10 @@
"token_purchase_providers": "Token Purchase Providers",
"tokens_purchase_providers": "Tokens can be purchased directly through the following providers:",
"total_proceeds": "Total Proceeds",
"transaction_404": "Transaction not found: {transaction}",
"transaction_page_meta_description": "A transaction performed at {date} on the {network} Network.",
"transaction_page_meta_title": "{id} | {network} Network",
"transaction_page_subtitle": "Transaction on {date}",
"unstaking_description": "The tokens currently being unstaked are listed below with the date they become available. These balances will continue to earn rewards until they are withdrawn.",
"where_eos_can_be_purchased": "EOS can be purchased through a number of platforms, depending on the users needs and location. Below are some of the most popular options available."
}
}
9 changes: 5 additions & 4 deletions src/routes/[network]/(account)/ram/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ import * as m from '$lib/paraglide/messages';

export const load: LayoutLoad = async ({ parent }) => {
const { network } = await parent();
const token = String(network.chain.systemToken?.symbol.name || m.common_tokens());
return {
title: `${network.chain.systemToken?.symbol.name}/RAM Market`,
subtitle: `An overview of the ${network.chain.systemToken?.symbol.name}/RAM market on the ${network.chain.name} network.`,
title: m.ram_overview_titlle({ token }),
subtitle: m.ram_overview_subtitlle({ token, network: network.chain.name }),
pageMetaTags: {
title: [
m.ram_metadata_buy_title({
token: String(network.chain.systemToken?.symbol.name || m.common_tokens()),
token: token,
network: network.chain.name
})
].join(' | '),
description: m.ram_metadata_overview_description({
token: String(network.chain.systemToken?.symbol.name || m.common_tokens()),
token: token,
network: network.chain.name
})
}
Expand Down
9 changes: 5 additions & 4 deletions src/routes/[network]/(account)/resources/powerup/+page.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { languageTag } from '$lib/paraglide/runtime';
import type { PageLoad } from './$types';
import * as m from '$lib/paraglide/messages';

export const load: PageLoad = async ({ params, parent }) => {
const { network } = await parent();
return {
title: 'Rent Resources',
subtitle: `Rent CPU and NET resources on the ${network.chain.name} network.`,
title: m.resources_rent_title(),
subtitle: m.resources_rent_subtitle({ network: network.chain.name }),
backPath: `/${languageTag()}/${params.network}/resources`,
pageMetaTags: {
title: `Rent Resources | ${network.chain.name} Network`,
description: `Rent CPU and NET resources on the ${network.chain.name} network using an ${network.chain.name} compatible wallet.`
title: m.resources_rent_metadata_title({ network: network.chain.name }),
description: m.resources_rent_metadata_description({ network: network.chain.name })
}
};
};
3 changes: 2 additions & 1 deletion src/routes/[network]/(account)/resources/rex/+page.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { languageTag } from '$lib/paraglide/runtime';
import type { PageLoad } from './$types';
import * as m from '$lib/paraglide/messages';

export const load: PageLoad = ({ params }) => {
return {
subtitle: 'Rent with Rex',
subtitle: m.resources_rent_with_rex_simple(),
backPath: `/${languageTag()}/${params.network}/resources`
};
};
3 changes: 2 additions & 1 deletion src/routes/[network]/(account)/resources/stake/+page.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { languageTag } from '$lib/paraglide/runtime';
import type { PageLoad } from './$types';
import * as m from '$lib/paraglide/messages';

export const load: PageLoad = ({ params }) => {
return {
subtitle: 'Renting',
subtitle: m.resources_rent_renting(),
backPath: `/${languageTag()}/${params.network}/resources`
};
};
4 changes: 3 additions & 1 deletion src/routes/[network]/(explorer)/block/[number]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
<h2 class="h3 flex items-center gap-2">
<ArrowLeftRight class="size-5" />
{transactions.length}
{transactions.length === 1 ? 'Transaction' : 'Transactions'}
{transactions.length === 1
? m.common_transaction_unit_single()
: m.common_transaction_unit_multi()}
</h2>

{#if transactions.length}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/[network]/(explorer)/key/[publicKey]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const load: PageLoad = async ({ fetch, params, parent }) => {
pubkey = PublicKey.from(String(params.publicKey));
} catch (e) {
error(404, {
message: `Key not found: ${e}`,
message: m.key_404({ error: String(e) }),
code: 'KEY_NOT_FOUND'
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { truncateCenter } from '$lib/utils';
import type { Load } from '@sveltejs/kit';
import { error, type Load } from '@sveltejs/kit';
import * as m from '$lib/paraglide/messages';

export const load: Load = async ({ fetch, params, parent }) => {
const { network } = await parent();
const response = await fetch(`/${params.network}/api/transaction/${params.id}`);
const json = await response.json();
if (!json?.transaction?.id) {
error(404, {
message: m.transaction_404({
transaction: truncateCenter(params.id || '', 14)
}),
code: 'NOT_FOUND'
});
}
return {
...json,
title: `${truncateCenter(json.transaction.id, 14)}`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import Code from '$lib/components/code.svelte';
import * as m from '$lib/paraglide/messages';
// import SendSummary from '$lib/components/summary/eosio.token/transfer.svelte';
// import DepositSummary from '$lib/components/summary/eosio/deposit.svelte';
Expand Down Expand Up @@ -50,10 +51,10 @@
<table class="table-styles">
<thead>
<tr>
<th>Contract</th>
<th>Action</th>
<th>Authorization</th>
<th>Data</th>
<th>{m.common_contract()}</th>
<th>{m.common_action()}</th>
<th>{m.common_permission_authorization()}</th>
<th>{m.common_data()}</th>
</tr>
</thead>
<tbody>
Expand Down

0 comments on commit 8786022

Please sign in to comment.