6
parser = optparse.OptionParser(usage="usage: %prog path_to_eng_file")
8
(options, args) = parser.parse_args()
10
if args == None or len(args) != 1:
11
print("ERROR: not enough arguments");
18
'Project-Id-Version': 'PACKAGE VERSION',
19
'Report-Msgid-Bugs-To': 'you@example.com',
21
'POT-Creation-Date': '2007-10-18 14:00+0100',
23
'PO-Revision-Date': 'YEAR-MO-DA HO:MI+ZONE',
24
'Last-Translator': 'FULL NAME <EMAIL@ADDRESS>',
25
'Language-Team': 'LANGUAGE <LL@li.org>',
27
'MIME-Version': '1.0',
28
'Content-Type': 'text/plain; charset=utf-8',
29
'Content-Transfer-Encoding': '8bit',
32
lines = open(path, 'r').readlines()
34
for i in range(len(lines)):
36
msg = line[line.find('=') + 1:].strip()
37
entry = polib.POEntry(msgid=msg,
39
occurrences=[('unity_webapps.properties', str(i))]
43
po.save('unity_firefox_extension.pot')