File: Rebuild-Transl-_ts-Files.sh

package info (click to toggle)
mp3diags 1.5.01-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 21,120 kB
  • sloc: cpp: 34,487; sh: 316; makefile: 101; xml: 97; python: 14
file content (24 lines) | stat: -rwxr-xr-x 913 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
#!/bin/bash
#
# Rebuilds the _ts files based on the sources.
# Generates an en_UK translation, which contains mixed case words and is meant to detect missing translations.
# Needs a "translations/mp3diags_en_UK.ts" entry in "TRANSLATIONS" in src/src.pro

rm src/translations/mp3diags_en_UK.ts 2>/dev/null

# update / create .ts files
#lupdate src/src.pro 2>&1 | grep -v '^/usr/'
lupdate -no-obsolete src/src.pro 2>&1 | grep -v '^/usr/'

# create the fake en_UK file, for testing translations, but only if it's in src.pro
echo -e '\n\n'
if [ -f src/translations/mp3diags_en_UK.ts ] ; then
    src/translations/autoTransl/MixedCase src/translations/mp3diags_en_UK.ts
    mv -f /tmp/MiXeDcAsE src/translations/mp3diags_en_UK.ts
fi

#create .qm files
lrelease src/src.pro 2>&1 | grep -v '^/usr/'
#lrelease src/translations/mp3diags_*.ts 2>&1 | grep -v '^/usr/'

cp src/translations/*.qm ../mp3diags-build-desktop/bin