Spacing issues
This commit is contained in:
parent
02c3ec1a89
commit
f93ce41bd8
8 changed files with 38 additions and 37 deletions
|
|
@ -276,7 +276,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'<\s?.+?\s?>', translatedText)
|
matchList = re.findall(r'<\s?.+?\s?>', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -149,9 +149,10 @@ def translateJSON(data, pbar):
|
||||||
speaker = 'None'
|
speaker = 'None'
|
||||||
|
|
||||||
# Text
|
# Text
|
||||||
if 'text' in item[1]:
|
for text in ['text', 'help1', 'help2', 'help3', 'like', 'message']:
|
||||||
if item[1]['text'] != None:
|
if text in item[1]:
|
||||||
jaString = item[1]['text']
|
if item[1][text] != None:
|
||||||
|
jaString = item[1][text]
|
||||||
|
|
||||||
# Remove any textwrap
|
# Remove any textwrap
|
||||||
if FIXTEXTWRAP == True:
|
if FIXTEXTWRAP == True:
|
||||||
|
|
@ -175,7 +176,7 @@ def translateJSON(data, pbar):
|
||||||
translatedText = textwrap.fill(translatedText, width=WIDTH)
|
translatedText = textwrap.fill(translatedText, width=WIDTH)
|
||||||
|
|
||||||
# Set Data
|
# Set Data
|
||||||
item[1]['text'] = translatedText
|
item[1][text] = translatedText
|
||||||
|
|
||||||
# Keep textHistory list at length maxHistory
|
# Keep textHistory list at length maxHistory
|
||||||
if len(textHistory) > maxHistory:
|
if len(textHistory) > maxHistory:
|
||||||
|
|
@ -244,7 +245,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -1709,7 +1709,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -1704,7 +1704,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -263,7 +263,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'<\s?.+?\s?>', translatedText)
|
matchList = re.findall(r'<\s?.+?\s?>', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
|
|
@ -434,7 +434,7 @@ def resubVars(translatedText, allList):
|
||||||
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
matchList = re.findall(r'\[\s?.+?\s?\]', translatedText)
|
||||||
if len(matchList) > 0:
|
if len(matchList) > 0:
|
||||||
for match in matchList:
|
for match in matchList:
|
||||||
text = match.replace(' ', '')
|
text = match.strip()
|
||||||
translatedText = translatedText.replace(match, text)
|
translatedText = translatedText.replace(match, text)
|
||||||
|
|
||||||
# Icons
|
# Icons
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue