SimpleX-Chat/website/web.sh

59 lines
1.5 KiB
Bash
Raw Normal View History

migrate website to 11ty site generator (#913) * readme: fix link * add 11ty files to website folder * add web.yml * add simplex web files * add font matter to some blogs * remove unnecessary things * change few settings * add a web script * update web.yml * update image format & add an image * add font matter to blogs * update blog.html * add article layout & give that layout to blogs * update the location of _includes * update article layout * change original blog links * add styling to blog * improve the links of blogs * update web.sh * add favicon * update a tag in a blog * improve stylings of article page * improve styling of blog page * update the theme * update font matter and update links in new blog. * add style changes * apply reverse chronology sort on articles * shift blogs links back to hashes * add ids to headers & smooth scrolling * make all blog links relative * add smooth scrolling & add relative to absolute links converter * add navigation * improve mobile nav * change desktop header style * convert blogs link text to "Read More" * change desktop header style * style mobile nav * fix landing page styling * update web workflow * update web workflow * nav setting * add tailwind links * update web workflow * remove app demo folder * remove special characters from the links * fix the issue of links * make web.sh executable * update blog links * move web.sh to website folder * code style * EOLs * format index.css & contact.css * add markdown-it configuration * add outline none on focus * remove extra Javascript * make mobile nav display none by default * add permalinks to markdown files * update 11ty config * update web.sh * update article * resolve issue of special characters in header ids introduce slugify * add target _blank to whitepaper link * add last post * EOLs * try to resolve bullets issue * use markdown-it-replace-link to convert relative .md extension to .html extension * add missing images, simpligy link parsing * add CNAME file * add CNAME file, rename config * fix jumping table issue Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2022-09-10 14:26:21 +05:00
#!/bin/bash
cp -R blog website/src
cp -R images website/src
rm website/src/blog/README.md
cd website
website internationalization (#1922) * website Internationalization (#1904) * added devcontainer config * internationalization under dev * internationalization of _data done * overlays internationalization done * improved routing * updated gitignore * remove .devcontainer * internationalization in progess deleted all the intermediate files added translation of few sections * remaining website strings are added to translation * done internationalization - fully converted to i18n plugin - wrote bash script for creating a combined translations.json * internationalization UI done * a quick fix * remove jq installation * Added translation using Weblate (German) * Translated using Weblate (French) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/ * Translated using Weblate (German) Currently translated at 42.9% (91 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * fixes of web Internationalization (#1925) * a quick fix * blog route for all languages is shifted to root blog route * wrote merge_translations.js * remove language label from dropdown * update language names * refactor scripts * remove catch from script * Added translation using Weblate (Dutch) * Added translation using Weblate (Norwegian Bokmål) * Translated using Weblate (Dutch) Currently translated at 33.0% (70 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/nl/ * website: internationalization fixes (#1931) * added devcontainer config * internationalization under dev * internationalization of _data done * overlays internationalization done * improved routing * updated gitignore * remove .devcontainer * internationalization in progess deleted all the intermediate files added translation of few sections * remaining website strings are added to translation * done internationalization - fully converted to i18n plugin - wrote bash script for creating a combined translations.json * internationalization UI done * a quick fix * blog route for all languages is shifted to root blog route * wrote merge_translations.js * remove flag from blog * updated nav stylings & logo links * add enabled key * updated nav dropdown styling * gave specific lang to i18n plugin. overlay translations are now working. * enable nl & nb_NO * updated nav stylings * updated contact.js --------- Co-authored-by: M Sarmad Qadeer <msarmadqadeer@gmail.com> * Translated using Weblate (German) Currently translated at 47.6% (101 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * fixed internationalization issues * updated strings, refactor contact.js * updated nav stylings for mobile * a bit smaller padding on mobile * Added translation using Weblate (Czech) * Translated using Weblate (Czech) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/cs/ * Translated using Weblate (French) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/ * Translated using Weblate (German) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * enabled languages * check/correct (#1949) --------- Co-authored-by: M Sarmad Qadeer <MSarmadQadeer@gmail.com> Co-authored-by: Ophiushi <Ophiushi@users.noreply.hosted.weblate.org> Co-authored-by: mlanp <github@lang.xyz> Co-authored-by: John m <jvanmanen@gmail.com> Co-authored-by: zenobit <zen@osowoso.xyz> Co-authored-by: Ophiushi <41908476+ishi-sama@users.noreply.github.com>
2023-02-24 21:03:57 +00:00
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
node merge_translations.js
# creating folders for each language for internationalization
for lang in "${langs[@]}"; do
mkdir src/$lang
cp src/index.html src/$lang
cp src/contact.html src/$lang
cp src/invitation.html src/$lang
echo "{\"lang\":\"$lang\"}" > src/$lang/$lang.json
echo "done $lang copying"
done
migrate website to 11ty site generator (#913) * readme: fix link * add 11ty files to website folder * add web.yml * add simplex web files * add font matter to some blogs * remove unnecessary things * change few settings * add a web script * update web.yml * update image format & add an image * add font matter to blogs * update blog.html * add article layout & give that layout to blogs * update the location of _includes * update article layout * change original blog links * add styling to blog * improve the links of blogs * update web.sh * add favicon * update a tag in a blog * improve stylings of article page * improve styling of blog page * update the theme * update font matter and update links in new blog. * add style changes * apply reverse chronology sort on articles * shift blogs links back to hashes * add ids to headers & smooth scrolling * make all blog links relative * add smooth scrolling & add relative to absolute links converter * add navigation * improve mobile nav * change desktop header style * convert blogs link text to "Read More" * change desktop header style * style mobile nav * fix landing page styling * update web workflow * update web workflow * nav setting * add tailwind links * update web workflow * remove app demo folder * remove special characters from the links * fix the issue of links * make web.sh executable * update blog links * move web.sh to website folder * code style * EOLs * format index.css & contact.css * add markdown-it configuration * add outline none on focus * remove extra Javascript * make mobile nav display none by default * add permalinks to markdown files * update 11ty config * update web.sh * update article * resolve issue of special characters in header ids introduce slugify * add target _blank to whitepaper link * add last post * EOLs * try to resolve bullets issue * use markdown-it-replace-link to convert relative .md extension to .html extension * add missing images, simpligy link parsing * add CNAME file * add CNAME file, rename config * fix jumping table issue Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2022-09-10 14:26:21 +05:00
npm install
npm run build
website internationalization (#1922) * website Internationalization (#1904) * added devcontainer config * internationalization under dev * internationalization of _data done * overlays internationalization done * improved routing * updated gitignore * remove .devcontainer * internationalization in progess deleted all the intermediate files added translation of few sections * remaining website strings are added to translation * done internationalization - fully converted to i18n plugin - wrote bash script for creating a combined translations.json * internationalization UI done * a quick fix * remove jq installation * Added translation using Weblate (German) * Translated using Weblate (French) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/ * Translated using Weblate (German) Currently translated at 42.9% (91 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * fixes of web Internationalization (#1925) * a quick fix * blog route for all languages is shifted to root blog route * wrote merge_translations.js * remove language label from dropdown * update language names * refactor scripts * remove catch from script * Added translation using Weblate (Dutch) * Added translation using Weblate (Norwegian Bokmål) * Translated using Weblate (Dutch) Currently translated at 33.0% (70 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/nl/ * website: internationalization fixes (#1931) * added devcontainer config * internationalization under dev * internationalization of _data done * overlays internationalization done * improved routing * updated gitignore * remove .devcontainer * internationalization in progess deleted all the intermediate files added translation of few sections * remaining website strings are added to translation * done internationalization - fully converted to i18n plugin - wrote bash script for creating a combined translations.json * internationalization UI done * a quick fix * blog route for all languages is shifted to root blog route * wrote merge_translations.js * remove flag from blog * updated nav stylings & logo links * add enabled key * updated nav dropdown styling * gave specific lang to i18n plugin. overlay translations are now working. * enable nl & nb_NO * updated nav stylings * updated contact.js --------- Co-authored-by: M Sarmad Qadeer <msarmadqadeer@gmail.com> * Translated using Weblate (German) Currently translated at 47.6% (101 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * fixed internationalization issues * updated strings, refactor contact.js * updated nav stylings for mobile * a bit smaller padding on mobile * Added translation using Weblate (Czech) * Translated using Weblate (Czech) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/cs/ * Translated using Weblate (French) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/fr/ * Translated using Weblate (German) Currently translated at 100.0% (212 of 212 strings) Translation: SimpleX Chat/SimpleX Chat website Translate-URL: https://hosted.weblate.org/projects/simplex-chat/website/de/ * enabled languages * check/correct (#1949) --------- Co-authored-by: M Sarmad Qadeer <MSarmadQadeer@gmail.com> Co-authored-by: Ophiushi <Ophiushi@users.noreply.hosted.weblate.org> Co-authored-by: mlanp <github@lang.xyz> Co-authored-by: John m <jvanmanen@gmail.com> Co-authored-by: zenobit <zen@osowoso.xyz> Co-authored-by: Ophiushi <41908476+ishi-sama@users.noreply.github.com>
2023-02-24 21:03:57 +00:00
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