extract-i18n-js.pl 231 B

123456789101112131415
  1. #!/usr/bin/perl -w
  2. #
  3. use strict;
  4. while (<STDIN>) {
  5. chomp;
  6. if (/(__|Notify.progress|Notify.msg|Notify.info|Notify.error)\(['"](.*?)['"]\)/) {
  7. my $msg = $2;
  8. $msg =~ s/\"/\\\"/g;
  9. print "print T_js_decl(\"$msg\");\n";
  10. }
  11. }