Subversion Repositories Kolibri OS

Rev

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

  1. #!/usr/bin/perl -w
  2.  
  3. use strict;
  4.  
  5. die "usage: split-messages <langname> <platname> < 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 (<STDIN>) {
  17.     if (not /^#/ and not /^\s*$/) {
  18.         if (/^$allprefix/ or /^$platprefix/) {
  19.             s/^$langname\.(all|$platname)\.//;
  20.             print "$_";
  21.         }
  22.     }
  23. }
  24.