diff --git a/.circleci/config.yml b/.circleci/config.yml index 726d7c729..a51c167ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -147,7 +147,7 @@ jobs: name: Verify translation files command: | sudo apt-get install -qq gettext - ./.circleci/run_translation_verification.sh + ./.github/run_translation_verification.sh # deploys assets to an uncached folder in the S3 bucket named by branch deploy_branch: docker: diff --git a/.circleci/run_translation_verification.sh b/.github/run_translation_verification.sh similarity index 75% rename from .circleci/run_translation_verification.sh rename to .github/run_translation_verification.sh index aeea97903..6b0ff4d78 100755 --- a/.circleci/run_translation_verification.sh +++ b/.github/run_translation_verification.sh @@ -16,14 +16,20 @@ fi # Verify that translations are present for all languages cd conf/i18n/translations -if [[ $CIRCLE_BRANCH == release/* - || $CIRCLE_BRANCH == hotfix/* - || $CIRCLE_BRANCH == master - || $CIRCLE_BRANCH == support/* ]] + +exit_code=0 +if [[ $GITHUB_REF_NAME == release/* + || $GITHUB_REF_NAME == hotfix/* + || $GITHUB_REF_NAME == master + || $GITHUB_REF_NAME == support/* ]] then for po_file in *.po - do msgcmp $po_file messages.pot + do + msgcmp $po_file messages.pot + exit_code=$(( exit_code + $? )) done else echo "Skipping the verification that all translations are present" -fi \ No newline at end of file +fi + +exit $exit_code \ No newline at end of file diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index acb02e2e0..a171e3687 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -5,49 +5,52 @@ on: branches-ignore: - develop - master - - support/** + # - support/** - hotfix/** - feature/**-i18n - release/** jobs: - call_build: - uses: ./.github/workflows/build.yml + # call_build: + # uses: ./.github/workflows/build.yml - call_unit_test: - uses: ./.github/workflows/unit_test.yml - needs: call_build + # call_unit_test: + # uses: ./.github/workflows/unit_test.yml + # needs: call_build + + call_misc_tests: + uses: ./.github/workflows/miscellaneous_tests.yml - call_acceptance: - uses: ./.github/workflows/acceptance.yml - needs: call_build - secrets: - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + # call_acceptance: + # uses: ./.github/workflows/acceptance.yml + # needs: call_build + # secrets: + # BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + # BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - format_branch_name: - runs-on: ubuntu-latest - outputs: - formatted_branch: ${{ steps.vars.outputs.formatted_branch }} - steps: - - name: Format branch name # replace '/' with '-' - id: vars - run: | - FORMATTED_BRANCH="$(echo ${GITHUB_REF_NAME} | sed "s/\//-/g")" - echo $FORMATTED_BRANCH - echo ::set-output name=formatted_branch::${FORMATTED_BRANCH} + # format_branch_name: + # runs-on: ubuntu-latest + # outputs: + # formatted_branch: ${{ steps.vars.outputs.formatted_branch }} + # steps: + # - name: Format branch name # replace '/' with '-' + # id: vars + # run: | + # FORMATTED_BRANCH="$(echo ${GITHUB_REF_NAME} | sed "s/\//-/g")" + # echo $FORMATTED_BRANCH + # echo ::set-output name=formatted_branch::${FORMATTED_BRANCH} - call_deploy: - needs: - - call_unit_test - - format_branch_name - - call_acceptance - uses: ./.github/workflows/deploy.yml - with: - directory: dev/${{ needs.format_branch_name.outputs.formatted_branch }} - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # call_deploy: + # needs: + # - call_unit_test + # - format_branch_name + # - call_acceptance + # uses: ./.github/workflows/deploy.yml + # with: + # directory: dev/${{ needs.format_branch_name.outputs.formatted_branch }} + # secrets: + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} concurrency: group: ci-build-and-deploy-${{ github.ref }}-1 diff --git a/.github/workflows/miscellaneous_tests.yml b/.github/workflows/miscellaneous_tests.yml new file mode 100644 index 000000000..bd321c8a6 --- /dev/null +++ b/.github/workflows/miscellaneous_tests.yml @@ -0,0 +1,19 @@ +name: Run miscellaneous tests + +on: + workflow_call: + +jobs: + unit_tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: 14 + cache: 'npm' + - run: npm ci + - run: sudo apt-get install -qq gettext + - run: ./.github/run_translation_verification.sh \ No newline at end of file diff --git a/.github/workflows/percy_snapshots.yml b/.github/workflows/percy_snapshots.yml index ea2d7dd41..5de552b98 100644 --- a/.github/workflows/percy_snapshots.yml +++ b/.github/workflows/percy_snapshots.yml @@ -20,9 +20,9 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - name: Percy Snapshots - run: npx percy exec -- node tests/acceptance/percy/snapshots.js - env: - PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} \ No newline at end of file + # - run: npm ci + # - run: npm run build + # - name: Percy Snapshots + # run: npx percy exec -- node tests/acceptance/percy/snapshots.js + # env: + # PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} \ No newline at end of file diff --git a/conf/i18n/translations/ar.po b/conf/i18n/translations/ar.po index a3daef0a2..3394057d5 100755 --- a/conf/i18n/translations/ar.po +++ b/conf/i18n/translations/ar.po @@ -162,16 +162,6 @@ msgstr "شكرًا على ملاحظاتك!" msgid "Thank you for your question!" msgstr "شكرا لك على سؤالك!" -#: src/ui/templates/results/alternativeverticals.hbs:11 -msgid "The following search category yielded results for \"[[query]]\":" -msgid_plural "The following search categories yielded results for \"[[query]]\":" -msgstr[0] "أسفرت فئات البحث التالية عن نتائج لعدد "[[query]]":" -msgstr[1] "أسفرت فئة البحث التالية عن نتائج لعدد "[[query]]":" -msgstr[2] "أسفرت فئات البحث التالية عن نتائج لعدد "[[query]]":" -msgstr[3] "أسفرت فئات البحث التالية عن نتائج لعدد "[[query]]":" -msgstr[4] "أسفرت فئات البحث التالية عن نتائج لعدد "[[query]]":" -msgstr[5] "أسفرت فئات البحث التالية عن نتائج لعدد "[[query]]":" - #: src/ui/components/results/directanswercomponent.js:23 msgid "This answered my question" msgstr "هذا أجاب عن سؤالي" diff --git a/conf/i18n/translations/es.po b/conf/i18n/translations/es.po index face91d2e..d4dabc95c 100755 --- a/conf/i18n/translations/es.po +++ b/conf/i18n/translations/es.po @@ -216,9 +216,6 @@ msgstr "Sugerencias:" msgid "Thank you for your feedback!" msgstr "Gracias por su comentario" -#: src/ui/components/questions/questionsubmissioncomponent.js:127 -msgid "Thank you for your question!" -msgstr "Gracias por su pregunta." #: src/ui/templates/results/alternativeverticals.hbs:11 msgid "The following search category yielded results for \"[[query]]\":" diff --git a/conf/i18n/translations/fr.po b/conf/i18n/translations/fr.po index dab1e8855..a40b2d3cb 100755 --- a/conf/i18n/translations/fr.po +++ b/conf/i18n/translations/fr.po @@ -201,10 +201,6 @@ msgstr "Voici msgid "Speech Recognition is not available." msgstr "La reconnaissance vocale n'est pas disponible." -#: src/ui/templates/results/noresults.hbs:24 -msgid "Suggestions:" -msgstr "Suggestions:" - #: src/ui/components/results/directanswercomponent.js:29 msgid "Thank you for your feedback!" msgstr "Merci pour vos retours !" diff --git a/conf/i18n/translations/test.sh b/conf/i18n/translations/test.sh new file mode 100755 index 000000000..8ee6e5406 --- /dev/null +++ b/conf/i18n/translations/test.sh @@ -0,0 +1,8 @@ +exit_code=0 + +for po_file in *.po + do msgcmp $po_file messages.pot + exit_code=$(( exit_code + $? )) +done + +exit $exit_code