diff --git a/deployment/dev_deploy_options.json b/deployment/dev_deploy_options.json index 08c7f54..d3aad7b 100644 --- a/deployment/dev_deploy_options.json +++ b/deployment/dev_deploy_options.json @@ -1,5 +1,6 @@ { "forms_to_deploy": [ - "officer-complaint-form" + "officer-complaint-form", + "officer-thank-form" ] } diff --git a/deployment/scripts/build_form.sh b/deployment/scripts/build_form.sh index 7465d3a..ecabe95 100755 --- a/deployment/scripts/build_form.sh +++ b/deployment/scripts/build_form.sh @@ -23,7 +23,7 @@ while getopts "f:e:" opt; do esac done -FORM_PATH="$CURRENT_DIR/../../src/$FORM" +FORM_PATH="$CURRENT_DIR/../../forms/$FORM" ENV_VAR_PATH="$FORM_PATH/deployment/vars/$DEPLOY_ENV.sh" if [ -z $FORM ]; then diff --git a/deployment/scripts/deploy_one_form.sh b/deployment/scripts/deploy_one_form.sh index f6bd8ff..7051cdf 100755 --- a/deployment/scripts/deploy_one_form.sh +++ b/deployment/scripts/deploy_one_form.sh @@ -5,7 +5,7 @@ CURRENT_DIR=`dirname $BASH_SOURCE` DEPLOY_ENV=$1 FORM=$2 -FORM_PATH="$CURRENT_DIR/../../src/$FORM" +FORM_PATH="$CURRENT_DIR/../../forms/$FORM" ENV_VAR_PATH="$FORM_PATH/deployment/vars/$DEPLOY_ENV.sh" if [ ! -d $FORM_PATH ]; then @@ -22,7 +22,7 @@ source $ENV_VAR_PATH # Install dependencies for Form and its Chapters yarn --cwd $FORM_PATH install --production=false -CHAPTERS_PATH="$CURRENT_DIR/../../src/shared/chapters/$CHAPTERS_DIR" +CHAPTERS_PATH="$CURRENT_DIR/../../shared/chapters/$CHAPTERS_DIR" yarn --cwd $CHAPTERS_PATH install --production=false # Build all locales for a Form using Webpack @@ -32,7 +32,7 @@ $CURRENT_DIR/build_form.sh -f $FORM -e $DEPLOY_ENV $CURRENT_DIR/upload_form.sh -f $FORM -e $DEPLOY_ENV # Upload all translations for Form to AWS -for LANGUAGE in $(jq -r ".supported_languages[]" "$FORM_PATH/src/locale/settings.json"); +for LANGUAGE in $(jq -r ".supported_languages[]" "$FORM_PATH/locale/settings.json"); do $CURRENT_DIR/upload_form.sh -f $FORM -e $DEPLOY_ENV -l $LANGUAGE done; diff --git a/deployment/scripts/run.sh b/deployment/scripts/run.sh index 9523678..d44ccc7 100755 --- a/deployment/scripts/run.sh +++ b/deployment/scripts/run.sh @@ -5,7 +5,7 @@ CURRENT_DIR=`dirname $BASH_SOURCE` # Catch any errors in dev_deploy_options.json for FORM in $(jq -r ".forms_to_deploy[]" "$CURRENT_DIR/../dev_deploy_options.json"); do - FORM_PATH="$CURRENT_DIR/../../src/$FORM" + FORM_PATH="$CURRENT_DIR/../../forms/$FORM" if [ ! -d $FORM_PATH ]; then echo "ERROR in dev_deploy_options.json: form \"$FORM\" does not exist" exit 1 diff --git a/deployment/scripts/translate_form.sh b/deployment/scripts/translate_form.sh index 49dc737..82efbc7 100755 --- a/deployment/scripts/translate_form.sh +++ b/deployment/scripts/translate_form.sh @@ -23,7 +23,7 @@ while getopts "f:l:" opt; do esac done -FORM_PATH="$CURRENT_DIR/../../src/$FORM" +FORM_PATH="$CURRENT_DIR/../../forms/$FORM" TRANSLATION_PATH="${FORM_PATH}/public_${LANGUAGE}"; if [ -z $FORM ]; then @@ -43,7 +43,7 @@ fi ##### Begin ##### echo "First, let's translate the routes:"; -python3 "$CURRENT_DIR/translate.py" "$FORM_PATH/src/locale/routes.json" "$TRANSLATION_PATH/js/app.bundle.js" "${LANGUAGE}" --routes +python3 "$CURRENT_DIR/translate.py" "$FORM_PATH/locale/routes.json" "$TRANSLATION_PATH/js/app.bundle.js" "${LANGUAGE}" --routes echo "Then, let's translate the rest of the form:" -python3 "$CURRENT_DIR/translate.py" "$FORM_PATH/src/locale/translations.json" "${TRANSLATION_PATH}/js/app.bundle.js" "${LANGUAGE}" +python3 "$CURRENT_DIR/translate.py" "$FORM_PATH/locale/translations.json" "${TRANSLATION_PATH}/js/app.bundle.js" "${LANGUAGE}" diff --git a/deployment/scripts/upload_form.sh b/deployment/scripts/upload_form.sh index b331b48..91f8521 100755 --- a/deployment/scripts/upload_form.sh +++ b/deployment/scripts/upload_form.sh @@ -28,7 +28,7 @@ while getopts "f:e:l:" opt; do esac done -FORM_PATH="$CURRENT_DIR/../../src/$FORM" +FORM_PATH="$CURRENT_DIR/../../forms/$FORM" if [[ ! -z $LANGUAGE ]] && [[ $LANGUAGE != "en" ]]; then TRANSLATED="true" fi diff --git a/forms/officer-complaint-form/src/locale/README.md b/forms/officer-complaint-form/locale/README.md similarity index 100% rename from forms/officer-complaint-form/src/locale/README.md rename to forms/officer-complaint-form/locale/README.md diff --git a/forms/officer-complaint-form/src/locale/index.json b/forms/officer-complaint-form/locale/index.json similarity index 100% rename from forms/officer-complaint-form/src/locale/index.json rename to forms/officer-complaint-form/locale/index.json diff --git a/forms/officer-complaint-form/src/locale/routes.json b/forms/officer-complaint-form/locale/routes.json similarity index 100% rename from forms/officer-complaint-form/src/locale/routes.json rename to forms/officer-complaint-form/locale/routes.json diff --git a/forms/officer-complaint-form/src/locale/settings.json b/forms/officer-complaint-form/locale/settings.json similarity index 100% rename from forms/officer-complaint-form/src/locale/settings.json rename to forms/officer-complaint-form/locale/settings.json diff --git a/forms/officer-complaint-form/src/locale/translations.json b/forms/officer-complaint-form/locale/translations.json similarity index 100% rename from forms/officer-complaint-form/src/locale/translations.json rename to forms/officer-complaint-form/locale/translations.json diff --git a/forms/officer-thank-form/src/locale/README.md b/forms/officer-thank-form/locale/README.md similarity index 100% rename from forms/officer-thank-form/src/locale/README.md rename to forms/officer-thank-form/locale/README.md diff --git a/forms/officer-thank-form/src/locale/index.json b/forms/officer-thank-form/locale/index.json similarity index 100% rename from forms/officer-thank-form/src/locale/index.json rename to forms/officer-thank-form/locale/index.json diff --git a/forms/officer-thank-form/src/locale/routes.json b/forms/officer-thank-form/locale/routes.json similarity index 100% rename from forms/officer-thank-form/src/locale/routes.json rename to forms/officer-thank-form/locale/routes.json diff --git a/forms/officer-thank-form/src/locale/settings.json b/forms/officer-thank-form/locale/settings.json similarity index 100% rename from forms/officer-thank-form/src/locale/settings.json rename to forms/officer-thank-form/locale/settings.json diff --git a/forms/officer-thank-form/src/locale/translations.json b/forms/officer-thank-form/locale/translations.json similarity index 100% rename from forms/officer-thank-form/src/locale/translations.json rename to forms/officer-thank-form/locale/translations.json