Skip to content

Commit

Permalink
Localizing explorer pages
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncox committed Dec 27, 2024
1 parent 288dfaf commit 78ec215
Show file tree
Hide file tree
Showing 21 changed files with 322 additions and 127 deletions.
97 changes: 96 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,68 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"_500_per_day": "$500/day",
"account_404": "Account not found: {account}",
"account_meta_description": "An overview of the {account} account on the {network} Network. View account assets, activity, resources and more.",
"account_meta_title": "{account} | {network} Network Account",
"account_page": "Account Page",
"account_page_subtitle": "Account overview on the {network} Network",
"account_page_total_value": "Total Account Value",
"accounts_using_public_key": "Associated Accounts",
"active_session": "Active Session",
"block_height_numbered": "Block #{height}",
"block_height_numbered_description": "Block #{height} was produced by {producer} on {timestamp}, which included {transactions} transactions performing {actions} actions.",
"block_page_details": "Block Details",
"buy_eos_with_coinbase": "Buy EOS with Coinbase",
"buy_or_transfer_crypto": "Buy or transfer EOS",
"change_network": "Change network",
"coinbase_service_unavailable": "Coinbase service is currently unavailable.",
"common_about_something": "About {thing}",
"common_account": "Actor",
"common_account_balance": "Account Balance",
"common_action": "Action",
"common_actions": "Actions",
"common_actor": "Actor",
"common_add_funds": "Add Funds",
"common_amount": "Amount",
"common_amount_exceeds_balance": "Amount exceeds available balance.",
"common_amount_to_act": "Amount to {action}",
"common_approve": "Approve",
"common_apr_current": "Current APR",
"common_asset": "Asset",
"common_available": "Available",
"common_back": "Back",
"common_balance": "Balance",
"common_block_id": "Block ID",
"common_block_next": "Next Block",
"common_block_number": "Block Number",
"common_block_previous": "Previous Block",
"common_breakdown": "Breakdown",
"common_buy": "Buy",
"common_bytes": "Bytes",
"common_claim": "Claim",
"common_clear": "Clear",
"common_close": "Close",
"common_complete": "Complete",
"common_confirm": "Confirm",
"common_connect_wallet": "Connect Wallet",
"common_copied_result": "Copied!",
"common_copy": "Copy",
"common_cpu_total": "Total CPU",
"common_cpu_us": "CPU (μs)",
"common_create_account": "Create an account",
"common_data": "Data",
"common_date_available": "Date Available",
"common_debugging": "Debugging",
"common_delegated": "Delegated",
"common_details": "Details",
"common_distribution": "Distribution",
"common_error": "Error",
"common_exchanges": "Exchanges",
"common_expected_receive": "Expected to receive",
"common_faq": "FAQ",
"common_fill_max": "Fill Max",
"common_get_tokens": "Get Tokens",
"common_hash": "Hash",
"common_invalid_number_decimals": "Invalid number, too many decimal places.",
"common_labeled_unit_available": "{unit} Available",
"common_labeled_unit_balance": "{unit} Balance",
Expand All @@ -52,19 +76,36 @@
"common_my_account": "My Account",
"common_my_accounts": "My Accounts",
"common_native_tvl": "Native TVL",
"common_net_bytes": "NET (Bytes)",
"common_net_total": "Total NET",
"common_network_fees": "Network Fees",
"common_next": "Next",
"common_no_active_sessions": "No active sessions",
"common_no_balances": "No balances found.",
"common_no_transactions": "No transactions",
"common_not_logged_in": "Not logged in",
"common_open_source": "open source",
"common_optional": "Optional",
"common_permission": "Permission",
"common_permission_authorization": "Authorization",
"common_permission_name": "Permission Name",
"common_permission_threshold": "Threshold",
"common_permission_weight": "Weight",
"common_producer_name": "Producer Name",
"common_producer_standby": "Standby",
"common_producer_top21": "Top 21",
"common_ram_market": "RAM Market",
"common_recent_activity": "Recent Activity",
"common_recipient": "Recipient",
"common_reclaim": "Reclaim",
"common_refund": "Refund",
"common_refund_tokens": "Claim previously delegated {token} tokens",
"common_refunding": "Refunding",
"common_required": "Required",
"common_resources": "Resources",
"common_resources_action": "Manage CPU/NET",
"common_restart": "Restart",
"common_role": "Role",
"common_search": "Search...",
"common_search_instructions": "Search for Unicove features or enter an account name, public key, or transaction ID on the network.",
"common_search_no_results": "No results found",
Expand All @@ -73,7 +114,10 @@
"common_select_an_option": "Select an option",
"common_sell": "Sell",
"common_send": "Send",
"common_send_tokens": "Send Tokens",
"common_settings": "Settings",
"common_signer": "Signer",
"common_source_code": "Source Code",
"common_stake": "Stake",
"common_stake_action": "Stake Tokens",
"common_stake_tokens": "Stake {token} Tokens",
Expand All @@ -83,26 +127,37 @@
"common_staking_rewards": "Staking Rewards",
"common_status": "Status",
"common_submit": "Submit",
"common_summary": "Summary",
"common_supply": "Supply",
"common_switch_account": "Switch Account",
"common_timeframe_daily": "Daily",
"common_timeframe_monthly": "Monthly",
"common_timeframe_yearly": "Yearly",
"common_today": "Today",
"common_token": "Token",
"common_tokens": "tokens",
"common_total": "Total",
"common_total_actions": "Total Actions",
"common_total_cost": "Total Cost",
"common_total_staked": "Total Staked",
"common_transaction": "Transaction",
"common_transaction_complete": "Transaction Complete",
"common_transaction_error": "Transaction Error",
"common_transaction_error_subtitle": "There was an error submitting your transaction.",
"common_transfer_to_another_account": "Transfer tokens to another account.",
"common_trx_id": "Transaction ID",
"common_trx_not_found": "Transaction Not Found",
"common_trx_not_found_description": "The transaction with ID {transactionId} could not be found.",
"common_unapprove": "Unapprove",
"common_unit_buy": "Buy {unit}",
"common_unit_sell": "Sell {unit}",
"common_unstake": "Unstake",
"common_unstake_action": "Unstake tokens",
"common_unstake_tokens": "Unstake {token} tokens",
"common_unstaked": "Unstaked",
"common_unstaking": "Unstaking",
"common_used": "Used",
"common_value": "Value",
"common_value_with_amount": "Value: {amount}",
"common_version": "version",
"common_view_my_account": "View my account",
Expand Down Expand Up @@ -133,6 +188,15 @@
"details": "Details",
"error_loading_accounts": "Error loading accounts: {error}",
"exchanges": "Exchanges",
"explorer_account_activity_meta_description": "View the transaction history of the {account} account on the {network} network.",
"explorer_account_activity_meta_title": "Account Activity for {account} | {network} Network",
"explorer_account_activity_subtitle": "Recent activity on the {network} Network.",
"explorer_account_balances_meta_description": "The token balances of the {account} account on the {network} network.",
"explorer_account_balances_meta_title": "Token Balances | {account} | {network} Network",
"explorer_account_balances_subtitle": "Token balances on the {network} Network.",
"explorer_account_permissions_meta_description": "Permissions for {account} on the {network} network.",
"explorer_account_permissions_meta_title": "Permissions | {account} | {network} Network",
"explorer_account_permissions_subtitle": "Permissions on the {network} Network.",
"form_validation_insufficient_balance": "Insufficient {unit} balance. Please enter a smaller amount.",
"form_validation_invalid_number_decimals": "Invalid number, too many decimal places.",
"fund_account": "Fund Account",
Expand Down Expand Up @@ -217,7 +281,27 @@
"metamask_public_key_active": "MetaMask Public Key (Active)",
"metamask_public_key_owner": "MetaMask Public Key (Owner)",
"metamask_snaps_directory": "MetaMask Snaps Directory",
"msig_approved": "Approved",
"msig_cancel_action": "Cancel MSIG",
"msig_details": "Multisig Details",
"msig_execute_action": "Execute",
"msig_expiration": "Expiration",
"msig_expired": "Expired",
"msig_page_subtitle": "An MSIG proposed by {proposer} on the {network} Network",
"msig_proposal_name": "Proposal Name",
"msig_proposed_actions": "Proposed Actions",
"msig_proposer": "Proposer",
"msig_requested": "Requested",
"msig_requested_approvals": "Requested Approvals",
"must_be_logged_in_for_feature": "You must be logged in with an account to use this feature.",
"navigation_activity": "Activity",
"navigation_balances": "Balances",
"navigation_overview": "Overview",
"navigation_permissions": "Permissions",
"navigation_proposals": "Proposals",
"navigation_resources": "Resources",
"navigation_staked": "Staked",
"navigation_votes": "Votes",
"no_accounts_found": "No accounts found",
"no_supported_funding_methods": "No supported funding methods for this blockchain.",
"processing_fees": "Processing fees",
Expand All @@ -233,12 +317,19 @@
"ram_sale_value": "Amount of RAM to sell:",
"ram_to_purchase": "RAM to be bought",
"ram_to_sell": "RAM to be sold",
"search_result_description_buyram": "Purchase RAM",
"search_result_description_clear": "Clear search history",
"search_result_description_ram": "Market Overview",
"search_result_description_sellram": "Sell RAM",
"search_result_description_settings": "Configure Unicove",
"search_result_description_staking": "Staking overview",
"search_result_description_transfer": "Transfer tokens",
"search_view_type": "View {type}",
"select_provider": "Select provider",
"send_amount_to_send": "Amount to send",
"send_enter_amount": "Enter the amount of {token} to send",
"send_memo_placeholder": "Specify a public memo for this transfer (optional)",
"send_no_balances": "No balances detected.",
"send_page_description": "Transfer tokens from one account to another account on the {network} network using an {network} compatible wallet.",
"send_receiving_account": "Receiving Account",
"send_receiving_placeholder": "Enter the account name of the recipient",
"send_start_new": "Start new send",
Expand All @@ -251,6 +342,7 @@
"settings_enable_developer_desc": "Show raw data used for development and debugging",
"settings_general": "General",
"settings_language_selector": "Language Selector",
"settings_page_subtitle": "Configure Unicove",
"settings_prevent_account_page_switching": "Remain on current page when switching accounts",
"settings_prevent_account_page_switching_desc": "Prevents the automatic navigation to the account overview page",
"settings_search_account_switch": "Allow account switching in search prompt",
Expand All @@ -272,6 +364,9 @@
"token_purchase_providers": "Token Purchase Providers",
"tokens_purchase_providers": "Tokens can be purchased directly through the following providers:",
"total_proceeds": "Total Proceeds",
"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."
}
4 changes: 2 additions & 2 deletions src/lib/components/card/accountbalance.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
title?: string;
}
const { cta, title = 'Account Balance' }: Props = $props();
const { cta, title = m.common_account_balance() }: Props = $props();
</script>

