use Packages::Config qw( $TOPDIR @LANGUAGES );
use Packages::I18N::Locale;
&Packages::Config::init( './' );
+&Packages::I18N::Locale::load( "$TOPDIR/po" );
my $debtagsdir = "$TOPDIR/files/debtags";
my $wwwdir = "$TOPDIR/www/about";
my $voc_file = "$debtagsdir/vocabulary";
use Packages::Config qw( $DBDIR @SUITES @ARCHIVES @SECTIONS
@ARCHITECTURES %FTP_SITES
@LANGUAGES @DDTP_LANGUAGES);
-use Packages::I18N::Locale;
use Packages::CGI qw( :DEFAULT make_url make_search_url );
use Packages::DB;
use Packages::Search qw( :all );
use warnings;
use base 'Locale::Maketext';
-use Locale::Maketext::Lexicon {
- 'en' => [Gettext => '/home/djpig/debian/www.d.o/packages/po/pdo.pot',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/templates.pot',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/langs.pot',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/sections.pot',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/debtags.pot'],
- '*' => [Gettext => '/home/djpig/debian/www.d.o/packages/po/pdo.*.po',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/templates.*.po',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/langs.*.po',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/sections.*.po',
- Gettext => '/home/djpig/debian/www.d.o/packages/po/debtags.*.po'],
- _auto => 1,
- _style => 'gettext',
-};
+use Locale::Maketext::Lexicon;
use base 'Exporter';
our @EXPORT = qw( N_ );
+sub load {
+ my ($podir) = @_;
+
+ Locale::Maketext::Lexicon->import( {
+ 'en' => [Gettext => "$podir/pdo.pot",
+ Gettext => "$podir/templates.pot",
+ Gettext => "$podir/langs.pot",
+ Gettext => "$podir/sections.pot",
+ Gettext => "$podir/debtags.pot"],
+ '*' => [Gettext => "$podir/pdo.*.po",
+ Gettext => "$podir/templates.*.po",
+ Gettext => "$podir/langs.*.po",
+ Gettext => "$podir/sections.*.po",
+ Gettext => "$podir/debtags.*.po"],
+ _auto => 1,
+ _style => 'gettext',
+ } );
+}
+
sub N_ { return $_[0]; }
sub g {