Translated using Weblate (Slovenian)
[phpmyadmin.git] / scripts / generate-mo
blob9e16927d97d856917dd0bbde0c71558dc9811eb5
1 #!/bin/sh
2 if [ x$1 = x--quiet ] ; then
3 stats=""
4 shift
5 else
6 stats="--statistics"
7 fi
9 compile() {
10 lang=`echo $1 | sed 's@po/\(.*\)\.po@\1@'`
11 if [ ! -z "$stats" ] ; then
12 echo -n "$lang: "
14 mkdir -p locale/$lang/LC_MESSAGES
15 msgfmt $stats --check -o locale/$lang/LC_MESSAGES/phpmyadmin.mo $1
16 return $?
19 if [ ! -z "$1" ] ; then
20 compile po/$1.po
21 exit $?
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
34 done
36 exit $result