This repository was archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-lang
More file actions
executable file
·91 lines (88 loc) · 1.84 KB
/
make-lang
File metadata and controls
executable file
·91 lines (88 loc) · 1.84 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
###################
# make-lang
# © 2010 Rainer Piechura
# rainer@piechura.de
# Changes the default languages of the vdr
# for the Siemens Gigaset m7xx Box
###################
LANG=$1
#
# check Language de|fr|en
#
if [ ! "$LANG" == "de" ] && [ ! "$LANG" == "fr" ] && [ !"$LANG" == "en" ]
then
echo "Invalid Language, Usage: $0 de|fr|en "
exit
fi
#
# Path of script etc.
#
BASE="${0%/*}"
CONFDIR="$BASE/VDR-NG-FW"
VDRCONFDIR="$CONFDIR/prg-fw-configs/vdr-m7x0/common/etc/vdr"
PLUGINDIR="$VDRCONFDIR/plugins"
SETUP="$VDRCONFDIR/setup.conf"
RUNVDR="$VDRCONFDIR/runvdr"
WEBIF="$CONFDIR/buildin/base-pro/common/etc/webif/webif.conf"
echo "Preparing vdr for Language: $LANG"
if [ $LANG = "de" ]
then
LANG_S="deu"
LANG_LC="de_DE"
LANG_OSD="1"
LANG_WEB="1"
fi
if [ $LANG = "fr" ]
then
LANG_S="fra"
LANG_LC="fr_FR"
LANG_OSD="6"
LANG_WEB="3"
fi
if [ $LANG = "en" ]
then
LANG_S="eng"
LANG_LC="en_US"
LANG_OSD="0"
LANG_WEB="0"
fi
#
# Change VDR Languages
#
sed -i -e "s/^AudioLanguages.*/AudioLanguages = $LANG_S/" $SETUP
sed -i -e "s/^EPGLanguages.*/EPGLanguages = $LANG_S/" $SETUP
sed -i -e "s/^OSDLanguage.*/OSDLanguage = $LANG_OSD/" $SETUP
#
# Change runvdr
#
sed -i -e "s/^export LC_ALL.*/export LC_ALL=$LANG_LC/" $RUNVDR
#
# Change WebIf
#
sed -i -e "s/^default language.*/default language = $LANG_WEB/" $WEBIF
#
# Change Setup Plugin
#
cp $PLUGINDIR/setup/open7x0-setup.xml $PLUGINDIR/setup/open7x0-setup_$LANG_S.xml
#
# Change Help Plugin
#
if [ -d $PLUGINDIR/help/esl ]
then
rm -rf $PLUGINDIR/help/esl
fi
if [ -d $PLUGINDIR/help/$LANG_S ]
then
:
else
mkdir $PLUGINDIR/help/$LANG_S
cp $BASE/VDR-Plugins/Config-dir/plugins/help/eng/* $PLUGINDIR/help/$LANG_S/
fi
#
# Change Epgsearch Plugin
#
if [ -d $BASE/VDR-Plugins/Config-dir/plugins/epgsearch/$LANG_S/* ]
then
cp -f $BASE/VDR-Plugins/Config-dir/plugins/epgsearch/$LANG_S/* $PLUGINDIR/epgsearch/
fi