aboutsummaryrefslogtreecommitdiff
path: root/utils/translations/build-translations.sh
blob: 1a2aa4492f17d608a5717de9a5dfc0075f1f7dfb (plain) (blame)
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
28
29
30
#!/bin/sh

lrelease=`which lrelease 2> /dev/null`
if test -z "$lrelease"
then
  lrelease=`which lrelease-qt4 2> /dev/null`
fi
if test -z "$lrelease"
then
  lrelease=`which lrelease-qt5 2> /dev/null`
fi
if test -z "$lrelease"
then
  echo "lrelease not found"
  exit 1
fi

echo "using $lrelease"
if test -f translations/ready
then
  languages=""
  for language in $(cat translations/ready)
  do
    languages="$languages translations/$language.ts"
  done
else
  languages="translations/*.ts"
fi
"$lrelease" $languages