Disassembler
ce325cf3d0
- Bump basic OS to Alpine 3.9 - Restructure repo and add layer versioning - Use JSON for all metadata - Merge abuild branch (but without abuild)
16 lines
551 B
Python
16 lines
551 B
Python
#!/usr/bin/env python3
|
|
|
|
import gzip
|
|
import json
|
|
|
|
d = {}
|
|
with open('messages_cs.txt', 'r') as input, open('messages_cs.properties', 'w') as output:
|
|
for line in input.read().splitlines():
|
|
print(json.dumps(line)[1:-1], end='\n', file=output)
|
|
if line and not line.startswith('#'):
|
|
key,value = line.split('=', 1)
|
|
d[key] = value
|
|
|
|
with open('frontlinesms-core_messages_cs.js', 'wb') as f:
|
|
f.write('var i18nStrings = i18nStrings || {{}}; i18nStrings["frontlinesms-core"] = {};'.format(json.dumps(d)).encode())
|