feat: docs i18n support (continuation from #14818) (#17190)

* Initial commit for i18n support

* Bring out index page

* Lint
	modified:   src/pages/index.js

* More Crowdin ephemera

* copy src content to i18n/**/docusaurus-plugin-content-docs/current folders

* run write-translations

* remove superflous files in i18n

* fix formatting

* remove icons folders from translations, add ja, pt, vi translations

* fix formatting

* update translation JSON files

* add crowdin support & crowdin:sync command, sync with crowdin

* exclude failing locales

* remove i18n from git cache, add write-heading-ids script

* add crowdin:sync to before_install.sh script

* add write-i18m shortening script & crowdin:download script (also to before_install.sh)

* move crowdin:download from before_install.sh to prebuild hook

* remove prebuild hook

* remove crowdin script, bump deps

* re-add cli/usage

* update package-lock.json

* add translation sync to build.sh for master

* update README

* add ja to localesNotBuilding, write e-ids

* fix formatting

* get on sync with master

* replace check for master branch

* change build script to work on travis

* use refs instead of names

* fix build.sh

* replace head ref check with channel check

* get stable channel in build.sh

* remove zip

* remove header ids

Co-authored-by: rmshea <8948187+rmshea@users.noreply.github.com>
This commit is contained in:
Tim Hagn
2021-05-28 06:21:37 +02:00
committed by GitHub
parent e833d2ba5b
commit 53c91ee89e
171 changed files with 15824 additions and 26701 deletions

View File

@ -1,38 +1,45 @@
---
title: Solana Test Validator
---
During early stage development, it is often convenient to target a cluster with
fewer restrictions and more configuration options than the public offerings
provide. This is easily achieved with the `solana-test-validator` binary, which
starts a full-featured, single-node cluster on the developer's workstation.
## Advantages
- No RPC rate-limits
- No airdrop limits
- Direct [on-chain program](on-chain-programs/overview) deployment
(`--bpf-program ...`)
(`--bpf-program ...`)
- Clone accounts from a public cluster, including programs (`--clone ...`)
- Configurable transaction history retention (`--limit-ledger-size ...`)
- Configurable epoch length (`--slots-per-epoch ...`)
- Jump to an arbitrary slot (`--warp-slot ...`)
## Installation
The `solana-test-validator` binary ships with the Solana CLI Tool Suite.
[Install](/cli/install-solana-cli-tools) before continuing.
## Running
First take a look at the configuration options
```
solana-test-validator --help
```
Next start the test validator
```
solana-test-validator
```
By default, basic status information is printed while the process is running.
See [Appendix I](#appendix-i-status-output) for details
```
Ledger location: test-ledger
Log: test-ledger/validator.log
@ -50,80 +57,96 @@ Leave `solana-test-validator` running in its own terminal. When it is no longer
needed, it can be stopped with ctrl-c.
## Interacting
Open a new terminal to interact with a [running](#running) `solana-test-validator`
instance using other binaries from the Solana CLI Tool Suite or your own client
software.
#### Configure the CLI Tool Suite to target a local cluster by default
```
solana config set --url http://127.0.0.1:8899
```
#### Verify the CLI Tool Suite configuration
```
solana genesis-hash
```
* **NOTE:** The result should match the `Genesis Hash:` field in the
`solana-test-validator` status output
- **NOTE:** The result should match the `Genesis Hash:` field in the
`solana-test-validator` status output
#### Check the wallet balance
```
solana balance
```
* **NOTE:** `Error: No such file or directory (os error 2)` means that the default
wallet does not yet exist. Create it with `solana-keygen new`.
* **NOTE:** If the wallet has a zero SOL balance, airdrop some localnet SOL with
`solana airdrop 10`
- **NOTE:** `Error: No such file or directory (os error 2)` means that the default
wallet does not yet exist. Create it with `solana-keygen new`.
- **NOTE:** If the wallet has a zero SOL balance, airdrop some localnet SOL with
`solana airdrop 10`
#### Perform a basic transfer transaction
```
solana transfer EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8 1
```
#### Monitor `msg!()` output from on-chain programs
```
solana logs
```
* **NOTE:** This command needs to be running when the target transaction is
executed. Run it in its own terminal
- **NOTE:** This command needs to be running when the target transaction is
executed. Run it in its own terminal
## Appendix I: Status Output
```
Ledger location: test-ledger
```
* File path of the ledger storage directory. This directory can get large. Store
less transaction history with `--limit-ledger-size ...` or relocate it with
`--ledger ...`
- File path of the ledger storage directory. This directory can get large. Store
less transaction history with `--limit-ledger-size ...` or relocate it with
`--ledger ...`
```
Log: test-ledger/validator.log
```
* File path of the validator text log file. The log can also be streamed by
passing `--log`. Status output is suppressed in this case.
- File path of the validator text log file. The log can also be streamed by
passing `--log`. Status output is suppressed in this case.
```
Identity: EPhgPANa5Rh2wa4V2jxt7YbtWa3Uyw4sTeZ13cQjDDB8
```
* The validator's identity in the [gossip network](/validator/gossip#gossip-overview)
- The validator's identity in the [gossip network](/validator/gossip#gossip-overview)
```
Version: 1.6.7
```
* The software version
- The software version
```
Gossip Address: 127.0.0.1:1024
TPU Address: 127.0.0.1:1027
JSON RPC URL: http://127.0.0.1:8899
```
* The network address of the [Gossip](/validator/gossip#gossip-overview),
[Transaction Processing Unit](/validator/tpu) and [JSON RPC](clients/jsonrpc-api#json-rpc-api-reference)
service, respectively
- The network address of the [Gossip](/validator/gossip#gossip-overview),
[Transaction Processing Unit](/validator/tpu) and [JSON RPC](clients/jsonrpc-api#json-rpc-api-reference)
service, respectively
```
⠈ 00:36:02 | Processed Slot: 5142 | Confirmed Slot: 5142 | Finalized Slot: 5110 | Snapshot Slot: 5100 | Transactions: 5142 | ◎499.974295000
```
* Session running time, current slot of the the three block
[commitment levels](clients/jsonrpc-api#configuring-state-commitment),
slot height of the last snapshot, transaction count,
[voting authority](/running-validator/vote-accounts#vote-authority) balance
- Session running time, current slot of the the three block
[commitment levels](clients/jsonrpc-api#configuring-state-commitment),
slot height of the last snapshot, transaction count,
[voting authority](/running-validator/vote-accounts#vote-authority) balance

View File

@ -3,134 +3,155 @@ import clsx from "clsx";
import Layout from "@theme/Layout";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import useBaseUrl from "@docusaurus/useBaseUrl";
// import useBaseUrl from "@docusaurus/useBaseUrl";
import styles from "./styles.module.css";
const features = [
{
title: <> Start Building</>,
imageUrl: "developing/programming-model/overview",
description: (
<>Get started building your decentralized app or marketplace.</>
),
},
{
title: <>🎛 Run a Validator Node</>,
imageUrl: "running-validator",
description: (
<>Validate transactions, secure the network, and earn rewards.</>
),
},
{
title: <>🏛 Create an SPL Token</>,
imageUrl: "https://spl.solana.com/token",
description: <>Launch your own SPL Token, Solana's equivalent of ERC-20.</>,
},
{
title: <>🏦 Integrate an Exchange</>,
imageUrl: "integrations/exchange",
description: (
<>
Follow our extensive integration guide to ensure a seamless user
experience.
</>
),
},
{
title: <>📲 Manage a Wallet</>,
imageUrl: "wallet-guide",
description: (
<>Create a wallet, check your balance, and learn about wallet options.</>
),
},
{
title: <>🤯 Learn How Solana Works</>,
imageUrl: "cluster/overview",
description: <>Get a high-level understanding of Solana's architecture.</>,
}, //
// {
// title: <>Understand Our Economic Design</>,
// imageUrl: "implemented-proposals/ed_overview/ed_overview",
// description: (
// <>
// Solana's Economic Design provides a scalable blueprint for long term
// economic development and prosperity.
// </>
// ),
// }
];
function Feature({ imageUrl, title, description }) {
const imgUrl = useBaseUrl(imageUrl);
return (
<div className={clsx("col col--4", styles.feature)}>
{imgUrl && (
<Link className="navbar__link" to={imgUrl}>
<div className="card">
<div className="card__header">
<h3>{title}</h3>
</div>
<div className="card__body">
<p>{description}</p>
</div>
</div>
</Link>
)}
</div>
);
}
import Translate from "@docusaurus/Translate";
// import { translate } from "@docusaurus/Translate";
function Home() {
const context = useDocusaurusContext();
const { siteConfig = {} } = context;
return (
<Layout title="Homepage" description="Solana Documentation">
{/* <header className={clsx("hero hero--primary", styles.heroBanner)}> */}
{/* <div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p> */}
{/* <div className={styles.buttons}>
<Link
className={clsx(
'button button--outline button--secondary button--lg',
styles.getStarted,
)}
to={useBaseUrl('docs/')}>
Get Started
</Link>
</div> */}
{/* </div> */}
{/* </header> */}
<main>
{features && features.length > 0 && (
<section className={styles.features}>
<div className="container">
<div className="alert alert--primary" role="alert">
<b>Announcing the Solana Season Hackathon</b>
<br />
Jumpstart your next project on Solana & join the fastest growing
ecosystem in crypto
<br />
<p align="right">
<a
href="https://solana.com/solanaszn"
rel="noopener noreferrer"
target="_blank"
>
<button className="button button--outline button--secondary">
Register Now
</button>
</a>
</p>
<section className={styles.features}>
<div className="container">
<div className="row cards__container">
<div className={clsx("col col--4", styles.feature)}>
<Link
className="navbar__link"
to="developing/programming-model/overview"
>
<div className="card">
<div className="card__header">
<h3>
<Translate description="start-building">
Start Building
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="get-started-building">
Get started building your decentralized app or
marketplace.
</Translate>
</p>
</div>
</div>
</Link>
</div>
<div className="row cards__container">
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
<div className={clsx("col col--4", styles.feature)}>
<Link className="navbar__link" to="running-validator">
<div className="card">
<div className="card__header">
<h3>
<Translate description="run-validator">
🎛 Run a Validator Node
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="validate-transactions">
Validate transactions, secure the network, and earn
rewards.
</Translate>
</p>
</div>
</div>
</Link>
</div>
<div className={clsx("col col--4", styles.feature)}>
<Link
className="navbar__link"
to="https://spl.solana.com/token"
>
<div className="card">
<div className="card__header">
<h3>
<Translate description="create-spl">
🏛 Create an SPL Token
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="erc-20">
Launch your own SPL Token, Solana's equivalent of
ERC-20.
</Translate>
</p>
</div>
</div>
</Link>
</div>
<div className={clsx("col col--4", styles.feature)}>
<Link className="navbar__link" to="integrations/exchange">
<div className="card">
<div className="card__header">
<h3>
<Translate description="integrate-exchange">
🏦 Integrate an Exchange
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="integration-guide">
Follow our extensive integration guide to ensure a
seamless user experience.
</Translate>
</p>
</div>
</div>
</Link>
</div>
<div className={clsx("col col--4", styles.feature)}>
<Link className="navbar__link" to="wallet-guide">
<div className="card">
<div className="card__header">
<h3>
<Translate description="manage-wallet">
📲 Manage a Wallet
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="wallet-options">
Create a wallet, check your balance, and learn about
wallet options.
</Translate>
</p>
</div>
</div>
</Link>
</div>
<div className={clsx("col col--4", styles.feature)}>
<Link className="navbar__link" to="cluster/overview">
<div className="card">
<div className="card__header">
<h3>
<Translate description="learn-how">
🤯 Learn How Solana Works
</Translate>
</h3>
</div>
<div className="card__body">
<p>
<Translate description="high-level">
Get a high-level understanding of Solana's
architecture.
</Translate>
</p>
</div>
</div>
</Link>
</div>
</div>
</section>
)}
</div>
</section>
</main>
</Layout>
);

View File

@ -70,14 +70,14 @@ Staking operations are supported by the following wallet solutions:
Ledger Nano.
[Staking commands using the Solana Command Line Tools](cli/delegate-stake.md).
- [Exodus](https://www.exodus.com/) wallet. They make the process very simple,
but you cannot choose a validator: they assign you to their partner validator.
See their [FAQ](https://support.exodus.com/article/1551-solana-staking-faq)
for details.
- [Exodus](https://www.exodus.com/) wallet. They make the process very simple,
but you cannot choose a validator: they assign you to their partner validator.
See their [FAQ](https://support.exodus.com/article/1551-solana-staking-faq)
for details.
- [Binance](https://www.binance.com/) and [FTX](https://ftx.com/) exchanges.
Note that you cannot choose a validator with these services: they assign you
to their partner validator.
- [Binance](https://www.binance.com/) and [FTX](https://ftx.com/) exchanges.
Note that you cannot choose a validator with these services: they assign you
to their partner validator.
#### Create a Stake Account