Skip to content

Commit

Permalink
Merge pull request #898 from tchapgouv/i18n-tools-in-ci3
Browse files Browse the repository at this point in the history
i18n in CI : create a config.json when not present
  • Loading branch information
estellecomment authored Feb 8, 2024
2 parents f50ca20 + 1cf60cb commit c2d6e45
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 c2d6e45

Please sign in to comment.