This repository hosts the source for The Starknet Book.
We value and welcome all contributions!
- For insight into specific areas of focus, check the repository issues.
- Prioritize contributions that directly pertain to the book's content.
- Even if an issue doesn't exist, feel free to create a PR for typos, errors, or content improvements and additions.
- Rust related packages:
cargo install mdbook --version 0.4.31 mdbook-i18n-helpers
- Host machine packages:
- Install gettext for translations, usually available with regular package manager:
sudo apt install gettext
.
- Install gettext for translations, usually available with regular package manager:
- Clone this repository.
All the Markdown files MUST be edited in english. To work locally in english:
- Start a local server with
mdbook serve
and visit localhost:3000 to view the book. You can use the--open
flag to open the browser automatically:mdbook serve --open
. - Make changes to the book and refresh the browser to see the changes.
- Open a PR with your changes.
This book is targetting international audience, and aims at being gradually translated in several languages.
All files in the src
directory MUST be written in english. This ensures that all the translation files can be
auto-generated and updated by translators.
To work with translations, those are the steps to update the translated content:
- Run a local server for the language you want to edit:
./translations.sh es
for instance. If no language is provided, the script will only extract translations from english. - Open the translation file you are interested in
po/es.po
for instance. You can also use editors like poedit to help you on this task. - When you are done, you should only have changes into the
po/xx.po
file. Commit them and open a PR. The PR must stars withi18n
to let the maintainers know that the PR is only changing translation. The translation work is inspired from Comprehensive Rust repository.
If you wish to initiate a new translation for your language without running a local server, consider the following tips:
- Execute the command
./translations.sh new xx
(replacexx
with your language code). This method can generate thexx.po
file of your language for you. - To update your
xx.po
file, execute the command./translations.sh xx
(replacexx
with your language code), as mentioned in the previous chapter. - If the
xx.po
file already exists (which means you are not initiating a new translation), you should not run this command.