Skip to content

Commit

Permalink
Add the format change step in script
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Jan 24, 2024
1 parent 6d3ecef commit dd1a8a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/tchap/translations/collect-reference-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ source scripts/tchap/translations/helpers.sh
mkdir -p `realpath modules/tchap-translations/tmp`
export OUTPUT_FILE=$1

# Extract EN translations from tchap translations.
# Convert tchap translations from piped format ("aa|bb|cc") to nested format.
TCHAP_TRANSLATION_FILE=`realpath modules/tchap-translations/tchap_translations.json`
TCHAP_TRANSLATION_NESTED_FILE=`realpath modules/tchap-translations/tchap_translations_nested.json`

# Extract EN translations from tchap translations.
TCHAP_TRANSLATION_EN_FILE=`realpath modules/tchap-translations/tmp/tchap_EN.json`
node scripts/tchap/translations/extractENTranslations.js --file=$TCHAP_TRANSLATION_FILE > $TCHAP_TRANSLATION_EN_FILE
node scripts/tchap/translations/extractENTranslations.js --file=$TCHAP_TRANSLATION_NESTED_FILE > $TCHAP_TRANSLATION_EN_FILE

# Merge element translations from both web and react-sdk repos, into OUTPUT_FILE
export ELEMENT_WEB_TRANSLATION_FILE=`realpath src/i18n/strings/en_EN.json`
Expand Down

0 comments on commit dd1a8a3

Please sign in to comment.