mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
Add a perl script for splitting out messages files again
svn path=/trunk/netsurf/; revision=13669
This commit is contained in:
parent
104e19994e
commit
0adac87454
23
utils/split-messages.pl
Executable file
23
utils/split-messages.pl
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
|
||||
die "usage: split-messages <langname> <platname> < FatMessages > ThinMessages" if ($#ARGV != 1);
|
||||
|
||||
my $langname = $ARGV[0];
|
||||
my $platname = $ARGV[1];
|
||||
|
||||
my $allprefix = $langname . ".all.";
|
||||
my $platprefix = $langname . "." . $platname . ".";
|
||||
|
||||
print "# This messages file is automatically generated from FatMessages\n";
|
||||
print "# at build-time. Please go and edit that instead of this.\n\n";
|
||||
|
||||
foreach (<STDIN>) {
|
||||
if (not /^#/ and not /^\s*$/) {
|
||||
if (/^$allprefix/ or /^$platprefix/) {
|
||||
s/^$langname\.(all|$platname)\.//;
|
||||
print "$_";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user