diff options
-rw-r--r-- | lib/ManaTools/Module/Clock.pm | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/ManaTools/Module/Clock.pm b/lib/ManaTools/Module/Clock.pm index 1bb110fd..7d0b2012 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' => ( |