[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3800] branches/1.3
- Subject: SF.net SVN: ledger-smb:[3800] branches/1.3
- From: ..hidden..
- Date: Thu, 06 Oct 2011 22:33:29 +0000
Revision: 3800
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3800&view=rev
Author: einhverfr
Date: 2011-10-06 22:33:29 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Correcting creation issue reported by Herman Vierendeels
Also correcting related issue with translations for new code portions not recognizing user-selected languages
Modified Paths:
--------------
branches/1.3/lsmb-request.pl
branches/1.3/old-handler.pl
Modified: branches/1.3/lsmb-request.pl
===================================================================
--- branches/1.3/lsmb-request.pl 2011-10-06 21:50:01 UTC (rev 3799)
+++ branches/1.3/lsmb-request.pl 2011-10-06 22:33:29 UTC (rev 3800)
@@ -51,9 +51,16 @@
$ENV{SCRIPT_NAME} =~ m/([^\/\\]*.pl)\?*.*$/;
my $script = $1;
-my $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} )
- or $request->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
+my $locale;
+
+if ($request->{_user}){
+ $locale = LedgerSMB::Locale->get_handle($request->{_user}->{language});
+} else {
+ $locale = LedgerSMB::Locale->get_handle( ${LedgerSMB::Sysconfig::language} )
+ or $request->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
+}
+
if (!$script){
$request->error($locale->text('No workflow script specified'));
}
Modified: branches/1.3/old-handler.pl
===================================================================
--- branches/1.3/old-handler.pl 2011-10-06 21:50:01 UTC (rev 3799)
+++ branches/1.3/old-handler.pl 2011-10-06 22:33:29 UTC (rev 3800)
@@ -124,8 +124,10 @@
map { $form->{$_} = $myconfig{$_} } qw(stylesheet timeout)
unless ( $form->{type} eq 'preferences' );
-$locale = LedgerSMB::Locale->get_handle( $myconfig{countrycode} )
- or $form->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
+if ($myconfig{language}){
+ $locale = LedgerSMB::Locale->get_handle( $myconfig{language} )
+ or $form->error( __FILE__ . ':' . __LINE__ . ": Locale not loaded: $!\n" );
+}
# pull in the main code
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.