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
3import os
4import json
5import subprocess
6
7with open(os.path.join('_locales', 'en_US', 'messages.json')) as file:
8        msgids = json.load(file).keys()
9
10for msgid in msgids:
11        if subprocess.call(['grep', '--quiet', '--recursive', '--exclude-dir', '_locales', r'["\']\(i18n_\)\?%s["\']' % msgid]) != 0:
12                print msgid