Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n in CI : create a config.json when not present #898

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scripts/tchap/translations/crawl-for-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ merge_json_files $CRAWLED_WEB $CRAWLED_REACT $CRAWLED
# Extra hack : config.json is not crawled by matrix-gen-i18n, so the terms_and_conditions_links are missing. Add them in.
# Get the terms_and_conditions strings from config.json
export TOC_TRANSLATIONS=`realpath modules/tchap-translations/tmp/terms_and_conditions_EN.json`
# Create a config.json if there isn't file
if [[ ! -f config.json ]];
then
cp config.prod.json config.json
fi
jq '.terms_and_conditions_links[] | { (.text): .text} ' config.json | jq -s add > $TOC_TRANSLATIONS
merge_json_files $TOC_TRANSLATIONS $CRAWLED $CRAWLED

Expand Down
Loading