Ticket #1623: unused.py
File unused.py, 331 bytes (added by sebastian, on 11/27/2014 at 10:53:22 AM) |
---|
Line | |
---|---|
1 | #!/usr/bin/env python |
2 | |
3 | import os |
4 | import json |
5 | import subprocess |
6 | |
7 | with open(os.path.join('_locales', 'en_US', 'messages.json')) as file: |
8 | msgids = json.load(file).keys() |
9 | |
10 | for msgid in msgids: |
11 | if subprocess.call(['grep', '--quiet', '--recursive', '--exclude-dir', '_locales', r'["\']\(i18n_\)\?%s["\']' % msgid]) != 0: |
12 | print msgid |