diff --git a/.github/run_browserstack_acceptance.sh b/.github/run_browserstack_acceptance.sh index 2459fc882..f82b0022e 100755 --- a/.github/run_browserstack_acceptance.sh +++ b/.github/run_browserstack_acceptance.sh @@ -6,4 +6,12 @@ export BROWSERSTACK_BUILD_ID="${GITHUB_BRANCH} - ${GITHUB_RUN_ID}" COMMIT_MSG_TITLE=$(git log -n 1 --pretty=format:%s) export BROWSERSTACK_TEST_RUN_NAME=$COMMIT_MSG_TITLE -npm run acceptance -- --browsers browserstack:ie@11.0 browserstack:safari browserstack:firefox +if [[ $GITHUB_BRANCH == release/* + || $GITHUB_BRANCH == hotfix/* + || $GITHUB_BRANCH == master + || $GITHUB_BRANCH == support/* ]] +then + npm run acceptance -- --browsers browserstack:ie@11.0 browserstack:safari browserstack:firefox +else + npm run acceptance -- --browsers browserstack:ie@11.0 --concurrency 2 +fi \ No newline at end of file diff --git a/.github/run_translation_verification.sh b/.github/run_translation_verification.sh new file mode 100755 index 000000000..c727e77bc --- /dev/null +++ b/.github/run_translation_verification.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +# Verifiy that the messages.pot file in the repo is up to date +# If there is a git diff after translations are extracted, the checked-in file is out of date +npm run extract-translations +git diff --exit-code translations/messages.pot > /dev/null # send stdout to /dev/null to reduce clutter in the CI output +diff_exit_code=$? + +if test $diff_exit_code -eq 1 +then + echo "Extracted translations are out of date. Run 'npm run extract-translations' and commit the updated pot file." + exit 1 +else + echo "The messages.pot translation file is up to date." +fi + +# Verify that translations are present for all languages +cd translations +if [[ $GITHUB_BASE_REF == refs/heads/release/* + || $GITHUB_BASE_REF == refs/heads/hotfix/* + || $GITHUB_BASE_REF == refs/heads/master + || $GITHUB_BASE_REF == refs/heads/support/* ]] +then + for po_file in *.po + do msgcmp $po_file messages.pot + done +else + echo "Skipping the verification that all translations are present" +fi \ No newline at end of file diff --git a/.github/workflows/translation-test.yml b/.github/workflows/translation-test.yml new file mode 100644 index 000000000..d50232dec --- /dev/null +++ b/.github/workflows/translation-test.yml @@ -0,0 +1,22 @@ +name: Translation Test + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [15.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: sudo apt-get install -qq gettext + - name: 'translation verification' + run: ./.github/run_translation_verification.sh diff --git a/cards/document-standard/template.hbs b/cards/document-standard/template.hbs index 8be5d157f..a9f3b0402 100644 --- a/cards/document-standard/template.hbs +++ b/cards/document-standard/template.hbs @@ -76,10 +76,12 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}
{{/if}} @@ -95,10 +97,11 @@ {{#if ariaLabel}}aria-label="{{ariaLabel}}"{{/if}}> {{#if (any iconName iconUrl)}}