Contribute
Pando documentation is open source. You are very welcomed to translate it into other languages to make it accessible to greater population!
#
PreparationPando documentation is based on Docusaurus, a static site generator for React.js.
- You need to ensure that you have Yarn installed
- Clone the repository of the document
- Run
yarn
in the root of the repo - Run
yarn start
to preview the documentation
#
Document StructureThe documentation is organized in the following way:
- all source is in the
docs
directory anddeveloper
directory - the
docs
directory contains the following subdirectories:lake
contains all the Pando Lake & 4swap documentationleaf
contains all the Pando Leaf documentationrings
contains all the Pando Rings documentationwallets
contains all documentation about wallets on Mixin Network3rd-party-apps
lists applications built on top of Pandosecurity
contains documentation concerning security issuescommunity
contains all the community documentation
- the
developer
directory contains the following subdirectories:lake
contains the dev documentation of Pando Lake and 4swapleaf
contains the dev documentation of Pando Leafrings
contains the dev documentation of Pando Ringsresources
contains the resources
- the sidebar of
docs
is defined insidebar.docs.js
, the sidebar ofdeveloper
is defined insidebar.developer.js
#
Translation#
Translate at CrowdinIf you're not familiar with Github and the i18n of Pando, we recommend you to use Crowdin to help us translate the docs.
- Tap here to sign-up an account of Crowdin
- Browse the translation status and progress at Pando's Page at Crwodin
- Get familiar with the Crowdin translation UI, as you will need to use it to translate JSON and Markdown files
info
Please note that all the code in the documentation should not be translated.
#
Initialize the Translation#
Generate new translation files for new languagesIf you're the maintainer of this project, please follow the instructions in the i18n tutorial to add a new language.
Translate the index page
Please follow the instructions here to translate your index page and react components.
Generate/Update json files
yarn run write-translations --locale $LANG_CODE
The $LANG_CODE
is the language code of the language you want to generate. For example, if you want to generate the translation files for the French language, you should use fr
.
The translation files are generated in the i18n/$LANG_CODE/
directory.
Generate Markdown files
Copy Markdown files in docs to i18n/$LANG_CODE/docusaurus-plugin-content-docs/current
, and translate them:
mkdir -p i18n/$LANG_CODE/docusaurus-plugin-content-docs/currentcp -r docs/** i18n/$LANG_CODE/docusaurus-plugin-content-docs/current
#
Translate the documentsAll the documents are placed in the i18n/$LANG_CODE/
according to the languages.
i18n/$LANG_CODE/code.json
: the translation of the index page and the text used by docusaurus.i18n/$LANG_CODE/docusaurus-theme-classic/footer.json
: the translation of footer.i18n/$LANG_CODE/docusaurus-theme-classic/navbar.json
: the translation of navbar.i18n/$LANG_CODE/docusaurus-plugin-content-docs/current.json
: the label of category on sidebar.i18n/$LANG_CODE/docusaurus-plugin-content-docs/current/**
: the markdown files of documents.
Preview the translation
yarn run start --locale $LANG_CODE