Skip to content

Commit

Permalink
Update updateCrowdin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aruznieto authored Sep 6, 2023
1 parent bed4590 commit a58f504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chameleonultragui/lib/l10n/updateCrowdin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def add_string_to_source(string):
try:
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:
key, value = s.split(':')
data = {'identifier': key.replace('"', ''), 'text': value.replace('"', ''), 'fileId': sourceId}
request('POST', f"https://api.crowdin.com/api/v2/projects/{projectId}/strings", data)
print("Added: ", key)
except Exception as e:
Expand Down

0 comments on commit a58f504

Please sign in to comment.