Hide rejected veteran/priority claims (#10764) #12984
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Translations | |
on: | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/translations.yml | |
- packages/** | |
- apps/** | |
pull_request: | |
paths: | |
- .github/workflows/translations.yml | |
- apps/** | |
- packages/** | |
merge_group: | |
branches: [main] | |
jobs: | |
translations: | |
name: Translations | |
runs-on: ubuntu-22.04 | |
env: | |
PNPM_VERSION: "8.15.7" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "./.nvmrc" | |
cache: pnpm | |
- name: "Install dependencies: workspace" | |
working-directory: ./ | |
run: pnpm install | |
- name: "Extract English files: all workspaces" | |
working-directory: ./ | |
run: pnpm run intl-extract | |
- name: "Generate untranslated files: all workspaces" | |
working-directory: ./ | |
run: | | |
pnpm run check-intl --force | |
- name: "Verify no untranslated file: i18n" | |
if: always() | |
working-directory: packages/i18n/src/lang | |
run: > | |
if test -f "untranslated.json"; then | |
echo ":x: i18n has untranslated strings" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 1; | |
else | |
echo ":heavy_check_mark: i18n is fully translated" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 0; | |
fi | |
- name: "Verify clean file: i18n" | |
if: always() | |
working-directory: packages/i18n/src/lang | |
run: > | |
if [[ "$(git status --porcelain)" == *packages/i18n/src/lang/fr.json* ]]; then | |
echo ":x: i18n is dirty" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 1; | |
else | |
echo ":heavy_check_mark: i18n is clean" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 0; | |
fi | |
- name: "Verify no untranslated file: web" | |
if: always() | |
working-directory: apps/web/src/lang | |
run: > | |
if test -f "untranslated.json"; then | |
echo ":x: Web has untranslated strings" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 1; | |
else | |
echo ":heavy_check_mark: Web is fully translated" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 0; | |
fi | |
- name: "Verify clean file: web" | |
if: always() | |
working-directory: apps/web/src/lang | |
run: > | |
if [[ "$(git status --porcelain)" == *apps/web/src/lang/fr.json* ]]; then | |
echo ":x: Web is dirty" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 1; | |
else | |
echo ":heavy_check_mark: Web is clean" | tee -a $GITHUB_STEP_SUMMARY; | |
exit 0; | |
fi | |
- name: "Upload untranslated files: all workspaces" | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: untranslated | |
path: | | |
apps/**/lang/untranslated.json | |
packages/**/lang/untranslated.json | |
!packages/node_modules/** | |
if-no-files-found: ignore |