[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [303] trunk
- Subject: SF.net SVN: ledger-smb: [303] trunk
- From: ..hidden..
- Date: Wed, 25 Oct 2006 07:31:37 -0700
Revision: 303
http://svn.sourceforge.net/ledger-smb/?rev=303&view=rev
Author: tetragon
Date: 2006-10-25 07:31:33 -0700 (Wed, 25 Oct 2006)
Log Message:
-----------
Display error instead of dying horribly when locale not found
Modified Paths:
--------------
trunk/bin/admin.pl
trunk/bin/login.pl
trunk/bin/oe.pl
trunk/menu.pl
Modified: trunk/bin/admin.pl
===================================================================
--- trunk/bin/admin.pl 2006-10-25 05:53:58 UTC (rev 302)
+++ trunk/bin/admin.pl 2006-10-25 14:31:33 UTC (rev 303)
@@ -43,7 +43,8 @@
$form = new Form;
-$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language});
+$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language}) or
+ $form->error("Locale not loaded: $!\n");
$locale->encoding('UTF-8');
$form->{charset} = 'UTF-8';
#$form->{charset} = $locale->encoding;
Modified: trunk/bin/login.pl
===================================================================
--- trunk/bin/login.pl 2006-10-25 05:53:58 UTC (rev 302)
+++ trunk/bin/login.pl 2006-10-25 14:31:33 UTC (rev 303)
@@ -47,7 +47,8 @@
$form = new Form;
-$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language});
+$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language}) or
+ $form->error("Locale not loaded: $!\n");
$locale->encoding('UTF-8');
$form->{charset} = 'UTF-8';
#$form->{charset} = $locale->encoding;
Modified: trunk/bin/oe.pl
===================================================================
--- trunk/bin/oe.pl 2006-10-25 05:53:58 UTC (rev 302)
+++ trunk/bin/oe.pl 2006-10-25 14:31:33 UTC (rev 303)
@@ -1945,7 +1945,8 @@
$form->{type} = "invoice";
# locale messages
- $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode});
+ $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}) or
+ $form->error("Locale not loaded: $!\n");
#$form->{charset} = $locale->encoding;
$form->{charset} = 'UTF-8';
$locale->encoding('UTF-8');
Modified: trunk/menu.pl
===================================================================
--- trunk/menu.pl 2006-10-25 05:53:58 UTC (rev 302)
+++ trunk/menu.pl 2006-10-25 14:31:33 UTC (rev 303)
@@ -87,7 +87,8 @@
# check for user config file, could be missing or ???
eval { require("$userspath/$form->{login}.conf"); };
if ($@) {
- $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode});
+ $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}) or
+ $form->error("Locale not loaded: $!\n");
$form->{charset} = $locale->encoding;
$form->{charset} = 'UTF-8';
$locale->encoding('UTF-8');
@@ -99,7 +100,8 @@
}
# locale messages
-$locale = LedgerSMB::Locale->get_handle($myconfig{countrycode});
+$locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}) or
+ $form->error("Locale not loaded: $!\n");
#$form->{charset} = $locale->encoding;
$form->{charset} = 'UTF-8';
$locale->encoding('UTF-8');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.