source: trunk/plugins/ContextMenu/1.pl @ 626

Last change on this file since 626 was 21, checked in by gogo, 15 years ago

Setting more properties.

  • Property svn:eol-style set to native
  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 798 bytes
Line 
1#! /usr/bin/perl -w
2
3use strict;
4
5my $file = 'context-menu.js';
6my $outfile = $file.'-i18n';
7my $langfile = 'en.js';
8
9open FILE, "<$file";
10#open OUTFILE, ">$outfile";
11#open LANGFILE, ">$langfile";
12my %texts = ();
13while (<FILE>) {
14    if (/"(.*?)"/) {
15        my $inline = $_;
16        chomp $inline;
17        my $key = $1;
18        my $val = $1;
19        print "Key: [$key]: ";
20        my $line = <STDIN>;
21        if (defined $line) {
22            chomp $line;
23            if ($line =~ /(\S+)/) {
24                $key = $1;
25                print "-- using $key\n";
26            }
27            $texts{$val} = $key;
28        } else {
29            print " -- skipped...\n";
30        }
31    }
32}
33#close LANGFILE;
34#close OUTFILE;
35close FILE;
36
37print "\n\n\n";
38print '"', join("\"\n\"", sort keys %texts), '"', "\n";
Note: See TracBrowser for help on using the repository browser.