Allow empty profile and description field in Actors and Weapons
This commit is contained in:
parent
936fe0e268
commit
3e7acb4475
1 changed files with 14 additions and 12 deletions
|
|
@ -656,10 +656,11 @@ def searchNames(data, pbar, context):
|
||||||
totalTokens[1] += response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Profile
|
# Profile
|
||||||
response = translateGPT(profileList, "", True)
|
if profileList:
|
||||||
translatedProfileBatch = response[0]
|
response = translateGPT(profileList, "", True)
|
||||||
totalTokens[0] += response[1][0]
|
translatedProfileBatch = response[0]
|
||||||
totalTokens[1] += response[1][1]
|
totalTokens[0] += response[1][0]
|
||||||
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Set Data
|
# Set Data
|
||||||
if len(nameList) == len(translatedNameBatch):
|
if len(nameList) == len(translatedNameBatch):
|
||||||
|
|
@ -699,14 +700,15 @@ def searchNames(data, pbar, context):
|
||||||
totalTokens[1] += response[1][1]
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Description
|
# Description
|
||||||
response = translateGPT(
|
if descriptionList:
|
||||||
descriptionList,
|
response = translateGPT(
|
||||||
f"Reply with only the {LANGUAGE} translation of the text.",
|
descriptionList,
|
||||||
True,
|
f"Reply with only the {LANGUAGE} translation of the text.",
|
||||||
)
|
True,
|
||||||
translatedDescriptionBatch = response[0]
|
)
|
||||||
totalTokens[0] += response[1][0]
|
translatedDescriptionBatch = response[0]
|
||||||
totalTokens[1] += response[1][1]
|
totalTokens[0] += response[1][0]
|
||||||
|
totalTokens[1] += response[1][1]
|
||||||
|
|
||||||
# Set Data
|
# Set Data
|
||||||
if len(nameList) == len(translatedNameBatch):
|
if len(nameList) == len(translatedNameBatch):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue