feat: readme update
Added additional Docusaurus i18n command.
Put all localization commands within code blocks.
Removed autogen Docusaurus readme.
(cherry picked from commit 7ac5129cee)
This commit is contained in:
parent
7000dddc87
commit
16cea44990
2 changed files with 15 additions and 46 deletions
20
README.md
20
README.md
|
|
@ -18,19 +18,29 @@ Key files for localization are:
|
||||||
### Locale commands
|
### Locale commands
|
||||||
|
|
||||||
To update translation key values:
|
To update translation key values:
|
||||||
npm run write-translations -- --locale <locale>
|
|
||||||
|
`npm run write-translations -- --locale <locale>`
|
||||||
|
|
||||||
|
By default, write-translate only appends new values. To also update existing values:
|
||||||
|
- Note this will overwrite **all** JSON stored translations to English.
|
||||||
|
|
||||||
|
`docusaurus write-translations --locale <locale> --overrride`
|
||||||
|
|
||||||
To updated po4a consolidated .pot and .po files from English markdown files (with po4a tool installed):
|
To updated po4a consolidated .pot and .po files from English markdown files (with po4a tool installed):
|
||||||
po4a po4a.conf --no-translations
|
|
||||||
|
`po4a po4a.conf --no-translations`
|
||||||
|
|
||||||
To update localization markdown files from po4a consolidated .po files (with po4a tool installed):
|
To update localization markdown files from po4a consolidated .po files (with po4a tool installed):
|
||||||
po4a po4a.conf --no-update
|
|
||||||
|
`po4a po4a.conf --no-update`
|
||||||
|
|
||||||
To run the site in a specific locale:
|
To run the site in a specific locale:
|
||||||
npm run start -- --locale <locale>
|
|
||||||
|
`npm run start -- --locale <locale>`
|
||||||
|
|
||||||
To build the static site for all locales:
|
To build the static site for all locales:
|
||||||
npm run build
|
|
||||||
|
`npm run build`
|
||||||
|
|
||||||
### Localization mapping
|
### Localization mapping
|
||||||
|
|
||||||
|
|
|
||||||
41
README2.md
41
README2.md
|
|
@ -1,41 +0,0 @@
|
||||||
# Website
|
|
||||||
|
|
||||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn
|
|
||||||
```
|
|
||||||
|
|
||||||
## Local Development
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn start
|
|
||||||
```
|
|
||||||
|
|
||||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
|
|
||||||
Using SSH:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
USE_SSH=true yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
Not using SSH:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GIT_USER=<Your GitHub username> yarn deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue