Menu

[r15]: / includes / htmlarea / plugins / ContextMenu / 1.pl  Maximize  Restore  History

Download this file

39 lines (34 with data), 798 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /usr/bin/perl -w
use strict;
my $file = 'context-menu.js';
my $outfile = $file.'-i18n';
my $langfile = 'en.js';
open FILE, "<$file";
#open OUTFILE, ">$outfile";
#open LANGFILE, ">$langfile";
my %texts = ();
while (<FILE>) {
if (/"(.*?)"/) {
my $inline = $_;
chomp $inline;
my $key = $1;
my $val = $1;
print "Key: [$key]: ";
my $line = <STDIN>;
if (defined $line) {
chomp $line;
if ($line =~ /(\S+)/) {
$key = $1;
print "-- using $key\n";
}
$texts{$val} = $key;
} else {
print " -- skipped...\n";
}
}
}
#close LANGFILE;
#close OUTFILE;
close FILE;
print "\n\n\n";
print '"', join("\"\n\"", sort keys %texts), '"', "\n";
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.