-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* i18n string cleanups * i18n app with I18N intro
- Loading branch information
Showing
86 changed files
with
2,670 additions
and
3,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# I18N | ||
|
||
The apps UI allows all strings to be translated. Additionally it has a basic UI that allows for the creation of the required translation files, which will give an overview on the progress for a specific language. | ||
|
||
## Updating translations | ||
|
||
To update translations, the following process is required. | ||
|
||
- launch the apps UI, either locally or via [https://polkadot.js.org/apps](https://polkadot.js.org/apps) | ||
- explicitly navigate to the i18n page, [https://polkadot.js.org/apps/#/i18n](https://polkadot.js.org/apps/#/i18n) | ||
|
||
Here you will find a dropdown of all the available languages and all the modules that maps to the UI. On a single screen you will be able to see all the available strings for a specific module. | ||
|
||
- adjust any strings as required | ||
- once completed with the changes, click the `Generate translation.json` button to download the translation file | ||
- this file can now be added to the repo with a PR to [https://github.com/polkadot-js/apps/tree/master/packages/apps/public/locales](https://github.com/polkadot-js/apps/tree/master/packages/apps/public/locales) | ||
|
||
## Adding a new language | ||
|
||
The process is similar for the above, but does require a new folder with the language identifier to be added, with an empty `translation.json` (containing only `{}`) & `index.json` file (containing only `[]`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2017-2020 @polkadot/apps-routing authors & contributors | ||
// This software may be modified and distributed under the terms | ||
// of the Apache-2.0 license. See the LICENSE file for details. | ||
|
||
import { Route } from './types'; | ||
|
||
import Translator from '@polkadot/app-i18n'; | ||
|
||
export default function create (t: (key: string, text: string, options: { ns: string }) => string): Route { | ||
return { | ||
Component: Translator, | ||
display: { | ||
isHidden: true | ||
}, | ||
icon: 'th', | ||
name: 'i18n', | ||
text: t('nav.i18n', 'I18n Translator', { ns: 'apps-routing' }) | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"Your Ethereum account": "Your Ethereum account", | ||
"has a valid claim for": "has a valid claim for", | ||
"does not appear to have a valid claim. Please double check that you have signed the transaction correctly on the correct ETH account.": "does not appear to have a valid claim. Please double check that you have signed the transaction correctly on the correct ETH account.", | ||
"Redeem": "Redeem", | ||
"1. Select your {{chain}} account": "1. Select your {{chain}} account", | ||
"2. Sign ETH transaction": "2. Sign ETH transaction", | ||
"Confirm claim": "Confirm claim", | ||
"Continue": "Continue", | ||
"Copy the above string and sign an Ethereum transaction with the account you used during the pre-sale in the wallet of your choice, using the string as the payload, and then paste the transaction signature object below": "Copy the above string and sign an Ethereum transaction with the account you used during the pre-sale in the wallet of your choice, using the string as the payload, and then paste the transaction signature object below", | ||
"Redeem": "Redeem", | ||
"The account you want to claim to.": "The account you want to claim to.", | ||
"Your Ethereum account": "Your Ethereum account", | ||
"claim to account": "claim to account", | ||
"Continue": "Continue", | ||
"2. Sign ETH transaction": "2. Sign ETH transaction", | ||
"copied": "copied", | ||
"click to copy": "click to copy", | ||
"Copy the above string and sign an Ethereum transaction with the account you used during the pre-sale in the wallet of your choice, using the string as the payload, and then paste the transaction signature object below": "Copy the above string and sign an Ethereum transaction with the account you used during the pre-sale in the wallet of your choice, using the string as the payload, and then paste the transaction signature object below", | ||
"Confirm claim": "Confirm claim" | ||
} | ||
"copied": "copied", | ||
"does not appear to have a valid claim. Please double check that you have signed the transaction correctly on the correct ETH account.": "does not appear to have a valid claim. Please double check that you have signed the transaction correctly on the correct ETH account.", | ||
"has a valid claim for": "has a valid claim for" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,69 @@ | ||
{ | ||
"You are using an ABI with an outdated format. Please generate a new one.": "You are using an ABI with an outdated format. Please generate a new one.", | ||
"invalid ABI file selected": "invalid ABI file selected", | ||
"click to select or drag and drop a JSON ABI file": "click to select or drag and drop a JSON ABI file", | ||
"The code hash for the on-chain deployed code.": "The code hash for the on-chain deployed code.", | ||
"code hash": "code hash", | ||
"Save": "Save", | ||
"Add an existing code hash": "Add an existing code hash", | ||
"A deployed contract that has either been deployed or attached. The address and ABI are used to construct the parameters.": "A deployed contract that has either been deployed or attached. The address and ABI are used to construct the parameters.", | ||
"ABI": "ABI", | ||
"Forget this code hash": "Forget this code hash", | ||
"deploy": "deploy", | ||
"Deploy this code hash as a smart contract": "Deploy this code hash as a smart contract", | ||
"You are about to remove this code from your list of available code hashes. Once completed, should you need to access it again, you will have to manually add the code hash again.": "You are about to remove this code from your list of available code hashes. Once completed, should you need to access it again, you will have to manually add the code hash again.", | ||
"This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.": "This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.", | ||
"Upload WASM": "Upload WASM", | ||
"No code hashes available": "No code hashes available", | ||
"The compiled WASM for the contract that you wish to deploy. Each unique code blob will be attached with a code hash that can be used to create new instances.": "The compiled WASM for the contract that you wish to deploy. Each unique code blob will be attached with a code hash that can be used to create new instances.", | ||
"compiled contract WASM": "compiled contract WASM", | ||
"The code is not recognized as being in valid WASM format": "The code is not recognized as being in valid WASM format", | ||
"Upload": "Upload", | ||
"Unable to find on-chain WASM code for the supplied codeHash": "Unable to find on-chain WASM code for the supplied codeHash", | ||
"The codeHash is not a valid hex hash": "The codeHash is not a valid hex hash", | ||
"The address for the deployed contract instance.": "The address for the deployed contract instance.", | ||
"contract address": "contract address", | ||
"Add an existing code hash": "Add an existing code hash", | ||
"Add an existing contract": "Add an existing contract", | ||
"Call a contract": "Call a contract", | ||
"Specify the user account to use for this contract call. And fees will be deducted from this account.": "Specify the user account to use for this contract call. And fees will be deducted from this account.", | ||
"call from account": "call from account", | ||
"A deployed contract that has either been deployed or attached. The address and ABI are used to construct the parameters.": "A deployed contract that has either been deployed or attached. The address and ABI are used to construct the parameters.", | ||
"contract to use": "contract to use", | ||
"The message to send to this contract. Parameters are adjusted based on the ABI provided.": "The message to send to this contract. Parameters are adjusted based on the ABI provided.", | ||
"message to send": "message to send", | ||
"The allotted value for this contract, i.e. the amount transferred to the contract as part of this call.": "The allotted value for this contract, i.e. the amount transferred to the contract as part of this call.", | ||
"value": "value", | ||
"The maximum amount of gas that can be used by this call. If the code requires more, the call will fail.": "The maximum amount of gas that can be used by this call. If the code requires more, the call will fail.", | ||
"maximum gas allowed": "maximum gas allowed", | ||
"send as RPC call": "send as RPC call", | ||
"send as transaction": "send as transaction", | ||
"Call": "Call", | ||
"Call a contract": "Call a contract", | ||
"Call a method on this contract": "Call a method on this contract", | ||
"Call results": "Call results", | ||
"Call this message": "Call this message", | ||
"Clear all": "Clear all", | ||
"address forgotten": "address forgotten", | ||
"Confirm ABI removal": "Confirm ABI removal", | ||
"Deploy": "Deploy", | ||
"Deploy a code hash": "Deploy a code hash", | ||
"Deploy this code hash as a smart contract": "Deploy this code hash as a smart contract", | ||
"Deploy with this constructor": "Deploy with this constructor", | ||
"Forget this code hash": "Forget this code hash", | ||
"Forget this contract": "Forget this contract", | ||
"execute": "execute", | ||
"Call a method on this contract": "Call a method on this contract", | ||
"Messages": "Messages", | ||
"Deploy a code hash": "Deploy a code hash", | ||
"Mutates contract state": "Mutates contract state", | ||
"No code hashes available": "No code hashes available", | ||
"No contracts available": "No contracts available", | ||
"Unable to find deployed contract code at the specified address": "Unable to find deployed contract code at the specified address", | ||
"The value is not in a valid address format": "The value is not in a valid address format", | ||
"The contract WASM previously deployed. Internally this is identified by the hash of the code, as either created or attached.": "The contract WASM previously deployed. Internally this is identified by the hash of the code, as either created or attached.", | ||
"code for this contract": "code for this contract", | ||
"The deployment constructor information for this contract, as provided by the ABI.": "The deployment constructor information for this contract, as provided by the ABI.", | ||
"The allotted endowment for this contract, i.e. the amount transferred to the contract upon instantiation.": "The allotted endowment for this contract, i.e. the amount transferred to the contract upon instantiation.", | ||
"endowment": "endowment", | ||
"Deploy": "Deploy", | ||
"No documentation provided": "No documentation provided", | ||
"Call this message": "Call this message", | ||
"Deploy with this constructor": "Deploy with this constructor", | ||
"Remove": "Remove", | ||
"Remove ABI": "Remove ABI", | ||
"Mutates contract state": "Mutates contract state", | ||
"Save": "Save", | ||
"Specify the user account to use for this contract call. And fees will be deducted from this account.": "Specify the user account to use for this contract call. And fees will be deducted from this account.", | ||
"Specify the user account to use for this deployment. And fees will be deducted from this account.": "Specify the user account to use for this deployment. And fees will be deducted from this account.", | ||
"deployment account": "deployment account", | ||
"The address for the deployed contract instance.": "The address for the deployed contract instance.", | ||
"The allotted endowment for this contract, i.e. the amount transferred to the contract upon instantiation.": "The allotted endowment for this contract, i.e. the amount transferred to the contract upon instantiation.", | ||
"The allotted value for this contract, i.e. the amount transferred to the contract as part of this call.": "The allotted value for this contract, i.e. the amount transferred to the contract as part of this call.", | ||
"The code hash for the on-chain deployed code.": "The code hash for the on-chain deployed code.", | ||
"The code is not recognized as being in valid WASM format": "The code is not recognized as being in valid WASM format", | ||
"The codeHash is not a valid hex hash": "The codeHash is not a valid hex hash", | ||
"The compiled WASM for the contract that you wish to deploy. Each unique code blob will be attached with a code hash that can be used to create new instances.": "The compiled WASM for the contract that you wish to deploy. Each unique code blob will be attached with a code hash that can be used to create new instances.", | ||
"The contract WASM previously deployed. Internally this is identified by the hash of the code, as either created or attached.": "The contract WASM previously deployed. Internally this is identified by the hash of the code, as either created or attached.", | ||
"The deployment constructor information for this contract, as provided by the ABI.": "The deployment constructor information for this contract, as provided by the ABI.", | ||
"The maximum amount of gas that can be used by this call. If the code requires more, the call will fail.": "The maximum amount of gas that can be used by this call. If the code requires more, the call will fail.", | ||
"The maximum amount of gas that can be used by this deployment, if the code requires more, the deployment will fail.": "The maximum amount of gas that can be used by this deployment, if the code requires more, the deployment will fail.", | ||
"Confirm ABI removal": "Confirm ABI removal", | ||
"You are about to remove this code's ABI. Once completed, should you need to access it again, you will have to manually re-upload it.": "You are about to remove this code's ABI. Once completed, should you need to access it again, you will have to manually re-upload it.", | ||
"The message to send to this contract. Parameters are adjusted based on the ABI provided.": "The message to send to this contract. Parameters are adjusted based on the ABI provided.", | ||
"The value is not in a valid address format": "The value is not in a valid address format", | ||
"This operation does not impact the associated on-chain code or any of its contracts.": "This operation does not impact the associated on-chain code or any of its contracts.", | ||
"Remove": "Remove" | ||
} | ||
"This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.": "This operation does not remove the uploaded code WASM and ABI from the chain, nor any deployed contracts. The forget operation only limits your access to the code on this browser.", | ||
"Unable to find deployed contract code at the specified address": "Unable to find deployed contract code at the specified address", | ||
"Unable to find on-chain WASM code for the supplied codeHash": "Unable to find on-chain WASM code for the supplied codeHash", | ||
"Upload": "Upload", | ||
"Upload WASM": "Upload WASM", | ||
"You are about to remove this code from your list of available code hashes. Once completed, should you need to access it again, you will have to manually add the code hash again.": "You are about to remove this code from your list of available code hashes. Once completed, should you need to access it again, you will have to manually add the code hash again.", | ||
"You are about to remove this code's ABI. Once completed, should you need to access it again, you will have to manually re-upload it.": "You are about to remove this code's ABI. Once completed, should you need to access it again, you will have to manually re-upload it.", | ||
"You are using an ABI with an outdated format. Please generate a new one.": "You are using an ABI with an outdated format. Please generate a new one.", | ||
"address forgotten": "address forgotten", | ||
"call from account": "call from account", | ||
"click to select or drag and drop a JSON ABI file": "click to select or drag and drop a JSON ABI file", | ||
"code for this contract": "code for this contract", | ||
"code hash": "code hash", | ||
"compiled contract WASM": "compiled contract WASM", | ||
"contract address": "contract address", | ||
"contract to use": "contract to use", | ||
"deploy": "deploy", | ||
"deployment account": "deployment account", | ||
"endowment": "endowment", | ||
"execute": "execute", | ||
"invalid ABI file selected": "invalid ABI file selected", | ||
"maximum gas allowed": "maximum gas allowed", | ||
"message to send": "message to send", | ||
"send as RPC call": "send as RPC call", | ||
"send as transaction": "send as transaction", | ||
"value": "value" | ||
} |
Oops, something went wrong.