Fixed key handling by removing the root part

This commit is contained in:
Thorsten Sommer 2025-04-27 09:02:54 +02:00
parent 7b621578ea
commit e8e84dfb14
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -351,5 +351,10 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
this.finalLuaCode.Clear();
var commentContent = this.addedContent.Concat(PluginFactory.BaseLanguage.Content).ToDictionary();
LuaTable.Create(ref this.finalLuaCode, "UI_TEXT_CONTENT", this.localizedContent, commentContent, this.cancellationTokenSource!.Token);
// Next, we must remove the `root::` prefix from the keys:
this.finalLuaCode.Replace("""UI_TEXT_CONTENT["root::""", """
UI_TEXT_CONTENT["
""");
}
}