From cf418176c9547cd5e64f55079b892d34c27360e8 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Wed, 22 Apr 2015 17:30:54 +0200 Subject: manaclock now use manatools catalogue --- lib/ManaTools/Module/Clock.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/ManaTools') diff --git a/lib/ManaTools/Module/Clock.pm b/lib/ManaTools/Module/Clock.pm index 1bb110f..7d0b201 100644 --- a/lib/ManaTools/Module/Clock.pm +++ b/lib/ManaTools/Module/Clock.pm @@ -78,9 +78,19 @@ has 'loc' => ( sub _localeInitialize { my $self = shift; - # TODO fix domain binding for translation - $self->loc(ManaTools::Shared::Locales->new(domain_name => 'libDrakX-standalone') ); - # TODO if we want to give the opportunity to test locally add dir_name => 'path' + my $cmdline = new yui::YCommandLine; + my $locale_dir = undef; + my $pos = $cmdline->find("--locales-dir"); + if ($pos > 0) + { + $locale_dir = $cmdline->arg($pos+1); + } + $self->loc( + ManaTools::Shared::Locales->new( + domain_name => 'manatools', + dir_name => $locale_dir, + ) + ); } has 'sh_gui' => ( -- cgit v1.2.1