SimpleX-Chat/website/web.sh
Evgeny f49c51ae16
website: translations, readme: ZEC address (#5875)
* Translated using Weblate (German)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/

* Translated using Weblate (Arabic)

Currently translated at 91.4% (235 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/zh_Hans/

* Translated using Weblate (Hungarian)

Currently translated at 92.2% (237 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/hu/

* Translated using Weblate (Arabic)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Arabic)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/hu/

* Translated using Weblate (German)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/

* Translated using Weblate (Arabic)

Currently translated at 91.4% (235 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/zh_Hans/

* Translated using Weblate (Hungarian)

Currently translated at 92.2% (237 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/hu/

* Translated using Weblate (Arabic)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Arabic)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/hu/

* Translated using Weblate (Arabic)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/ar/

* Translated using Weblate (Italian)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/it/

* Translated using Weblate (Hungarian)

Currently translated at 100.0% (257 of 257 strings)

Translation: SimpleX Chat/SimpleX Chat website
Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/hu/

* fix

* ZEC address

---------

Co-authored-by: mlanp <github@lang.xyz>
Co-authored-by: Muhammad <muhammad.aem@outlook.com>
Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
Co-authored-by: summoner001 <summoner@vivaldi.net>
Co-authored-by: jonnysemon <jonnysemon@users.noreply.hosted.weblate.org>
Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org>
2025-05-07 11:27:10 +01:00

69 lines
No EOL
1.8 KiB
Bash
Executable file

#!/bin/bash
set -e
cp -R docs website/src
rm -rf website/src/docs/rfcs
rm website/src/docs/lang/*/README.md
rm -rf website/src/docs/dependencies
cp -R blog website/src
cp -R images website/src
rm website/src/blog/README.md
cp PRIVACY.md website/src/privacy.md
cd website
langs=()
# this loop finds out the available languages
for file in langs/*.json; do
if [ -f "$file" ]; then
file_name=$(basename "$file")
file_name=${file_name%.*}
langs+=($file_name)
fi
done
npm install
cp node_modules/lottie-web/build/player/lottie.min.js src/js
node merge_translations.js
node customize_docs_frontmatter.js
# creating folders for each language for internationalization
for lang in "${langs[@]}"; do
mkdir -p src/$lang
cp src/index.html src/$lang
cp src/contact.html src/$lang
cp src/invitation.html src/$lang
cp src/fdroid.html src/$lang
echo "{\"lang\":\"$lang\"}" > src/$lang/$lang.json
echo "done $lang copying"
done
npm run build
for lang in "${langs[@]}"; do
rm -rf src/$lang
echo "done $lang deletion"
done
# for val in "${langs[@]}"; do
# json_content=$(echo "$json_content" | jq ". + {$val: $(jq . langs/$val.json)}")
# done
# echo "$json_content" > translations.json
# keys of the english language are used as the base keys
# base_keys=($(jq -r 'keys[]' 'langs/en.json'))
# this program generates a combined translations.json file
# main_json_obj="{}"
# for key in "${base_keys[@]}"; do
# val_json_obj="{}"
# for lang in "${langs[@]}"; do
# val="$(jq .["\"$key\""] langs/$lang.json)"
# if [ ! -z "$val" ] && [ "$val" != "null" ]; then
# val_json_obj=$(echo "$val_json_obj" | jq ". + {$lang: $val}")
# fi
# done
# main_json_obj=$(echo "$main_json_obj" | jq ". + {\"$key\": $val_json_obj}")
# done
# echo "$main_json_obj" > translations.json