[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [304] trunk/LedgerSMB



Revision: 304
          http://svn.sourceforge.net/ledger-smb/?rev=304&view=rev
Author:   tetragon
Date:     2006-10-25 13:02:57 -0700 (Wed, 25 Oct 2006)

Log Message:
-----------
Switching locales over to using the .po files directly

Modified Paths:
--------------
    trunk/LedgerSMB/Locale.pm
    trunk/LedgerSMB/Sysconfig.pm
    trunk/LedgerSMB/User.pm

Modified: trunk/LedgerSMB/Locale.pm
===================================================================
--- trunk/LedgerSMB/Locale.pm	2006-10-25 14:31:33 UTC (rev 303)
+++ trunk/LedgerSMB/Locale.pm	2006-10-25 20:02:57 UTC (rev 304)
@@ -32,7 +32,7 @@
 
 Locale::Maketext::Lexicon->import({
 	'*' => [
-		Gettext => "${LedgerSMB::Sysconfig::localepath}/*/LC_MESSAGES/LedgerSMB.mo",
+		Gettext => "${LedgerSMB::Sysconfig::localepath}/*.po",
 	],
 	_auto => 1,
 	_decode => 1,

Modified: trunk/LedgerSMB/Sysconfig.pm
===================================================================
--- trunk/LedgerSMB/Sysconfig.pm	2006-10-25 14:31:33 UTC (rev 303)
+++ trunk/LedgerSMB/Sysconfig.pm	2006-10-25 20:02:57 UTC (rev 304)
@@ -37,7 +37,7 @@
 $gzip = "gzip -S .gz";
 
 # Path to the translation files
-$localepath = 'locale/mo';
+$localepath = 'locale/po';
 
 # available printers
 %printer = ( Laser	=> 'lpr -Plaser',

Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm	2006-10-25 14:31:33 UTC (rev 303)
+++ trunk/LedgerSMB/User.pm	2006-10-25 20:02:57 UTC (rev 304)
@@ -82,9 +82,10 @@
 	# 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.