diff --git a/.gitignore b/.gitignore index 6d34a8d821..9a7ec5f13f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ .#* .gdb_history /book/book +/ru/book /target Cargo.lock diff --git a/book/src/preface.md b/book/src/preface.md index e64a996f4a..9bc0401fea 100644 --- a/book/src/preface.md +++ b/book/src/preface.md @@ -7,6 +7,10 @@ This book contains user level documentation for the Real Time For the Masses (RTFM) framework. The API reference can be found [here](../api/rtfm/index.html). +There is a translation of this book in [Russian]. + +[Russian]: ru/index.html + {{#include ../../README.md:5:46}} {{#include ../../README.md:52:}} diff --git a/ci/after-success.sh b/ci/after-success.sh index f9f2522632..04376d668c 100644 --- a/ci/after-success.sh +++ b/ci/after-success.sh @@ -4,10 +4,12 @@ main() { rm -f .cargo/config cargo doc --features timer-queue ( cd book && mdbook build ) + ( cd ru && mdbook build ) local td=$(mktemp -d) cp -r target/doc $td/api cp -r book/book $td/ + cp -r ru/book $td/book/ru cp LICENSE-* $td/book/ mkdir ghp-import @@ -22,6 +24,15 @@ main() { rm -rf $td } +# fake Travis variables to be able to run this on a local machine +if [ -z ${TRAVIS_BRANCH-} ]; then + TRAVIS_BRANCH=master +fi + +if [ -z ${TRAVIS_PULL_REQUEST-} ]; then + TRAVIS_PULL_REQUEST=false +fi + if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]; then main fi diff --git a/ci/script.sh b/ci/script.sh index 3dd60de326..8878d92350 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -24,6 +24,7 @@ main() { cargo doc fi ( cd book && mdbook build ) + ( cd ru && mdbook build ) local td=$(mktemp -d) cp -r target/doc $td/api diff --git a/ru/book.toml b/ru/book.toml new file mode 100644 index 0000000000..c611ce079a --- /dev/null +++ b/ru/book.toml @@ -0,0 +1,5 @@ +[book] +authors = ["Jorge Aparicio"] +multilingual = false +src = "src" +title = "Real Time For the Masses" diff --git a/ru/src/SUMMARY.md b/ru/src/SUMMARY.md new file mode 100644 index 0000000000..7390c82896 --- /dev/null +++ b/ru/src/SUMMARY.md @@ -0,0 +1,3 @@ +# Summary + +- [Chapter 1](./chapter_1.md) diff --git a/ru/src/chapter_1.md b/ru/src/chapter_1.md new file mode 100644 index 0000000000..b743fda354 --- /dev/null +++ b/ru/src/chapter_1.md @@ -0,0 +1 @@ +# Chapter 1