localization udpates

This commit is contained in:
honzapatCZ
2021-08-23 19:30:13 +02:00
parent d4a4ae996e
commit d493eb9ada
8 changed files with 112 additions and 22 deletions

View File

@@ -176,7 +176,6 @@ namespace FlaxEditor.CustomEditors.Editors
allKeys.Add(e.Key);
}
}
_valueElement.TextBox.SetTextAsUser(null);
string newKey = null;
if (string.IsNullOrEmpty(_idElement.Text))
{
@@ -220,13 +219,14 @@ namespace FlaxEditor.CustomEditors.Editors
{
var table = locale.First();
var entries = table.Entries;
if (table.Locale == "en")
if (table.Locale == settings.LocalizedStringTables[0].Locale)
entries[newKey] = new[] { newValue };
else
entries[newKey] = new[] { string.Empty };
table.Entries = entries;
table.Save();
}
_valueElement.TextBox.SetTextAsUser(null);
_idElement.TextBox.SetTextAsUser(newKey);
Profiler.EndEvent();
}