- forward the error state of the translation parser to the calling code so that it can print a message pointing to the problem content.
This commit is contained in:
parent
73248e7f86
commit
5d436cd3ed
3 changed files with 38 additions and 26 deletions
|
|
@ -761,6 +761,7 @@ DEFINE_PROPERTY(translation, L, Actor)
|
|||
else
|
||||
{
|
||||
FRemapTable CurrentTranslation;
|
||||
bool success = true;
|
||||
|
||||
CurrentTranslation.MakeIdentity();
|
||||
for(int i = 1; i < PROP_PARM_COUNT; i++)
|
||||
|
|
@ -774,10 +775,15 @@ DEFINE_PROPERTY(translation, L, Actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
CurrentTranslation.AddToTranslation(str);
|
||||
// parse all ranges to get a complete list of errors, if more than one range fails.
|
||||
success |= CurrentTranslation.AddToTranslation(str);
|
||||
}
|
||||
}
|
||||
defaults->Translation = CurrentTranslation.StoreTranslation (TRANSLATION_Decorate);
|
||||
if (!success)
|
||||
{
|
||||
bag.ScriptPosition.Message(MSG_WARNING, "Failed to parse translation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue