[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5287] addons/1.3/report_framework/trunk/LedgerSMB/ I18N.pm
- Subject: SF.net SVN: ledger-smb:[5287] addons/1.3/report_framework/trunk/LedgerSMB/ I18N.pm
- From: ..hidden..
- Date: Wed, 28 Nov 2012 09:25:07 +0000
Revision: 5287
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5287&view=rev
Author: einhverfr
Date: 2012-11-28 09:25:07 +0000 (Wed, 28 Nov 2012)
Log Message:
-----------
Adding accidently omitted module
Added Paths:
-----------
addons/1.3/report_framework/trunk/LedgerSMB/I18N.pm
Copied: addons/1.3/report_framework/trunk/LedgerSMB/I18N.pm (from rev 5279, trunk/LedgerSMB/I18N.pm)
===================================================================
--- addons/1.3/report_framework/trunk/LedgerSMB/I18N.pm (rev 0)
+++ addons/1.3/report_framework/trunk/LedgerSMB/I18N.pm 2012-11-28 09:25:07 UTC (rev 5287)
@@ -0,0 +1,34 @@
+=head1 NAME
+
+LedgerSMB::I18N - Translation role for LedgerSMB Moose classes
+
+=head1 SYNPOSIS
+
+ text('text to translate')
+
+=head1 DESCRIPTION
+
+This adds a single method, text() to a role. This maps to the current
+LedgerSMB::App_State::Locale's text method. This is safe for cached code since
+we look only to the current locale.
+
+=cut
+
+package LedgerSMB::I18N;
+use Moose::Role;
+use LedgerSMB::App_State;
+
+sub text {
+ my ($string) = @_;
+ return $LedgerSMB::App_State::Locale->text($string);
+}
+
+=head1 COPYRIGHT
+
+COPYRIGHT (C) 2012 The LedgerSMB Core Team. This file may be re-used under the
+terms of the LedgerSMB General Public License version 2 or at your option any
+later version. Please see enclosed LICENSE file for details.
+
+=cut
+
+1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.