@@ -0,0 +1,974 @@
+#!/usr/bin/env python%0A%22%22%22Merge keys from stdin into translation files.%0A%0ADoes remove existing entries for keys that are not in stdin.%0A%22%22%22%0A%0Aimport fileinput%0Aimport json%0A%0A%0AFILES = %5B%0A    'src/adhocracy_frontend/adhocracy_frontend/static/i18n/de.json',%0A    'src/adhocracy_frontend/adhocracy_frontend/static/i18n/en.json',%0A%5D%0A%0A%0Aif __name__ == '__main__':%0A    keys = %5Bl.rstrip() for l in fileinput.input()%5D%0A%0A    for filename in FILES:%0A        with open(filename) as fh:%0A            data = json.load(fh)%0A%0A        # add new keys%0A        for key in keys:%0A            if key not in data:%0A                data%5Bkey%5D = ''%0A%0A        # remove old keys%0A        for key in list(data.keys()):%0A            if key not in keys:%0A                del data%5Bkey%5D%0A%0A        with open(filename, 'w') as fh:%0A            json.dump(%0A                data,%0A                fh,%0A                indent=2,%0A                sort_keys=True,%0A                separators=(',', ': '),%0A                ensure_ascii=False)%0A

add merge messages script