File: update_translations.sh

package info (click to toggle)
mcomix 1.2.1mcomix3+git20200206-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 6,604 kB
  • sloc: python: 17,232; xml: 52; sh: 11; makefile: 7
file content (17 lines) | stat: -rwxr-xr-x 691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
ROOTDIR="mcomix/mcomix"
VERSION=$(grep VERSION $ROOTDIR/constants.py | sed -e "s/VERSION = //" -e "s/'//g")
MAINTAINER="NAME@HO.ST"

xgettext -LPython -omcomix.pot -p$ROOTDIR/messages/ -cTRANSLATORS \
    --from-code=utf-8 --package-name=MComix --package-version=${VERSION} \
    --msgid-bugs-address=${MAINTAINER} \
    $ROOTDIR/*.py $ROOTDIR/archive/*.py $ROOTDIR/library/*.py

for pofile in $ROOTDIR/messages/*/LC_MESSAGES/*.po
do
    # Merge message files with master template, no fuzzy matching (-N)
    msgmerge -U --backup=none ${pofile} $ROOTDIR/messages/mcomix.pot
    # Compile translation, add "-f" to include fuzzy strings
    #msgfmt ${pofile} -o ${pofile%.*}.mo
done