Update locale file path regex to use hyphens

Changed the regular expressions in the workflow to match locale directories using hyphens (e.g., en-US) instead of underscores. This ensures the workflow correctly identifies translation.json files in the updated directory structure.
This commit is contained in:
Ludy87 2025-10-26 11:39:18 +01:00
parent 3ec842f59d
commit 6c1cfeb7bb
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -79,7 +79,7 @@ jobs:
exit 1
fi
# Get changed files and filter for properties files, handle case where no matches are found
gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^frontend/public/locales/[a-zA-Z_]{2}_[a-zA-Z_]{2,7}/translation.json$' > changed_files.txt || echo "No matching properties files found in PR"
gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^frontend/public/locales/[a-zA-Z_]{2}-[a-zA-Z_]{2,7}/translation.json$' > changed_files.txt || echo "No matching properties files found in PR"
# Check if any files were found
if [ ! -s changed_files.txt ]; then
echo "No properties files changed in this PR"
@ -129,7 +129,7 @@ jobs:
const changedFiles = files
.filter(file =>
file.status !== "removed" &&
/^frontend\/public\/locales\/[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\/translation\.json$/.test(file.filename)
/^frontend\/public\/locales\/[a-zA-Z_]{2}-[a-zA-Z_]{2,7}\/translation\.json$/.test(file.filename)
)
.map(file => file.filename);