1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-12-21 13:33:48 +03:00

Fixed toUDS

This commit is contained in:
Adolfo Gómez García 2024-08-07 19:52:19 +02:00
parent 4095295e80
commit e030343881
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -111,9 +111,10 @@ def extract_translations():
for v in pattern.finditer(data):
s = v.groupdict()['data']
if strip:
s = s.strip()
s = s.replace('\n', '\\n')
s = s.replace('\n', ' ').replace('\r', ' ').strip()
s = s.replace('\n', '\\n').replace('\r', '\\r').replace('"', '\\"')
# print('Found string {}'.format(s))
print('gettext("{}");'.format(s), file=output)
with open(os.path.join(os.path.join(UDS, STATIC), 'translations-fakejs.js'), 'w', encoding='utf8') as output: