Skip to content

Commit 7c43c58

Browse files
authored
Add zero-width space checker in CI
1 parent 7573423 commit 7c43c58

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,26 @@ jobs:
164164
with:
165165
name: ${{ inputs.version }}-lint-logs
166166
path: logs/*
167+
168+
169+
# Check for zero-width space charcters in translations.
170+
# These are known to come together with (some?) machine translation like Google translate,
171+
# and - as one of the consequences - it may avoid Transifex glossary matching (e.g. variáveis)
172+
zero-width-space:
173+
name: Check for zero-width space characters
174+
runs-on: ubuntu-latest
175+
steps:
176+
- uses: actions/checkout@v4
177+
with:
178+
ref: ${{ inputs.version }}
179+
180+
- name: Make sure the repository is up to date
181+
if: github.event_name != 'pull_request'
182+
run: git pull --rebase
183+
184+
- name: Remove zero-width space characters
185+
run: |
186+
sed -i 's/\xe2\x80\x8b//g' *.po **/*.po
187+
188+
- name: Show difference (error if there is any)
189+
git diff --exit-code

0 commit comments

Comments
 (0)