VDRAdmin-AM-3.4.6 en_US.utf8 locale patch

Message ID 44B898B7.2070303@users.sourceforge.net
State New

Commit Message

Lucian Muresan July 15, 2006, 7:26 a.m. UTC

for those interested in displaying EPG content in UTF-8, but don't care
about a localization of VDRAdmin, you might be interested in this patch.
It will add a script which will generate an en_US.utf8 locale PO-file
right from the POT file (will thus always be up to date), and also add
"en_US.utf8" to the LANG variable in the make.sh and install.sh scripts.
All you have to do after generating the "new" locale is to run "make.sh
po" before installing, that way the new locale will also be compiled
(assumes gettext installed on the system, which shouldn't be a problem).
Then you can configure the en_US.utf8 locale at least from VDRAdmin's
Configuration page, if you don't want to set it globally for your system.
If you want to use a similar technique for a localized VDRAdmin-AM, you
can convert the respective PO-file to UTF-8, let the "ISO-8859-1" msgid
(one of the first messages) map to "UTF-8" and add the new locale to the
build system.

Have phun,

P.S. The other patch is for the current gentoo ebuild, for those
gentoo-ers who can't wait until hd_brummy provides a new one.


diff -Naur vdradmin-am-3.4.6_orig/en_US.utf8.sh vdradmin-am-3.4.6/en_US.utf8.sh
--- vdradmin-am-3.4.6_orig/en_US.utf8.sh	1970-01-01 01:00:00.000000000 +0100
+++ vdradmin-am-3.4.6/en_US.utf8.sh	2006-07-15 01:41:20.000000000 +0200
@@ -0,0 +1,6 @@ 
+rm -f po/en_US.utf8.po
+rm -f po/en_US.utf8.po0
+msginit -i po/vdradmin.pot -o po/en_US.utf8.po0 -l en_US.utf8 --no-translator
+sed -e 's:msgstr "ISO-8859-1":msgstr "UTF-8":g' po/en_US.utf8.po0 > po/en_US.utf8.po
+rm -f po/en_US.utf8.po0
diff -Naur vdradmin-am-3.4.6_orig/install.sh vdradmin-am-3.4.6/install.sh
--- vdradmin-am-3.4.6_orig/install.sh	2006-07-07 11:17:13.000000000 +0200
+++ vdradmin-am-3.4.6/install.sh	2006-07-15 01:32:55.000000000 +0200
@@ -20,7 +20,7 @@ 
-LANGS="de es fi fr nl ru"
+LANGS="de es fi fr nl ru en_US.utf8"
 function usage()
diff -Naur vdradmin-am-3.4.6_orig/make.sh vdradmin-am-3.4.6/make.sh
--- vdradmin-am-3.4.6_orig/make.sh	2006-07-13 16:06:29.000000000 +0200
+++ vdradmin-am-3.4.6/make.sh	2006-07-15 01:32:34.000000000 +0200
@@ -1,6 +1,6 @@ 
-LANGS="de es fr fi nl ru"
+LANGS="de es fr fi nl ru en_US.utf8"
 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"