[Jifty-commit] r6320 - jifty/trunk/lib/Jifty/Script

Jifty commits jifty-commit at lists.jifty.org
Mon Feb 9 06:09:18 EST 2009


Author: c9s
Date: Mon Feb  9 06:09:18 2009
New Revision: 6320

Modified:
   jifty/trunk/lib/Jifty/Script/Po.pm

Log:
- fix po parsing
  Locale::Maketext::Extract uses all plugins to parse every file
  specify plugins for parsing string, not to apply generic parser everywhere.



Modified: jifty/trunk/lib/Jifty/Script/Po.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/Po.pm	(original)
+++ jifty/trunk/lib/Jifty/Script/Po.pm	Mon Feb  9 06:09:18 2009
@@ -13,7 +13,18 @@
 use File::Find::Rule ();
 use MIME::Types ();
 our $MIME = MIME::Types->new();
-our $LMExtract = Locale::Maketext::Extract->new;
+our $LMExtract = Locale::Maketext::Extract->new(
+        # Specify which parser plugins to use
+        plugins => {
+            # Use Perl parser, process files with extension .pl .pm .cgi
+            'Locale::Maketext::Extract::Plugin::PPI' => ['pm','pl'],
+            'tt2' => [ ],
+            'perl' => ['js','json'],
+            'mason' => [ ] ,
+        },
+        verbose => 1,
+);
+
 use constant USE_GETTEXT_STYLE => 1;
 
 __PACKAGE__->mk_accessors(qw/language/);


More information about the Jifty-commit mailing list