summaryrefslogtreecommitdiff
path: root/po-sections/trme2po
blob: c1604aa814c6289b8ee67dea8c9266d685e1ce73 (plain)
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
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/perl

#trme2po (TRanslate_MEnus TO .po format)

$trans=();

sub preface {
    print '
# Menu section translation
# Copyright (C) 2003
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: menu 2.1.7-2\n"
"PO-Revision-Date: 2003-3-06 17:11 +0100\n"
"Last-Translator: FIRST AUTHOR <EMAIL@ADDRESS>\n"
"Language-Team: <@lists.debian.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"

# Automatically generated file. Do not edit (see /usr/share/doc/menu/html/index.html)
';
}

sub dump_body {
    for my $id (sort keys %trans){
	print "msgid \"$id\"\n";
	print "msgstr \"".$trans{$id}."\"\n";
	print "\n";
    }
}

sub process {
    while (<STDIN>){
	s/#.*//;
	s/^\s+//;
	next if /^$/;
	do {print STDERR "Error: $_"; next;} unless /^\"([^\"]+)\"\s+\"([^\"]+)\"/;
	$trans{$1}=$2;
    }
}
process();

preface();
dump_body();