Skip to content

Commit

Permalink
Update Crowding parser (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
aruznieto authored Sep 4, 2023
1 parent 4f39f54 commit 01649fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chameleonultragui/lib/l10n/updateCrowdin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def request(method, url, data=None):
'Content-Type': 'application/json'})).read().decode())

def add_string_to_source(string):
print(string)
projectId = 611911
sourceId = 33

try:
string_parsed = string.split('+++ chameleonultragui/lib/l10n/app_en.arb ', 1)[1].replace(' ', '').replace(',', '').replace('\n','').split('+')[1:]
string_parsed = string.split('app_en.arb', 1)[1].replace(' ', '').replace(',', '').replace('\n','').split('+')[1:]
for s in string_parsed:
data = {'identifier': key.replace('"', ''), 'text': value.replace('"', ''), 'fileId': sourceId}
try:
Expand All @@ -40,7 +41,7 @@ def add_string_to_source(string):
except Exception as e:
print(e)

except:
except Exception as e:
print(e)

if __name__ == "__main__":
Expand Down

0 comments on commit 01649fb

Please sign in to comment.