File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ if [ x$1 = x--quiet ] ; then
3+ stats=" "
4+ shift
5+ else
6+ stats=" --statistics"
7+ fi
8+
9+ compile () {
10+ lang=` echo $1 | sed ' s@po/\(.*\)\.po@\1@' `
11+ if [ ! -z " $stats " ] ; then
12+ echo -n " $lang : "
13+ fi
14+ mkdir -p locale/$lang /LC_MESSAGES
15+ msgfmt $stats --check -o locale/$lang /LC_MESSAGES/sqlparser.mo $1
16+ return $?
17+ }
18+
19+ if [ ! -z " $1 " ] ; then
20+ compile po/$1 .po
21+ exit $?
22+ fi
23+
24+ result=0
25+ for x in po/* .po ; do
26+ compile $x
27+ ret=$?
28+ if [ $ret != 0 ] ; then
29+ tput setf 4 >&2
30+ echo Error when compiling $x >&2
31+ tput sgr0 >&2
32+ result=$ret
33+ fi
34+ done
35+
36+ exit $result
Original file line number Diff line number Diff line change @@ -41,8 +41,12 @@ for loc in $LOCS ; do
4141 msgmerge --previous -U po/$loc .po po/sqlparser.pot
4242done
4343
44+ # Generate mo files as well
45+ ./scripts/generate-mo
46+
4447# Commit changes
4548git add po/* .po po/sqlparser.pot
46- git commit -s -m ' Update po files
49+ git add locale
50+ git commit -s -m ' Update translations
4751
4852[CI skip]'
You can’t perform that action at this time.
0 commit comments