Skip to content

Commit

Permalink
feat(next): add support for payments-next.ftl
Browse files Browse the repository at this point in the history
Because:

- The Subscription Platform team is adding a new app service,
  payments-next, to replace the existing fxa-payments-server. In the
  short term both payments-next and fxa-payments-server need to be
  supported, each utilizing different ftl strings.

This commit:

- Adds support for new app payments-next utilizing payments-next.ftl

Closes #FXA-7482
  • Loading branch information
StaberindeZA committed Jan 7, 2025
1 parent 06ff31e commit 0ba22ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/l10n_extract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ jobs:
yarn workspace fxa-settings grunt merge-ftl
yarn workspace fxa-auth-server grunt merge-ftl
yarn workspace fxa-react grunt merge-ftl
yarn grunt --gruntfile='apps/payments/next/Gruntfile.js' merge-ftl
NODE_ENV=development ../fxa-l10n/scripts/extract_strings.sh \
--mailer-repo ./packages/fxa-auth-server \
--payments-repo ./packages/fxa-payments-server \
--payments-next-repo ./apps/payments/next \
--content-repo ./packages/fxa-content-server \
--settings-repo ./packages/fxa-settings \
--react-repo ./packages/fxa-react \
Expand Down
8 changes: 8 additions & 0 deletions scripts/extract_strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fi
MAILER_DIR="./fxa-auth-server"
CONTENT_DIR="./fxa-content-server"
PAYMENTS_DIR="./fxa-payments-server"
PAYMENTS_NEXT_DIR="../apps/payments/next"
SETTINGS_DIR="./fxa-settings"
REACT_DIR="./fxa-react"
SHARED_DIR="../libs/shared"
Expand All @@ -49,6 +50,10 @@ case $param in
PAYMENTS_DIR="$2"
shift 2
;;
--payments-next-repo)
PAYMENTS_NEXT_DIR="$2"
shift 2
;;
--settings-repo)
SETTINGS_DIR="$2"
shift 2
Expand Down Expand Up @@ -77,6 +82,8 @@ printf "Checking $CONTENT_DIR.. "
check_folder $CONTENT_DIR
printf "Checking $PAYMENTS_DIR.. "
check_folder $PAYMENTS_DIR
printf "Checking $PAYMENTS_NEXT_DIR.. "
check_folder $PAYMENTS_NEXT_DIR
printf "Checking $SETTINGS_DIR.. "
check_folder $SETTINGS_DIR
printf "Checking $REACT_DIR.. "
Expand Down Expand Up @@ -133,6 +140,7 @@ sed -i'' -e 's/Language: sv_SE/Language: sv/g' "$L10N_DIR/locale/sv/LC_MESSAGES/
# Fluent extraction

cp $PAYMENTS_DIR/public/locales/en/payments.ftl $L10N_DIR/locale/templates
cp $PAYMENTS_NEXT_DIR/public/locales/en/payments-next.ftl $L10N_DIR/locale/templates
cp $SETTINGS_DIR/public/locales/en/settings.ftl $L10N_DIR/locale/templates
cp $MAILER_DIR/public/locales/en/auth.ftl $L10N_DIR/locale/templates
cp $REACT_DIR/public/locales/en/react.ftl $L10N_DIR/locale/templates
Expand Down

0 comments on commit 0ba22ef

Please sign in to comment.