feat: Add payments server to our L10n scripts
This commit is contained in:
Родитель
7c128e42f4
Коммит
213c9803ba
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf workspace
|
||||
mkdir workspace
|
||||
(cd workspace && git clone --depth 1 https://github.com/mozilla/fxa)
|
||||
(cd workspace/fxa && yarn workspaces focus fxa-content-server fxa-auth-server)
|
||||
(cd workspace/fxa && yarn workspaces focus fxa-content-server fxa-auth-server fxa-payments-server)
|
||||
|
||||
# random release number, avoids collision with old trains or branches
|
||||
r=$(( $RANDOM + $RANDOM + 1000 ))
|
||||
NODE_ENV=development ./scripts/extract_strings.sh --mailer-repo workspace/fxa/packages/fxa-auth-server --content-repo workspace/fxa/packages/fxa-content-server --l10n-repo . $r
|
||||
NODE_ENV=development ./scripts/extract_strings.sh --mailer-repo workspace/fxa/packages/fxa-auth-server --payments-repo workspace/fxa/packages/fxa-payments-server --content-repo workspace/fxa/packages/fxa-content-server --l10n-repo . $r
|
||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
|||
|
||||
function usage() {
|
||||
echo "syntax:"
|
||||
echo "extract_strings.sh [--mailer-repo ./fxa-auth-server] [--content-repo ./fxa-content-server] [--l10n-repo ./fxa-content-server-l10n] train_number"
|
||||
echo "extract_strings.sh [--mailer-repo ./fxa-auth-server] [--content-repo ./fxa-content-server] [--payments-repo ./fxa-payments-server] [--l10n-repo ./fxa-content-server-l10n] train_number"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ fi
|
|||
|
||||
MAILER_DIR="./fxa-auth-server"
|
||||
CONTENT_DIR="./fxa-content-server"
|
||||
PAYMENTS_DIR="./fxa-payments-server"
|
||||
L10N_DIR="./fxa-content-server-l10n"
|
||||
|
||||
while [[ $# > 1 ]]
|
||||
|
@ -41,6 +42,10 @@ case $param in
|
|||
CONTENT_DIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
--payments-repo)
|
||||
PAYMENTS_DIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
--l10n-repo)
|
||||
L10N_DIR="$2"
|
||||
shift 2
|
||||
|
@ -61,6 +66,8 @@ printf "Checking $MAILER_DIR.. "
|
|||
check_folder $MAILER_DIR
|
||||
printf "Checking $CONTENT_DIR.. "
|
||||
check_folder $CONTENT_DIR
|
||||
printf "Checking $PAYMENTS_DIR.. "
|
||||
check_folder $PAYMENTS_DIR
|
||||
printf "Checking $L10N_DIR.. "
|
||||
check_folder $L10N_DIR
|
||||
|
||||
|
@ -77,6 +84,8 @@ cp -r $CONTENT_DIR/locale/templates/* $L10N_DIR/locale/templates
|
|||
msgfilter -i $L10N_DIR/locale/sr/LC_MESSAGES/client.po -o $L10N_DIR/locale/sr_Latn/LC_MESSAGES/client.po recode-sr-latin
|
||||
msgfilter -i $L10N_DIR/locale/sr/LC_MESSAGES/server.po -o $L10N_DIR/locale/sr_Latn/LC_MESSAGES/server.po recode-sr-latin
|
||||
|
||||
cp $PAYMENTS_DIR/public/locales/en-US/*.ftl $L10N_DIR/locale/templates
|
||||
|
||||
cd $L10N_DIR
|
||||
git checkout -b merge-train-$TRAIN_NUMBER-strings
|
||||
./scripts/merge_po.sh ./locale
|
||||
|
|
Загрузка…
Ссылка в новой задаче