summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Locale.pm2
-rw-r--r--LedgerSMB/Sysconfig.pm2
-rwxr-xr-xLedgerSMB/User.pm3
3 files changed, 4 insertions, 3 deletions
diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm
index 1d711867..5b1e7568 100644
--- a/LedgerSMB/Locale.pm
+++ b/LedgerSMB/Locale.pm
@@ -32,7 +32,7 @@ use Encode;
Locale::Maketext::Lexicon->import({
'*' => [
- Gettext => "${LedgerSMB::Sysconfig::localepath}/*/LC_MESSAGES/LedgerSMB.mo",
+ Gettext => "${LedgerSMB::Sysconfig::localepath}/*.po",
],
_auto => 1,
_decode => 1,
diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm
index 85d9b359..7c40ca2c 100644
--- a/LedgerSMB/Sysconfig.pm
+++ b/LedgerSMB/Sysconfig.pm
@@ -37,7 +37,7 @@ $check_max_invoices = 5;
$gzip = "gzip -S .gz";
# Path to the translation files
-$localepath = 'locale/mo';
+$localepath = 'locale/po';
# available printers
%printer = ( Laser => 'lpr -Plaser',
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index 47cdad04..19583b57 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -82,9 +82,10 @@ sub country_codes {
# scan the locale directory and read in the LANGUAGE files
opendir DIR, "${LedgerSMB::Sysconfig::localepath}";
- my @dir = grep !/(^\.\.?$|\..*)/, readdir DIR;
+ my @dir = grep !/^\.\.?$/, readdir DIR;
foreach my $dir (@dir) {
+ $dir = substr($dir, 0, -3);
$cc{$dir} = code2language(substr($dir, 0, 2));
$cc{$dir} .= ("/" . code2country(substr($dir, 3, 2)))
if length($dir) > 2;