aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ManaTools/Shared/GUI.pm19
-rw-r--r--lib/ManaTools/Shared/Services.pm18
-rw-r--r--lib/ManaTools/Shared/TimeZone.pm17
-rw-r--r--lib/ManaTools/Shared/Users.pm18
4 files changed, 55 insertions, 17 deletions
diff --git a/lib/ManaTools/Shared/GUI.pm b/lib/ManaTools/Shared/GUI.pm
index 6c6144d5..ae67c3bc 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
diff --git a/lib/ManaTools/Shared/Services.pm b/lib/ManaTools/Shared/Services.pm
index c0f06c55..0c33fd40 100644
--- a/lib/ManaTools/Shared/Services.pm
+++ b/lib/ManaTools/Shared/Services.pm
@@ -78,11 +78,21 @@ 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') );
- # 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,
+ )
+ );
}
diff --git a/lib/ManaTools/Shared/TimeZone.pm b/lib/ManaTools/Shared/TimeZone.pm
index 936515bb..a380a69a 100644
--- a/lib/ManaTools/Shared/TimeZone.pm
+++ b/lib/ManaTools/Shared/TimeZone.pm
@@ -345,12 +345,21 @@ has 'loc' => (
sub _localeInitialize {
my $self = shift;
- # TODO fix domain binding for translation
- $self->loc(ManaTools::Shared::Locales->new(domain_name => 'libDrakX') );
- # 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 'ntp_servers' => (
traits => ['Hash'],
is => 'rw',
diff --git a/lib/ManaTools/Shared/Users.pm b/lib/ManaTools/Shared/Users.pm
index 83c6061c..d9091fb8 100644
--- a/lib/ManaTools/Shared/Users.pm
+++ b/lib/ManaTools/Shared/Users.pm
@@ -116,11 +116,21 @@ has 'loc' => (
sub _localeInitialize {
- my $self = shift();
+ my $self = shift;
- # TODO fix domain binding for translation
- $self->loc(ManaTools::Shared::Locales->new(domain_name => 'userdrake') );
- # 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,
+ )
+ );
}
## Used by USER (for getting values? TODO need explanations, where?)