[Rt-commit] r15520 - rt/3.8/trunk/sbin

ruz at bestpractical.com ruz at bestpractical.com
Wed Aug 27 08:21:11 EDT 2008


Author: ruz
Date: Wed Aug 27 08:21:11 2008
New Revision: 15520

Modified:
   rt/3.8/trunk/sbin/extract-message-catalog

Log:
* adjust extract-message-catalog to make it possible to extract
  messages in extensions

Modified: rt/3.8/trunk/sbin/extract-message-catalog
==============================================================================
--- rt/3.8/trunk/sbin/extract-message-catalog	(original)
+++ rt/3.8/trunk/sbin/extract-message-catalog	Wed Aug 27 08:21:11 2008
@@ -59,12 +59,14 @@
 
 $DEBUG = 1;
 
- at ARGV = (<lib/RT/I18N/*.po>, "lib/RT/I18N/rt.pot") unless @ARGV;
+# po dir is for extensions
+ at ARGV = (<lib/RT/I18N/*.po>, <lib/RT/I18N/*.pot>, <po/*.po>, <po/*.pot>) unless @ARGV;
 
 $FILECAT = {};
 
 # extract all strings and stuff them into $FILECAT
-File::Find::find( { wanted => \&extract_strings_from_code, follow => 1 }, qw(bin sbin lib share etc) );
+# scan html dir for extensions
+File::Find::find( { wanted => \&extract_strings_from_code, follow => 1 }, qw(bin sbin lib share html etc) );
 
 # ensure proper escaping and [_1] => %1 transformation
 foreach my $str ( sort keys %{$FILECAT} ) {
@@ -103,7 +105,8 @@
     local $/;
     return if ( -d $_ );
     return if ( $File::Find::dir =~ 'lib/blib|lib/t/autogen|var|m4|local|\.svn' );
-    return if ( /\.pot$|\.po$|\.bak$|~|,D|,B$|extract-message-catalog$|tweak-template-locstring$/ );
+    return if ( /\.(?:pot|po|bak|gif|png|psd|jpe?g|svg)$/ );
+    return if ( /~|,D|,B$|extract-message-catalog$|tweak-template-locstring$/ );
     return if ( /^[\.#]/ );
     return if ( -f "$_.in" );
 


More information about the Rt-commit mailing list