summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-08 05:06:56 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-08 05:06:56 +0000
commit54f9a9f0c03be76ad598509a922aa6b74f3b9420 (patch)
tree4529133b718159c48536378d152f660e6f12f01e
parente693a8071c7c1284da2b3718f05abdb1782c5d9b (diff)
Adding pod to Locale.pm
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1168 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB.pm2
-rw-r--r--LedgerSMB/Locale.pm53
-rw-r--r--t/01-load.t3
3 files changed, 47 insertions, 11 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index b4f8316a..759ba7d8 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -3,7 +3,7 @@
LedgerSMB The Base class for many LedgerSMB objects, including DBObject.
-=head1 SYOPSIS
+=head1 SYNOPSIS
This module creates a basic request handler with utility functions available
in database objects (LedgerSMB::DBObject)
diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm
index 39ee1161..8e1d2e9f 100644
--- a/LedgerSMB/Locale.pm
+++ b/LedgerSMB/Locale.pm
@@ -1,3 +1,28 @@
+=head1 NAME
+
+LedgerSMB::Locale Locale handling class for LedgerSMB
+
+=head1 SYNOPSIS
+
+Locale support module for LedgerSMB. Uses Locale::Maketext::Lexicon as a base.
+
+=head1 METHODS
+
+=item get_handle ($language_code)
+Returns a locale handle for accessing the other methods. Inherited from
+Locale::Maketext.
+
+=item text ($string)
+Returns the translation for the given string. This is a legacy wrapper that
+merely calls $self->maketext.
+
+=item date ($myconfig, $date, $longformat)
+Returns the given date after formatting it. If $longformat is set, the date
+will be givin in the form of "_('September') 23 2007". If $longformat is not
+set, the date will be output in the format specified by $myconfig->{dateformat}.
+
+=head1 Copyright (C) 2006, The LedgerSMB core team.
+
#=====================================================================
#
# Locale support module for LedgerSMB
@@ -14,15 +39,25 @@
# Version 2 or, at your option, any later version. See COPYRIGHT file for
# details.
#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
#
-#======================================================================
-# This package contains locale related functions:
-#`
-# get_handle - gets a locale handle
-# text - outputs HTML escaped translation for input text
-# date - formats date for the locale
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (C) 2000
#
-#====================================================================
+# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Thomas Bayen <bayen@gmx.de>
+# Antti Kaihola <akaihola@siba.fi>
+# Moritz Bunkus (tex)
+# Jim Rawlings <jim@your-dba.com> (DB2)
+#
+#======================================================================
+=cut
package LedgerSMB::Locale;
use base 'Locale::Maketext';
@@ -49,8 +84,8 @@ sub text {
sub date {
my ( $self, $myconfig, $date, $longformat ) = @_;
- my @longmonth = (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec));
- @longmonth = (
+## my @longmonth = (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec));
+ my @longmonth = (
"January", "February", "March", "April",
"May ", "June", "July", "August",
"September", "October", "November", "December"
diff --git a/t/01-load.t b/t/01-load.t
index b27a1154..8b83013e 100644
--- a/t/01-load.t
+++ b/t/01-load.t
@@ -2,8 +2,9 @@
use strict;
use warnings;
-use Test::More tests => 30;
+use Test::More tests => 31;
+use_ok('LedgerSMB');
use_ok('LedgerSMB::AA');
use_ok('LedgerSMB::AM');
use_ok('LedgerSMB::BP');