Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Github action for syncing translation files #557

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/sync_pot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Translations - sync translation files with tomb script

on:
push:
branches: master
paths:
- 'tomb'

jobs:
Translations:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt-get update -y -q
sudo apt-get install -y -q gettext
- name: Run sync script
run: |
cd extras/translations/
./sync_pot_po.sh
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
commit-message: sync translation files
title: '[Chore] sync translation files'
body: >
This PR is auto-generated
9 changes: 9 additions & 0 deletions extras/translations/sync_pot_po.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/sh
# (create a new pot template from the current tomb script via script)
# use the pot file as reference to update all the po files

perl generate_translatable_strings.pl > tomb.pot

for po in ./*.po; do
msgmerge --update ${po} tomb.pot
done