Add FrontlineSMS Czech translation, closes #280
This commit is contained in:
parent
e58fc05a7d
commit
bbf8219504
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -28,6 +28,16 @@ EOF
|
||||
|
||||
COPY lxc
|
||||
|
||||
RUN EOF
|
||||
# Install Czech translation
|
||||
cd /srv/frontlinesms/frontlinesms2/web-app/assets/i18n
|
||||
gzip < frontlinesms-core_messages_cs.js > frontlinesms-core_messages_cs.js.gz
|
||||
MD5=$(md5sum frontlinesms-core_messages_cs.js | cut -d' ' -f1)
|
||||
cp frontlinesms-core_messages_cs.js frontlinesms-core_messages_cs-${MD5}.js
|
||||
cp frontlinesms-core_messages_cs.js.gz frontlinesms-core_messages_cs-${MD5}.js.gz
|
||||
chown 8018:8018 frontlinesms-core_messages_cs*
|
||||
EOF
|
||||
|
||||
MOUNT DIR /srv/frontlinesms/data srv/frontlinesms/.frontlinesms2
|
||||
|
||||
CMD s6-svscan /etc/services.d
|
||||
|
15
zz-extra/frontlinesms-lang-js.py
Normal file
15
zz-extra/frontlinesms-lang-js.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/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())
|
Loading…
Reference in New Issue
Block a user