CI: minor translation fixes
This commit is contained in:
parent
7a6177532b
commit
e948445f6e
1 changed files with 15 additions and 6 deletions
21
.github/workflows/translation-ai-check.yml
vendored
21
.github/workflows/translation-ai-check.yml
vendored
|
|
@ -4,8 +4,6 @@ on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
paths:
|
|
||||||
- 'src/i18n/**'
|
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
@ -29,11 +27,22 @@ jobs:
|
||||||
AI_PROMPT: Translation patch below.
|
AI_PROMPT: Translation patch below.
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: changes
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
i18n:
|
||||||
|
- 'src/i18n/**'
|
||||||
|
|
||||||
|
- name: Stop if i18n not changed
|
||||||
|
if: steps.changes.outputs.i18n != 'true'
|
||||||
|
run: echo "No i18n changes in this PR; skipping." && exit 0
|
||||||
|
|
||||||
- name: Determine PR number
|
- name: Determine PR number
|
||||||
id: pr
|
id: pr
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
|
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
|
||||||
echo "number=${{ github.event.pull_request_target.number }}" >> "$GITHUB_OUTPUT"
|
echo "number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
|
echo "number=${{ github.event.issue.number }}" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
@ -112,9 +121,9 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If failed, add a note
|
# If failed, add a note
|
||||||
$ADDITIONAL_NOTE = ""
|
ADDITIONAL_NOTE=""
|
||||||
if [[ $COMMENT == *"not ok"* ]]; then
|
if [[ "$COMMENT" == *"not ok"* ]]; then
|
||||||
$ADDITIONAL_NOTE = "\n\nPlease note this check is a guideline, not a hard requirement. It is here to help you translate. If you disagree with some points, just state that. Any typos should be fixed."
|
ADDITIONAL_NOTE="\n\nPlease note this check is a guideline, not a hard requirement. It is here to help you translate. If you disagree with some points, just state that. Any typos should be fixed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Post the review as a PR comment
|
# Post the review as a PR comment
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue