Lines 2-9
Link Here
|
2 |
|
2 |
|
3 |
set -e |
3 |
set -e |
4 |
|
4 |
|
|
|
5 |
NAME="koha-common" |
6 |
# Default to "no" |
7 |
AUTOMATIC_TRANSLATIONS_UPDATE="no" |
8 |
|
5 |
. /usr/share/debconf/confmodule |
9 |
. /usr/share/debconf/confmodule |
6 |
|
10 |
|
|
|
11 |
# Read configuration variable file if it is present |
12 |
if [ -r /etc/default/$NAME ]; then |
13 |
. /etc/default/$NAME |
14 |
fi |
15 |
|
7 |
conf=/etc/mysql/koha-common.cnf |
16 |
conf=/etc/mysql/koha-common.cnf |
8 |
if [ ! -e "$conf" ] && [ ! -L "$conf" ] |
17 |
if [ ! -e "$conf" ] && [ ! -L "$conf" ] |
9 |
then |
18 |
then |
Lines 14-19
fi
Link Here
|
14 |
|
23 |
|
15 |
koha-upgrade-schema $(koha-list) |
24 |
koha-upgrade-schema $(koha-list) |
16 |
|
25 |
|
|
|
26 |
if [ "$AUTOMATIC_TRANSLATIONS_UPDATE" = "yes" ]; then |
27 |
for lang in $(koha-translate --list | grep -v -x "en"); do |
28 |
if koha-translate --update $lang; then |
29 |
echo "Updated the $lang translations." |
30 |
else |
31 |
cat <<EOF |
32 |
ERROR: an error was found when updating '$lang' translations. Please manually |
33 |
run 'koha-translate --update $lang'. Run man koha-translate for more options. |
34 |
EOF |
35 |
fi |
36 |
done |
37 |
else |
38 |
# no auto-update, check update needed and warn if needed |
39 |
if koha-translate --list | grep -v -q -x "en"; then |
40 |
# translations installed, update needed |
41 |
cat <<EOF |
42 |
Warning: template translations are not set to be automatically updated. |
43 |
Please manually run 'koha-translate --update lang_code' to update them. |
44 |
|
45 |
You can run 'koha-translate --list' to get a list of the installed translations codes. |
46 |
EOF |
47 |
fi |
48 |
fi |
49 |
|
17 |
db_stop |
50 |
db_stop |
18 |
|
51 |
|
19 |
exit 0 |
52 |
exit 0 |
20 |
- |
|
|