lars
3500b67a40
refresh link for logs feature change default setting of UseConfigPartition to "0" README file rewritten README.samba added README.davfs added README.Debian rewritten event scripts for samba and apach2_dav improved do not redirect to "disks overview" after successful plugin execution (e.g. date, ...) unclean web dataset fixed removed some non-translateable strings from po and pot files automatically update the cryptobox version according to the debian package version number
36 lines
1.2 KiB
Bash
Executable file
36 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# this script symlinks all cbx po files to thorax' pootle dir
|
|
# it is useful to be root for this - otherwise chown and the pootle restart will fail
|
|
#
|
|
|
|
test $# -ne 1 && echo "Usage: $(basename $0) TARGET_DIR" && exit 1
|
|
|
|
test ! -d "$1" && echo "target directory does not exist: '$1'" && exit 1
|
|
|
|
TARGETPATH=$1
|
|
BASEPATH=$(cd $(dirname "$0")/..; pwd)
|
|
|
|
mkdir -p ${TARGETPATH}/templates
|
|
|
|
for language in `ls ${BASEPATH}/intl/` ; do
|
|
test ! -d "${BASEPATH}/intl/${language}" && continue
|
|
echo "Processing $language ..."
|
|
[ ! -d ${TARGETPATH}/${language} ] && mkdir -p ${TARGETPATH}/${language}
|
|
## base translation
|
|
find ${BASEPATH}/intl/${language} -name \*.po -exec ln -sfn '{}' ${TARGETPATH}/${language}/ \;
|
|
## plugin translations
|
|
for plugin in $(ls ${BASEPATH}/plugins/); do
|
|
test ! -d "${BASEPATH}/plugins/${plugin}" && continue
|
|
find ${BASEPATH}/plugins/${plugin}/intl/${language} -name \*.po -exec ln -sfn '{}' ${TARGETPATH}/${language}/ \;
|
|
done
|
|
done
|
|
|
|
echo "Processing template files ..."
|
|
find ${BASEPATH}/intl ${BASEPATH}/plugins -type f -name \*.pot | while read fname
|
|
do ln -sfn $fname ${TARGETPATH}/templates/
|
|
done
|
|
|
|
chown -R pootle. ${TARGETPATH}
|
|
/etc/init.d/pootle restart
|
|
|