From 90dc3c48347c95c6e211aa606b2ba2e62c540e28 Mon Sep 17 00:00:00 2001 From: Illia Chub Date: Thu, 4 Nov 2021 16:48:11 +0200 Subject: [PATCH] Added mdbook translation wrapper --- .gitignore | 3 ++- intro.md | 13 ------------- intro_en.md | 13 ------------- source.txt | 1 - translate_docs.sh | 22 ++++++++++++++++++++++ translation.txt | 1 - 6 files changed, 24 insertions(+), 29 deletions(-) delete mode 100644 intro.md delete mode 100644 intro_en.md delete mode 100644 source.txt create mode 100755 translate_docs.sh delete mode 100644 translation.txt diff --git a/.gitignore b/.gitignore index ba0430d..11f4de9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -__pycache__/ \ No newline at end of file +__pycache__/ +src/ \ No newline at end of file diff --git a/intro.md b/intro.md deleted file mode 100644 index c414f7f..0000000 --- a/intro.md +++ /dev/null @@ -1,13 +0,0 @@ -# πŸ‘‹ Π’Π²Π΅Π΄Π΅Π½ΠΈΠ΅ - -[SelfPrivacy](https://selfprivacy.org) β€” мобильноС [ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅](https://f-droid.org/en/packages/pro.kherel.selfprivacy/) Ρ€Π°Π·Π²ΠΎΡ€Π°Ρ‡ΠΈΠ²Π°Π΅Ρ‚ сСрвСр с Π³ΠΎΡ‚ΠΎΠ²Ρ‹ΠΌΠΈ ΠΊ использованию сСрвисами: -- ЭлСктронная ΠΏΠΎΡ‡Ρ‚Π° -- ΠŸΠ°Ρ€ΠΎΠ»ΡŒΠ½Ρ‹ΠΉ ΠΌΠ΅Π½Π΅Π΄ΠΆΠ΅Ρ€ -- ΠœΠ΅ΡΡΠ΅Π½Π΄ΠΆΠ΅Ρ€ -- VPN -- Π€Π°ΠΉΠ»ΠΎΠ²ΠΎΠ΅ Ρ…Ρ€Π°Π½ΠΈΠ»ΠΈΡ‰Π΅ -- ΠšΠΎΠ½Ρ„Π΅Ρ€Π΅Π½Ρ†ΠΈΠΈ -- ... ΠΈ ΠΌΠ½ΠΎΠ³ΠΈΠ΅ Π΄Ρ€ΡƒΠ³ΠΈΠ΅ [сСрвисы](services.md) - -## ⚠️ Beta -Π’Π΅ΠΊΡƒΡ‰ΠΈΠΉ Ρ€Π΅Π»ΠΈΠ· ΠΏΠΎΠΊΠ° Π½Π΅ Π³ΠΎΡ‚ΠΎΠ² ΠΊ повсСднСвному использованию Π½Π΅ΠΊΠ²Π°Π»ΠΈΡ„ΠΈΡ†ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹ΠΌ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΌ. \ No newline at end of file diff --git a/intro_en.md b/intro_en.md deleted file mode 100644 index 98c8bb9..0000000 --- a/intro_en.md +++ /dev/null @@ -1,13 +0,0 @@ -# πŸ‘‹ Introduction - -[SelfPrivacy](https://selfprivacy.org) - mobile [app](https://f-droid.org/en/packages/pro.kherel.selfprivacy/) deploys a server with ready-to-use services: -- Email -- Password manager -- Messenger -- VPN -- File storage -- Conferences -- ... and many other [services](services.md) - -## ⚠️ Beta -The current release is not yet ready for everyday use by an unskilled user. \ No newline at end of file diff --git a/source.txt b/source.txt deleted file mode 100644 index f5cb204..0000000 --- a/source.txt +++ /dev/null @@ -1 +0,0 @@ -ΠŸΡ€ΠΈΠ²Π΅Ρ‚, ΠΌΠΈΡ€! \ No newline at end of file diff --git a/translate_docs.sh b/translate_docs.sh new file mode 100755 index 0000000..c4cdd6a --- /dev/null +++ b/translate_docs.sh @@ -0,0 +1,22 @@ +export ruInputFiles=$(ls src/ru/src) + +for inputFile in ${ruInputFiles} +do + python3.9 ${1} --file src/ru/src/${inputFile} --output src/en/src/${inputFile} +done + +buildEnglishTranslation() +{ + cd src/en/ + mdbook build +} + +buildRussianTranslations() +{ + cd src/ru/ + mdbook build +} + +buildEnglishTranslation +cd ../../ +buildRussianTranslations \ No newline at end of file diff --git a/translation.txt b/translation.txt deleted file mode 100644 index 5dd01c1..0000000 --- a/translation.txt +++ /dev/null @@ -1 +0,0 @@ -Hello, world! \ No newline at end of file