Ticket #1623: unused.py

File unused.py, 331 bytes (added by sebastian, 5 years ago)
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