aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Shared/Users.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-04-24 11:39:21 +0200
committerAngelo Naselli <anaselli@linux.it>2015-04-24 11:39:21 +0200
commitae3444104b5e0266d8084fad6bd48707ba4a1e15 (patch)
tree868ad6ce7150a4561818396983df2141f8d30a09 /lib/ManaTools/Shared/Users.pm
parenta8bd685879b07b12a1061703a745d27f564a0e75 (diff)
downloadcolin-keep-ae3444104b5e0266d8084fad6bd48707ba4a1e15.tar
colin-keep-ae3444104b5e0266d8084fad6bd48707ba4a1e15.tar.gz
colin-keep-ae3444104b5e0266d8084fad6bd48707ba4a1e15.tar.bz2
colin-keep-ae3444104b5e0266d8084fad6bd48707ba4a1e15.tar.xz
colin-keep-ae3444104b5e0266d8084fad6bd48707ba4a1e15.zip
Added the availability to use --locales-dir
Diffstat (limited to 'lib/ManaTools/Shared/Users.pm')
-rw-r--r--lib/ManaTools/Shared/Users.pm18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/ManaTools/Shared/Users.pm b/lib/ManaTools/Shared/Users.pm
index 83c6061..d9091fb 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?)