<Card {title}>
<Stack>
<Stack class="gap-2">
<h4 class="text-muted text-base leading-none">Available</h4>
<h4 class="text-muted text-base leading-none">{m.common_available()}</h4>
<p class="text-xl font-semibold leading-none text-white">
{#if context.account}
<AssetText variant="full" value={context.account?.balance?.liquid} />
Expand Down
11 changes: 6 additions & 5 deletions src/lib/components/chart/tokendistribution.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
import type { AccountValue } from '$lib/state/client/account.svelte';
import { cn, percentString } from '$lib/utils';
import { Card } from '../layout';
import * as m from '$lib/paraglide/messages';
interface Props {
data?: AccountValue;
}
let { data }: Props = $props();
const distributionMap = {
delegated: { label: 'Delegated', color: 'bg-mineShaft-300' },
liquid: { label: 'Available', color: 'bg-green-400' },
delegated: { label: m.common_delegated(), color: 'bg-mineShaft-300' },
liquid: { label: m.common_available(), color: 'bg-green-400' },
ram: { label: 'RAM', color: 'bg-solar-400' },
staked: { label: 'Staked', color: 'bg-skyBlue-400' },
unstaked: { label: 'Unstaked', color: 'bg-skyBlue-400' }
staked: { label: m.common_staked(), color: 'bg-skyBlue-400' },
unstaked: { label: m.common_unstaked(), color: 'bg-skyBlue-400' }
};
type DistributionItem = {
Expand All @@ -39,7 +40,7 @@
const displayThreshold = 0.0001;
</script>

<Card id="distribution" title="Distribution">
<Card id="distribution" title={m.common_distribution()}>
{#if distribution}
<div id="distribution-container" class="flex gap-1">
{#each distribution as item}
Expand Down
23 changes: 12 additions & 11 deletions src/lib/state/search.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { browser } from '$app/environment';
import type { NetworkState } from './network.svelte';
import type { UnicoveContext } from './client.svelte';
import type { WharfState } from './client/wharf.svelte';
import * as m from '$lib/paraglide/messages';

export type SearchResult = {
result: string;
Expand Down Expand Up @@ -47,69 +48,69 @@ export const SearchCommands: SearchRecord[] = [
value: 'RAM Market',
type: SearchRecordType.PAGE,
keywords: ['ram'],
description: 'Market Overview',
description: m.search_result_description_ram(),
url: '/ram'
},
{
value: 'Buy RAM',
type: SearchRecordType.PAGE,
keywords: ['ram', 'buy'],
description: 'Purchase RAM',
description: m.search_result_description_buyram(),
url: '/ram/buy'
},
{
value: 'Sell RAM',
type: SearchRecordType.PAGE,
keywords: ['ram', 'sell'],
description: 'Sell RAM',
description: m.search_result_description_sellram(),
url: '/ram/sell'
},
{
value: 'Send',
type: SearchRecordType.PAGE,
keywords: ['send', 'transfer'],
description: 'Transfer tokens',
description: m.search_result_description_transfer(),
url: '/send'
},
{
value: 'Settings',
type: SearchRecordType.PAGE,
keywords: ['settings', 'preferences'],
description: 'Unicove Settings',
description: m.search_result_description_settings(),
url: '/settings'
},
{
value: 'Staking',
type: SearchRecordType.PAGE,
keywords: ['staking', 'stake'],
description: 'Staking overview',
description: m.search_result_description_staking(),
url: '/staking'
},
{
value: 'Stake',
type: SearchRecordType.PAGE,
keywords: ['stake'],
description: 'Stake tokens',
description: m.common_stake_action(),
url: '/staking/stake'
},
{
value: 'Unstake',
type: SearchRecordType.PAGE,
keywords: ['unstake'],
description: 'Unstake tokens',
description: m.common_unstake_action(),
url: '/staking/unstake'
},
{
value: 'Resources',
type: SearchRecordType.PAGE,
keywords: ['resources', 'cpu', 'net', 'powerup'],
description: 'Manage CPU/NET',
description: m.common_resources_action(),
url: '/resources'
},
{
value: 'Clear',
type: SearchRecordType.CLEAR,
description: 'Clear search history',
description: m.search_result_description_clear(),
keywords: ['clear', 'history'],
url: ''
}
Expand Down Expand Up @@ -147,7 +148,7 @@ export function searchAccounts(
.filter((s) => String(s.actor).includes(query.trim().toLowerCase()))
.map((s) => ({
data: s,
description: `Switch Account`,
description: m.common_switch_account(),
type: SearchRecordType.SWITCH,
value: `${s.actor}@${s.permission}`,
url: `/${network}/account/${s.actor}`
Expand Down
Loading

0 comments on commit 78ec215

Please sign in to comment.