-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 900 Bytes
/
Copy pathtranslations.yml
File metadata and controls
37 lines (31 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Translations
on:
pull_request:
paths:
- 'languages/*.po'
- 'languages/*.pot'
jobs:
verify-translations:
name: Verify MO Files Updated
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: wp-cli
- name: Compile MO files
run: wp i18n make-mo languages/
- name: Check for uncommitted MO changes
run: |
if git diff --exit-code languages/*.mo; then
echo "✅ MO files are up to date"
else
echo "❌ MO files are outdated! Please run: composer translations"
echo ""
echo "The following MO files need to be recompiled:"
git diff --name-only languages/*.mo
exit 1
fi