From 70f1a38b1411b55f7690bdd42800038c27040dd5 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 17 Nov 2007 17:54:06 +0100 Subject: [PATCH] Remove all uses of $localedir All users use the .po files directly now, not the .mo files --- bin/create_index_pages | 2 +- bin/parse-debtags-voc | 2 +- config.sh.sed.in | 1 - cron.d/500update_mo | 15 --------------- lib/Packages/Config.pm | 7 +++---- lib/Packages/Dispatcher.pm | 2 +- 6 files changed, 6 insertions(+), 23 deletions(-) diff --git a/bin/create_index_pages b/bin/create_index_pages index 973dff7..6dd32a3 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -13,7 +13,7 @@ use Compress::Zlib; use lib './lib'; -use Packages::Config qw( $TOPDIR $DBDIR @ARCHIVES @SUITES @LANGUAGES $LOCALES); +use Packages::Config qw( $TOPDIR $DBDIR @ARCHIVES @SUITES @LANGUAGES ); use Packages::Template; use Packages::I18N::Locale; use Packages::Page; diff --git a/bin/parse-debtags-voc b/bin/parse-debtags-voc index 7ef06a0..4fd49f9 100755 --- a/bin/parse-debtags-voc +++ b/bin/parse-debtags-voc @@ -31,7 +31,7 @@ use URI::Escape; use Deb::Versions; use Packages::Template; -use Packages::Config qw( $TOPDIR @LANGUAGES $LOCALES); +use Packages::Config qw( $TOPDIR @LANGUAGES ); use Packages::I18N::Locale; &Packages::Config::init( './' ); my $debtagsdir = "$TOPDIR/files/debtags"; diff --git a/config.sh.sed.in b/config.sh.sed.in index 42978b7..bea71b8 100644 --- a/config.sh.sed.in +++ b/config.sh.sed.in @@ -11,7 +11,6 @@ filesdir=${topdir}/files htmldir=${topdir}/www archivedir=${topdir}/archive podir=${topdir}/po -localedir=%TOPDIR%/locale staticdir=${topdir}/static configdir=${topdir}/conf templatedir=${topdir}/templates diff --git a/cron.d/500update_mo b/cron.d/500update_mo index 4bdc625..89f5452 100755 --- a/cron.d/500update_mo +++ b/cron.d/500update_mo @@ -96,18 +96,3 @@ do done fi done - -echo -# Update mo -# -test -d ${localedir} || mkdir -p ${localedir} -for lang in ${polangs} -do - test -d ${localedir}/${lang}/LC_MESSAGES \ - || mkdir -p ${localedir}/${lang}/LC_MESSAGES - for domain in ${podomains} - do - echo domain=$domain language=$lang - msgfmt --statistics -o ${localedir}/${lang}/LC_MESSAGES/${domain}.mo ${domain}.${lang}.po - done -done diff --git a/lib/Packages/Config.pm b/lib/Packages/Config.pm index 96f8b67..b4ab332 100644 --- a/lib/Packages/Config.pm +++ b/lib/Packages/Config.pm @@ -9,11 +9,11 @@ use Packages::CGI qw( :DEFAULT error ); our @ISA = qw( Exporter ); our ( $TOPDIR, $DBDIR, $TEMPLATEDIR, $CACHEDIR, $ROOT, - @LANGUAGES, @DDTP_LANGUAGES, $LOCALES, + @LANGUAGES, @DDTP_LANGUAGES, @SUITES, @SECTIONS, @ARCHIVES, @ARCHITECTURES, @PRIORITIES, %FTP_SITES ); our @EXPORT_OK = qw( $TOPDIR $DBDIR $TEMPLATEDIR $CACHEDIR $ROOT - @LANGUAGES @DDTP_LANGUAGES $LOCALES + @LANGUAGES @DDTP_LANGUAGES @SUITES @SECTIONS @ARCHIVES @ARCHITECTURES @PRIORITIES %FTP_SITES ); our %EXPORT_TAGS = ( all => [ @EXPORT_OK ] ); @@ -35,7 +35,6 @@ sub init { $TEMPLATEDIR = $1 if /^\s*templatedir="?([^\"]*)"?\s*$/o; $CACHEDIR = $1 if /^\s*cachedir="?([^\"]*)"?\s*$/o; $ROOT = $1 if /^\s*root="?([^\"]*)"?\s*$/o; - $LOCALES = $1 if /^\s*localedir="?([^\"]*)"?\s*$/o; $FTP_SITES{us} = $1 if /^\s*ftpsite="?([^\"]*)"?\s*$/o; $FTP_SITES{$1} = $2 if /^\s*(\w+)_ftpsite="?([^\"]*)"?\s*$/o; @LANGUAGES = split(/\s+/, $1) if /^\s*polangs="?([^\"]*)"?\s*$/o; @@ -46,7 +45,7 @@ sub init { @ARCHITECTURES = split(/\s+/, $1) if /^\s*architectures="?([^\"]*)"?\s*$/o; @PRIORITIES = split(/\s+/, $1) if /^\s*priorities="?([^\"]*)"?\s*$/o; } - foreach (($TEMPLATEDIR, $CACHEDIR, $LOCALES)) { + foreach (($TEMPLATEDIR, $CACHEDIR)) { s/\$\{?topdir\}?/$TOPDIR/g; } close (C); diff --git a/lib/Packages/Dispatcher.pm b/lib/Packages/Dispatcher.pm index e9b406f..4d5e16e 100755 --- a/lib/Packages/Dispatcher.pm +++ b/lib/Packages/Dispatcher.pm @@ -34,7 +34,7 @@ use I18N::AcceptLanguage; use Deb::Versions; use Packages::Config qw( $DBDIR $ROOT $TEMPLATEDIR $CACHEDIR @SUITES @SECTIONS @ARCHIVES @ARCHITECTURES @PRIORITIES - @LANGUAGES @DDTP_LANGUAGES $LOCALES ); + @LANGUAGES @DDTP_LANGUAGES ); use Packages::CGI qw( :DEFAULT error get_all_messages ); use Packages::DB; use Packages::Search qw( :all ); -- 2.39.2