diff --git a/i18next-scanner.config.js b/i18next-scanner.config.js index fedbd1b1a480..eea325d2bcd1 100644 --- a/i18next-scanner.config.js +++ b/i18next-scanner.config.js @@ -40,6 +40,7 @@ module.exports = { 'app-staking', 'app-storage', 'app-sudo', + 'app-tech-comm', 'app-toolbox', 'app-transfer', 'app-treasury', diff --git a/packages/app-tech-comm/src/index.tsx b/packages/app-tech-comm/src/index.tsx index a2f5474250d1..b9cdf0e32c8d 100644 --- a/packages/app-tech-comm/src/index.tsx +++ b/packages/app-tech-comm/src/index.tsx @@ -36,7 +36,7 @@ function TechCommApp ({ basePath, className, t }: Props): React.ReactElement diff --git a/packages/apps/public/locales/en/app-tech-comm.json b/packages/apps/public/locales/en/app-tech-comm.json index 0967ef424bce..42cbf274fa1c 100644 --- a/packages/apps/public/locales/en/app-tech-comm.json +++ b/packages/apps/public/locales/en/app-tech-comm.json @@ -1 +1,19 @@ -{} +{ + "Tech. committee": "Tech. committee", + "Proposals ({{count}})": "Proposals ({{count}})", + "No members found": "No members found", + "members": "members", + "proposals": "proposals", + "total": "total", + "Submit proposal": "Submit proposal", + "No committee proposals": "No committee proposals", + "threshold": "threshold", + "Aye": "Aye", + "Nay": "Nay", + "Propose a committee motion": "Propose a committee motion", + "The minimum number of committee votes required to approve this motion": "The minimum number of committee votes required to approve this motion", + "Positive number between 1 and {{memberCount}}": "Positive number between 1 and {{memberCount}}", + "proposal": "proposal", + "Vote on proposal": "Vote on proposal", + "Vote": "Vote" +} diff --git a/packages/apps/public/locales/en/apps.json b/packages/apps/public/locales/en/apps.json index 16d99fec131b..ac37067a7aef 100644 --- a/packages/apps/public/locales/en/apps.json +++ b/packages/apps/public/locales/en/apps.json @@ -8,5 +8,8 @@ "Waiting for authorization from the extension. Please open the installed extension and approve or reject access.": "Waiting for authorization from the extension. Please open the installed extension and approve or reject access.", "You are not connected to a node. Ensure that your node is running and that the Websocket endpoint is reachable.": "You are not connected to a node. Ensure that your node is running and that the Websocket endpoint is reachable.", "With the Firefox browser connecting to insecure WebSockets ({{wsUrl}}) will fail due to the browser not allowing localhost access from a secure site.": "With the Firefox browser connecting to insecure WebSockets ({{wsUrl}}) will fail due to the browser not allowing localhost access from a secure site.", - "You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint.": "You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint." + "You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint.": "You are connecting from a secure location to an insecure WebSocket ({{wsUrl}}). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint.", + "version {{version}}": "version {{version}}", + "GitHub": "GitHub", + "Wiki": "Wiki" } diff --git a/packages/apps/public/locales/en/ui.json b/packages/apps/public/locales/en/ui.json index 10af4ccd95bd..f783d2d07a10 100644 --- a/packages/apps/public/locales/en/ui.json +++ b/packages/apps/public/locales/en/ui.json @@ -775,5 +775,8 @@ "The unapplied slashed era to cancel.": "", "the era to cancel for": "", "no unapplied slashes found": "", - "Revert": "" + "Revert": "", + "version {{version}}": "", + "GitHub": "", + "Wiki": "" } diff --git a/packages/apps/src/SideBar/index.tsx b/packages/apps/src/SideBar/index.tsx index cb42939187be..d367d98de155 100644 --- a/packages/apps/src/SideBar/index.tsx +++ b/packages/apps/src/SideBar/index.tsx @@ -3,7 +3,6 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { RuntimeVersion } from '@polkadot/types/interfaces'; -import { I18nProps } from '@polkadot/react-components/types'; import { SIDEBAR_MENU_THRESHOLD } from '../constants'; import './SideBar.css'; @@ -17,12 +16,12 @@ import { useCall, useApi } from '@polkadot/react-hooks'; import { classes } from '@polkadot/react-components/util'; import { BestNumber, Chain } from '@polkadot/react-query'; -import translate from '../translate'; +import { useTranslation } from '../translate'; import Item from './Item'; import NodeInfo from './NodeInfo'; import NetworkModal from '../modals/Network'; -interface Props extends I18nProps { +interface Props { className?: string; collapse: () => void; handleResize: () => void; @@ -32,6 +31,7 @@ interface Props extends I18nProps { } function SideBar ({ className, collapse, handleResize, isCollapsed, toggleMenu, menuOpen }: Props): React.ReactElement { + const { t } = useTranslation(); const { api } = useApi(); const runtimeVersion = useCall(api.rpc.state.subscribeRuntimeVersion, []); const [modals, setModals] = useState>( @@ -85,7 +85,7 @@ function SideBar ({ className, collapse, handleResize, isCollapsed, toggleMenu,
{runtimeVersion && ( -
版本 {runtimeVersion.specVersion.toNumber()}
+
{t('version {{version}}', { replace: { version: runtimeVersion.specVersion.toNumber() } })}
)}
@@ -119,7 +119,7 @@ function SideBar ({ className, collapse, handleResize, isCollapsed, toggleMenu, rel='noopener noreferrer' target='_blank' > - GitHub + {t('GitHub')} @@ -129,7 +129,7 @@ function SideBar ({ className, collapse, handleResize, isCollapsed, toggleMenu, rel='noopener noreferrer' target='_blank' > - Wiki + {t('Wiki')}