diff options
author | Andrew Dolgov <[email protected]> | 2009-02-20 12:57:02 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-02-20 12:57:02 +0300 |
commit | 10bccf7d57ddd885507b1a8d4ee29b0076c14724 (patch) | |
tree | 19a5442ff71a78669dcd7ec1fc04dd55df0aa5d4 /utils/extract-i18n-js.pl | |
parent | be9d09a1b38325f5c1150dae07862f44c815d850 (diff) |
automatically extract i18n data from .js files
Diffstat (limited to 'utils/extract-i18n-js.pl')
-rwxr-xr-x | utils/extract-i18n-js.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/extract-i18n-js.pl b/utils/extract-i18n-js.pl new file mode 100755 index 000000000..d6179fc70 --- /dev/null +++ b/utils/extract-i18n-js.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl -w +# +use strict; + +while (<STDIN>) { + chomp; + + if (/(__|notify_progress|notify|notify_info|notify_error)\(['"](.*?)['"]\)/) { + my $msg = $2; + + $msg =~ s/\"/\\\"/g; + + print "print T_js_decl(\"$msg\");\n"; + } +} |