Skip to content

Commit 616a654

Browse files
authored
Add zero-width space checker in CI (#264)
* Add zero-width space checker in CI * Add missing 'run' to step * Colorize the git output * Use word-diff instead of line diff
1 parent 7573423 commit 616a654

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/check.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,27 @@ 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+
run: |
190+
git diff --exit-code --color-words

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy