[freeside-commits] freeside/FS/FS Mason.pm, 1.74, 1.75 Maketext.pm, 1.1, 1.2

Erik Levinson levinse at wavetail.420.am
Tue May 17 17:33:37 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv2427/FS/FS

Modified Files:
	Mason.pm Maketext.pm 
Log Message:
internationalization/localization, RT12515

Index: Maketext.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Maketext.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- Maketext.pm	14 May 2011 00:30:43 -0000	1.1
+++ Maketext.pm	18 May 2011 00:33:34 -0000	1.2
@@ -4,8 +4,9 @@
 use FS::CurrentUser;
 use FS::Conf;
 use FS::L10N;
+use HTML::Entities qw( encode_entities );
 
-our @EXPORT_OK = qw( mt );
+our @EXPORT_OK = qw( mt emt );
 
 our $lh;
 
@@ -14,6 +15,11 @@
   $lh->maketext(@_);
 }
 
+# HTML-escaped version of mt()
+sub emt {
+    encode_entities(mt(@_));
+}
+
 sub lh {
   my $locale =  $FS::CurrentUser::CurrentUser->option('locale')
              || FS::Conf->new->config('locale')

Index: Mason.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Mason.pm,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -w -d -r1.74 -r1.75
--- Mason.pm	14 May 2011 00:30:43 -0000	1.74
+++ Mason.pm	18 May 2011 00:33:34 -0000	1.75
@@ -140,7 +140,7 @@
   use FS::NetworkMonitoringSystem;
   use FS::Tron qw( tron_lint );
   use FS::Locales;
-  use FS::Maketext qw( mt );
+  use FS::Maketext qw( mt emt );
 
   use FS::agent;
   use FS::agent_type;



More information about the freeside-commits mailing list