Last month I tried the articy localization plugin of the Dialogue System, it works very well!
I'd like to talk about some adjustments to improve it, if you're open to it
![Smile :)](./images/smilies/icon_e_smile.gif)
In the script ArticyLocalizationImporter.cs :
1/ In the function ProcessExcelFile(string languageCode, string filename), there is this loop:
Code: Select all
for (int i = 0; i < rows.Length; i++)
{
var row = rows[i];
var locaID = row.LocaID;
var value = row.Value;
var contextPath = row.ContextPath;
var dotPos = locaID.IndexOf('.');
var technicalName = locaID.Substring(0, dotPos);
var fieldSpec = locaID.Substring(dotPos + 1);
if (contextPath.StartsWith("Assets")) continue;
SetLocalizedField(languageCode, technicalName, fieldSpec, value);
}
Code: Select all
var dotPos = locaID.IndexOf('.');
var technicalName = locaID.Substring(0, dotPos);
var fieldSpec = locaID.Substring(dotPos + 1);
Code: Select all
string[] split = locaID.Split('.');
string technicalName = split[0];
string fieldSpec = split[split.Length - 1];
TechnicalName.TemplateName.Property
As an example, for a character's name:
PoliceNetworkManager.Character_Base_Properties.CharacterName
Without the code change, the importer is looking for a field called "Character_Base_Properties.CharacterName", when it should, in my opinion, search for a field called "CharacterName". I think it's the way it works in the main xml import.
2/ In the same function, I had to add this check:
Code: Select all
if (locaID == null) continue;
If you have no idea why it does that, I'll try to find out exactly when the error starts to appear.
3/ Finally, in the function "SetFieldInFieldsList(List<Field> fields, string title, string value)", I added this line:
Code: Select all
if (value.Contains(@"\n")) value = value.Replace(@"\n", "\n");
That's all
![Smile :)](./images/smilies/icon_e_smile.gif)
Marc