forked from alikins/gitconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpot_diff
More file actions
executable file
·33 lines (27 loc) · 863 Bytes
/
Copy pathpot_diff
File metadata and controls
executable file
·33 lines (27 loc) · 863 Bytes
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
#!/usr/bin/python
# dump out the msg keys by themselves, newline seperated
#
# require's polib from https://bitbucket.org/izi/polib/wiki/Home
#
# python-polib rpm or "easy_install polib"
#
# usage: just_strings.py po/keys.pot
import polib
import sys
# assume stdout is utf8
import codecs
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
pot_file1 = sys.argv[1]
pofile = polib.pofile(pot_file1)
#print "date: %s" % (pofile.metadata['POT-Creation-Date'])
#print "rev_date: %s translate: %s untranslated: %s fuzzy: %s" % (pofile.metadata['POT-Creation-Date'],
# pofile.percent_translated(),
# len(pofile.untranslated_entries()),
# len(pofile.fuzzy_entries()))
pofile.sort()
for msg in pofile:
#print msg.occurrences
print msg.msgid
# for occur in msg.occurrences:
# print msg.msgid
# print "%s:%s" % (occur[0], msg.msgid)