Skip to content

Commit

Permalink
i18n in CI : create a config.json when not present
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Feb 8, 2024
1 parent f50ca20 commit 1cf60cb
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 1cf60cb

Please sign in to comment.