diff --git a/.github/workflows/check-i18n.yml b/.github/workflows/check-i18n.yml new file mode 100644 index 000000000000..43ce869eb2f2 --- /dev/null +++ b/.github/workflows/check-i18n.yml @@ -0,0 +1,13 @@ +name: i18n + +on: + pull_request: + +jobs: + i18n-check: + name: I18N check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: scripts/i18n-check.sh -u + - run: .github/workflows/scripts/i18n-check-helper.sh diff --git a/.github/workflows/pr-actions.yml b/.github/workflows/pr-actions.yml index 360287437cf9..57fffbee6d7a 100644 --- a/.github/workflows/pr-actions.yml +++ b/.github/workflows/pr-actions.yml @@ -31,7 +31,7 @@ jobs: run: | PR_ACTION=$(echo $COMMENT | grep -oP '/fix:\K\w+') echo "Action is $PR_ACTION" - ACTION_NAMES="all|dict|filenames|format|markdown|refcache|submodules" + ACTION_NAMES="all|dict|filenames|format|i18n|markdown|refcache|submodules|text" if [[ ! "$PR_ACTION" =~ ^($ACTION_NAMES)$ ]]; then echo "Invalid action name: $PR_ACTION" echo "Action name should be one of: $ACTION_NAMES" diff --git a/.github/workflows/scripts/i18n-check-helper.sh b/.github/workflows/scripts/i18n-check-helper.sh new file mode 100755 index 000000000000..8887a0dcf45e --- /dev/null +++ b/.github/workflows/scripts/i18n-check-helper.sh @@ -0,0 +1,26 @@ +#!/bin/bash -e + +echo "For localization docs, see https://opentelemetry.io/docs/contributing/localization" + +CHANGES=`git status --porcelain` + +if [[ -z $CHANGES ]]; then + echo "All localization pages have the requisit commit hash. <3" + exit; +fi + +cat <