Fixed check for token in missing_tokens

This commit is contained in:
Daniel S. Billing 2021-04-19 21:36:01 +02:00
parent c50e298b54
commit df1ba4f7d7

View File

@ -116,9 +116,7 @@ Public Class Localization
Dim FullPath As String = GameController.GamePath & GameMode.DefaultLocalizationsPath
Dim LocaleFilePath As String = FullPath & "missing_tokens.json"
Dim TokensFile As JObject = JObject.Parse(System.IO.File.ReadAllText(LocaleFilePath))
If TokensFile.ContainsKey(NewTokenName) = False Then
Logger.Debug("Localization.vb: Did not find token for: " & NewTokenName)
'Dim nexttolastpart As String = NewTokenName.Substring(NewTokenName.LastIndexOf(".") + 1)
If TokensFile.ContainsKey(s) = False Then
TokensFile.Add(NewTokenName, s)
End If
File.WriteAllText(LocaleFilePath, JsonConvert.SerializeObject(TokensFile, Newtonsoft.Json.Formatting.Indented))