Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3584 sourcerer 1
#!/usr/bin/perl -w
2
 
3
use strict;
4
 
5
die "usage: split-messages   < FatMessages > ThinMessages" if ($#ARGV != 1);
6
 
7
my $langname = $ARGV[0];
8
my $platname = $ARGV[1];
9
 
10
my $allprefix = $langname . ".all.";
11
my $platprefix = $langname . "." . $platname . ".";
12
 
13
print "# This messages file is automatically generated from FatMessages\n";
14
print "# at build-time.  Please go and edit that instead of this.\n\n";
15
 
16
foreach () {
17
    if (not /^#/ and not /^\s*$/) {
18
	if (/^$allprefix/ or /^$platprefix/) {
19
	    s/^$langname\.(all|$platname)\.//;
20
	    print "$_";
21
	}
22
    }
23
}