Skip to content

Commit b47b384

Browse files
committed
Add workflow for generating POT file
1 parent 694b9ec commit b47b384

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/generate_pot.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Generate translation template
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "*.md"
7+
types:
8+
- opened
9+
- synchronize
10+
- reopened
11+
push:
12+
paths-ignore:
13+
- "*.md"
14+
branches:
15+
- main
16+
17+
jobs:
18+
generate-pot:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: "Checkout repo"
22+
uses: actions/checkout@v3
23+
24+
- name: "Install gettext"
25+
run: |
26+
sudo apt update -qq
27+
sudo apt install -y gettext
28+
29+
- name: "Generate POT file using xgettext"
30+
run: >
31+
find src -name *.cpp -o -name *.hpp -o -name *.h |
32+
xargs xgettext --from-code=utf-8
33+
-k_ -kwxTRANSLATE -w 100
34+
--check=space-ellipsis --omit-header
35+
-o cemu.pot
36+
37+
- name: Upload artifact
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: POT file
41+
path: ./cemu.pot
42+
if-no-files-found: error

0 commit comments

Comments
 (0)