Skip to content

Commit

Permalink
feat: Spanish functionality & English corrections (#2422)
Browse files Browse the repository at this point in the history
Co-authored-by: Ross Bulat <[email protected]>
  • Loading branch information
joeljkrb and rossbulat authored Jan 12, 2025
1 parent 8fffb89 commit 46cde96
Show file tree
Hide file tree
Showing 12 changed files with 1,383 additions and 13 deletions.
3 changes: 2 additions & 1 deletion packages/locales/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2024 @polkadot-cloud/polkadot-staking-dashboard authors & contributors
// SPDX-License-Identifier: GPL-3.0-only

import { enGB, zhCN } from 'date-fns/locale'
import { enGB, es, zhCN } from 'date-fns/locale'
import i18next from 'i18next'
import { initReactI18next } from 'react-i18next'
import baseEn from './resources/en/base.json'
Expand All @@ -20,6 +20,7 @@ export const DefaultLocale = 'en'
export const locales: Record<string, LocaleEntry> = {
en: { dateFormat: enGB, label: 'English' },
cn: { dateFormat: zhCN, label: '中文' },
es: { dateFormat: es, label: 'Español' },
}

// Supported namespaces.
Expand Down
2 changes: 1 addition & 1 deletion packages/locales/src/resources/en/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
"Pool Commission Change Rate",
[
"The commission change rate is set by the pool Root, and dictates by how much and how often commission can be increased.",
"The maximum increase of the change rate dictates how much the commission rate can be increaesd in a single update. The minimum delay dictates how many blocks must pass before the commission rate can be increased again.",
"The maximum increase of the change rate dictates how much the commission rate can be increased in a single update. The minimum delay dictates how many blocks must pass before the commission rate can be increased again.",
"Once an initial change rate is set, only more restrictive values can be set thereafter. More restrictive values comprise of a smaller max increase and larger minimum delay."
]
],
Expand Down
4 changes: 2 additions & 2 deletions packages/locales/src/resources/en/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"noFilters": "No filters",
"noFree": "You have no free {{unit}} to bond.",
"noMatch": "No pools match this criteria.",
"noPayoutAddress": "No Payout Adddress",
"noPayoutAddress": "No Payout Address",
"noValidators": "No validators.",
"noValidatorsMatch": "No validators match this criteria.",
"nominate": "Nominate",
Expand All @@ -150,7 +150,7 @@
"page": "Page {{page}} of {{total}}",
"payout": "Payout",
"payoutAccount": "Payout Account",
"payoutAddress": "Payout Adddress",
"payoutAddress": "Payout Address",
"pending": "Pending",
"permissioned": "Permissioned",
"permissionedSubtitle": "Only you can claim rewards.",
Expand Down
8 changes: 4 additions & 4 deletions packages/locales/src/resources/en/modals.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"chooseLanguage": "Choose Language",
"claim": "Claim",
"claimCommission": "Claim Commission",
"claimOutstandingCommission": " Claim any outstanding commission in the pool reward account.",
"claimOutstandingCommission": "Claim any outstanding commission in the pool reward account.",
"claimPayouts": "Claim Payouts",
"claimReward1": "Once submitted, your rewards will be bonded back into the pool. You own these additional bonded funds and will be able to withdraw them at any time.",
"claimReward2": "Withdrawing rewards will immediately transfer them to your account as free balance.",
Expand All @@ -68,7 +68,7 @@
"declared": "Declared",
"destroyIrreversible": "Destroying a Pool is Irreversible",
"destroyPool": "Destroy Pool",
"destroyPoolResult": " Once you Destroy the pool, all members can be permissionlessly unbonded, and the pool can never be reopened.",
"destroyPoolResult": "Once you Destroy the pool, all members can be permissionlessly unbonded, and the pool can never be reopened.",
"developerTools": "Developer Tools",
"differentNetworkAddress": "Different Network Address",
"disconnect": "Disconnect",
Expand Down Expand Up @@ -132,7 +132,7 @@
"ledgerAccountImported": "Ledger Account Imported",
"ledgerAccountRemoved": "Ledger Account Removed",
"ledgerAccounts_one": "Displaying {{count}} Ledger Account",
"ledgerAccounts_other": " Displaying {{count}} Ledger Accounts",
"ledgerAccounts_other": "Displaying {{count}} Ledger Accounts",
"ledgerDeviceBusy": "The Ledger device is currently being used for something else.",
"ledgerFetchedAccount": "Fetched Ledger Account {{account}}",
"ledgerImportedAccount": "Imported Ledger Account {{account}}",
Expand Down Expand Up @@ -192,7 +192,7 @@
"pendingPayout_other": "{{count}} Pending Payouts",
"polkawatchDisabled": "Polkawatch Disabled",
"pool": "Pool",
"poolAddress": " Pool {{type}} Address",
"poolAddress": "Pool {{type}} Address",
"poolIsNotNominating": "Pool is Not Nominating.",
"poolMembers": "Pool Members",
"poolName": "Pool Name",
Expand Down
4 changes: 2 additions & 2 deletions packages/locales/src/resources/en/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"available": "Available",
"averageRewardRate": "Average Reward Rate",
"balance": "Balance",
"bondedInPools": "The total {{networkUnit}} currently bonded in nomination pools.",
"bondedInPools": "The total {{networkUnit}} currently bonded in nomination pools.",
"connect": "Connect",
"free": "Free",
"inPool": "In a Pool",
Expand Down Expand Up @@ -199,7 +199,7 @@
"ownerOfPool": "Owner of Pool",
"permissionToUnbond": "You have permission to unbond and withdraw funds of any pool member. Use a member's menu",
"poolCommission": "Pool Commission",
"poolCreator": " As the pool creator, you will consume your pool's <b>Depositor</b> role.",
"poolCreator": "As the pool creator, you will consume your pool's <b>Depositor</b> role.",
"poolCurrentlyLocked": "Pool Currently Locked",
"poolInDestroyingState": "Pool in Destroying State",
"poolMembers": "Pool Members",
Expand Down
6 changes: 3 additions & 3 deletions packages/locales/src/resources/en/tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Connect your accounts to begin using Polkadot Staking Dashboard.",
"Accounts are accessed via web extensions, that act as wallets. Your wallet is used to sign transactions that you submit within the dashboard.",
"Connect your wallets from the Connect button at the top right of the dashboard, and select the account you wish to stake with to continue.",
"Staking dashboard supports a range of extensions and wallets."
"Staking Dashboard supports a range of extensions and wallets."
]
],
"howToStake": [
Expand Down Expand Up @@ -60,7 +60,7 @@
},
"monitoringPool": [
"Managing Pool Membership",
"It's a good idea to check regularly whether your pool is actively earning rewards.",
"It's a good idea to check regularly whether your pool is actively earning rewards.",
[
"Pools will manage nominations on your behalf, but it is still a good idea to check regularly whether your pool is actively earning rewards.",
"Monitor your pool's status to ensure that it is performing well regularly, and consider joining another pool if you are not receiving any rewards."
Expand Down Expand Up @@ -95,7 +95,7 @@
"Various factors affect how much validators are rewarded.",
[
"Various factors affect how much validators are rewarded, such as the amount of era points it generates and how many nominators are backing it.",
"All these metrics change over time, sometimes in an unpredictable manner.It is therefore important that nominators actively monitor validators and their performance.",
"All these metrics change over time, sometimes in an unpredictable manner. It is therefore important that nominators actively monitor validators and their performance.",
"Staking dashboard provides a range of metrics to help you understand how a validator is performing."
]
]
Expand Down
56 changes: 56 additions & 0 deletions packages/locales/src/resources/es/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"base": {
"active": "Activo",
"community": "Comunidad",
"decentralization": "Descentralización",
"email": "Correo",
"goTo": "Ir a",
"help": "Ayuda",
"inactive": "Inactivo",
"network": "Red",
"nominate": "Nominar",
"offline": "La conexión parece estar desconectada",
"overview": "Resumen",
"payee": {
"account": {
"subtitle": "Enviar pagos a otra cuenta como saldo disponible.",
"title": "A Otra Cuenta"
},
"none": {
"subtitle": "No tiene configurado ningún destino de pago.",
"title_active": "No Asignado",
"title_default": "Ninguno"
},
"staked": {
"subtitle": "Agregar pagos automáticamente a su saldo apostado existente.",
"title_active": "Capitalización",
"title_default": "Capitalizar"
},
"stash": {
"subtitle": "Los pagos se envían a su cuenta como saldo disponible.",
"title": "A Su Cuenta"
}
},
"payouts": "Pagos",
"pools": "Pools",
"resources": "Recursos",
"stake": "Stakear",
"support": "Soporte",
"time": {
"day_one": "día",
"day_other": "días",
"hour_one": "hora",
"hour_other": "horas",
"hr_one": "hr",
"hr_other": "hrs",
"min_one": "min",
"min_other": "mins",
"minute_one": "minuto",
"minute_other": "minutos",
"second_one": "segundo",
"second_other": "segundos"
},
"title": "Polkadot Staking Dashboard",
"validators": "Validadores"
}
}
Loading

0 comments on commit 46cde96

Please sign in to comment.