aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/GUI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ManaTools/Shared/GUI.pm')
-rw-r--r--lib/ManaTools/Shared/GUI.pm19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/ManaTools/Shared/GUI.pm b/lib/ManaTools/Shared/GUI.pm
index 6c6144d..ae67c3b 100644
--- a/lib/ManaTools/Shared/GUI.pm
+++ b/lib/ManaTools/Shared/GUI.pm
@@ -70,14 +70,23 @@ has 'loc' => (
);
sub _localeInitialize {
- my $self = shift();
+ 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,
+ )
+ );
}
-
#=============================================================
=head2 warningMsgBox