File: update-translations.sh

package info (click to toggle)
rednotebook 2.29.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,704 kB
  • sloc: python: 9,377; javascript: 4,103; xml: 155; sh: 68; makefile: 11
file content (27 lines) | stat: -rwxr-xr-x 696 bytes parent folder | download
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
#!/bin/bash

set -exuo pipefail

cd "$(dirname "$0")"
cd ../

git switch master

# Merge translations before updating po/pot files to avoid merge conflicts.
# The workflow is based on https://github.com/WeblateOrg/weblate/issues/1847#issuecomment-415715912
# Ignore returncode if no changes need to be merged.
wlc lock
wlc commit
set +e
git fetch weblate && git merge --ff --squash weblate/master && git commit po/ -m "Update translations." && git push
set -e
wlc reset
wlc unlock

# Regenerate .pot file manually.
#    # Ignore returncode if no changes need to be committed.
#    ./dev/generate-pot.sh
#    set +e
#    git commit po/ -m "Update translation templates."
#    set -e
#    git push