summaryrefslogtreecommitdiff
path: root/make.sh
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2006-09-06 12:55:02 +0200
committerAndreas Mair <amair.sob@googlemail.com>2006-09-06 12:55:02 +0200
commitb689d61d6a800ef8a74f74f08f05218770e0f52d (patch)
treeda884f9eb3c93b66e60a361e3e730a044533d0f4 /make.sh
parent8652aa0a9b228e21df5dd68ccf83badb5e20bab8 (diff)
downloadvdradmin-am-3.4.7beta.tar.gz
vdradmin-am-3.4.7beta.tar.bz2
2006-09-06: 3.4.7betav3.4.7beta
- Fixed: Smaller bugs (see ChangeLog). - Changed: Hide select boxes for templates and skins if it contains only a single choice. - Fixed: Another fix for the refering pages problem(s). - Changed: Hide "AutoTimer" menu item unless $FEATURE{AUTOTIMER} is set. - Changed: Use date instead of empty subtitle in timers programed by AutoTimer with activated "Episode" option. - Fixed: Don't show outdated broadcast as search result. - Added: Display warning message if lists is empty. - Added: UTF8 locales patch by Zoolook (see Bug #124). - Fixed: AutoTimer test feature didn't find broadcasts if they were in vdradmind.done. - Removed: HTML::Template dependency. - Changed: Only use Template-Toolkit's Template.pm. - Fixed: Hide "switch" button in prog_summary2 if broadcast is not running (Based on suggestion by Hardy Flor). - Fixed: Initial display of rec_list was empty. - Added: New PLAY and EDIT actions in rec_list. - Added: Remember selected size and interval in TV. - Added: check for features available with VDR's SVDRP, disable missing ones and show them in about.html (ATM used for RENR). - Changed: handling of sorting in rec_list (should always keep the current sorting). - Changed: handling of sorting in at_timer_list (should always keep the current sorting). - New: option to autosave config on exit (also saves sorting state in lists and viewmode in prog_summary). - Added: Czech translation (Submitted by Karel Borkovec). - Changed: handling of sorting in timer_list (should always keep the current sorting). - Changed: Moved favicon.ico from a template's skin folder to the template's main folder.
Diffstat (limited to 'make.sh')
-rwxr-xr-xmake.sh110
1 files changed, 107 insertions, 3 deletions
diff --git a/make.sh b/make.sh
index 5d610cc..d5fedba 100755
--- a/make.sh
+++ b/make.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-LANGS="de es fr fi nl ru"
-DIST_FILES="COPYING CREDITS FAQ HISTORY INSTALL README README.translators REQUIREMENTS contrib convert.pl install.sh lib locale make.sh template uninstall.sh vdradmind.pl vdradmind.pl.1"
+LANGS="cs de es fr fi nl ru"
+DIST_FILES="ChangeLog COPYING CREDITS FAQ HISTORY INSTALL README README.translators REQUIREMENTS contrib convert.pl install.sh lib locale make.sh template uninstall.sh vdradmind.pl vdradmind.pl.1"
INSTALL_SH=./install.sh
+CVS2CL="./cvs2cl.pl" # get it at http://www.red-bean.com/cvs2cl/
TMPDIR=/tmp
@@ -16,6 +17,9 @@ function Usage()
echo " uninstall - uninstall VDRAdmin-AM"
echo " po - convert .po files to .mo files"
echo " dist - create distribution archive"
+ echo " utf8add - generate utf8 locales from existing locales"
+ echo " utf8clean - cleanup utf8 locales"
+ echo " cl - create ChangeLog file."
exit 1
}
@@ -31,7 +35,9 @@ function Error()
#
function do_po()
{
- for L in $LANGS
+ local additional_langs="$(get_utf8_LANGS)"
+ local all_langs="$LANGS $additional_langs"
+ for L in $all_langs
do
[ -d locale/$L/LC_MESSAGES/ ] || mkdir -p locale/$L/LC_MESSAGES/
msgfmt po/$L.po -o po/$L.mo
@@ -73,6 +79,88 @@ function do_dist()
mv $TMPDIR/$DIST_NAME.tar.bz2 .
}
+# determine additional (utf8-)languages
+#
+function get_utf8_LANGS()
+{
+ ( cd po
+ local UTF8LANGS
+ local UTF8LANG
+ for file in *.utf8.po; do
+ [ -e $file ] || continue
+ UTF8LANG=${file%.po}
+ UTF8LANGS="$UTF8LANGS $UTF8LANG"
+ done
+ echo $UTF8LANGS
+ )
+}
+
+# extract original character encoding
+#
+function getOrigEncoding()
+{
+ local ENC=$(grep 'msgstr "ISO-8859' $1)
+ # strip away "ISO-", because sometimes we need it as "iso"
+ ENC=${ENC/'msgstr "ISO-'/}
+ ENC=${ENC/'"'/}
+ echo $ENC
+}
+
+
+# cleanup utf8 locales
+#
+function do_utf8_clean()
+{
+ (cd po && rm -f *.utf8.po*)
+}
+
+# generate utf8 locales
+#
+function do_utf8_generate()
+{
+ # start clean
+ do_utf8_clean
+
+ ( cd po
+ local filename
+ local encoding
+ local newfilename
+
+ # generate utf8 locales for existing translations
+ for file in *.po; do
+ [ -e $file ] || continue
+ filename=${file%.po}
+ encoding=iso$(getOrigEncoding $filename.po)
+ newfilename=$(echo $filename | tr [:lower:] [:upper:])
+ if [ "${encoding}" = "iso8859-1" ]; then
+ # just copy
+ cp $filename.po ${filename}_$newfilename.utf8.po ;
+ else
+ # convert
+ iconv -f $encoding -t utf-8 $filename.po > ${filename}_$newfilename.utf8.po
+ fi
+ done
+
+ # generate us_US.utf8.po from POT template
+ msginit -i vdradmin.pot -o en_US.utf8.po -l en_US.utf8 --no-translator
+
+ # map ISO-8859-1 encoding to UTF-8 instead of the respective "old" encodings
+ for file in $(ls *.utf8.po); do
+ encoding=ISO-$(getOrigEncoding $file)
+ sed -e 's:msgstr "'$encoding'":msgstr "UTF-8":g' $file > $file.tmp
+ mv $file.tmp $file
+ done
+ )
+}
+
+# create ChangeLog file.
+#
+function do_cl()
+{
+ [ -x $CVS2CL ] || Error "Missing $CVS2CL (http://www.red-bean.com/cvs2cl/)"
+ $CVS2CL --FSF --separate-header --no-wrap --no-times --tagdates --log-opts "-d>2006-07-08"
+}
+
[ "$1" ] || Usage
[ -x $INSTALL_SH ] || Error "$INSTALL_SH not found!"
@@ -96,9 +184,25 @@ do
;;
dist)
+ do_utf8_clean
+ do_cvs
+ do_po
+ do_cl
do_dist
;;
+ utf8add)
+ do_utf8_generate
+ ;;
+
+ utf8clean)
+ do_utf8_clean
+ ;;
+
+ cl)
+ do_cl;
+ ;;
+
*)
Error "Unknown command \"$1\""
;;