view gaim2blt.pl @ 6626:7a4c4e89a1df

[gaim-migrate @ 7150] Ambrose C. LI (acli) writes: " fi.po with the following "safe" changes: - went over the 0.59.8 po file and found the strings with idential meanings with changes only in formatting - some translations obtained by old translation strings but which requires only some trivial editing - added some translations from existing po files from other projects - converted from iso-8859-15 to utf-8 and "unsafe" changes: - some translations obtained by old translation strings but which requires some relatively non-trivial editing - attempted to correct some obvious mistranslations It is best to have a native speaker go over this" but i figure at this point, the last update being in 0.59.8, his version can't be any worse really committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 25 Aug 2003 23:13:52 +0000
parents 66bf7ecefedd
children
line wrap: on
line source

#!/usr/bin/perl -w
# Original by Andy Harrison,
# Rewrite by Decklin Foster,
# Available under the GPL.

package Gaim2Blt;
use strict;
use Getopt::Std;
use vars qw(%opts $in_group);

getopts('s:', \%opts);
die "usage: $0 -s 'screen name' gaim.buddy\n" unless $opts{s};

print <<"EOF";
Config {
  version 1
}
User {
  screenname "$opts{s}"
}
Buddy {
  list {
EOF

while (<>) {
    chomp;
    my ($type, $args) = split ' ', $_, 2;
    next unless $type;

    if ($type eq 'g') {
        print "    }\n" if ($in_group);
        print qq(    "$args" {\n);
        $in_group = 1;
    } elsif ($type eq 'b') {
        my ($buddy, $alias) = split /:/, $args;
        print qq(      "$buddy"\n);
    }
}

print <<"EOF";
    }
  }
}
EOF