From d871a1e81bc5bae5b987156777d2023aab90ca39 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:33:55 +0100 Subject: [PATCH] add some error logs to qsblocalisation --- QSB/Localization/QSBLocalization.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/QSB/Localization/QSBLocalization.cs b/QSB/Localization/QSBLocalization.cs index ddb4bdb9..209cdf47 100644 --- a/QSB/Localization/QSBLocalization.cs +++ b/QSB/Localization/QSBLocalization.cs @@ -1,4 +1,5 @@ -using QSB.Utility; +using OWML.Common; +using QSB.Utility; using System; using System.Collections.Generic; using System.Globalization; @@ -22,13 +23,19 @@ public static class QSBLocalization foreach (var file in files) { var translation = QSBCore.Helper.Storage.Load($"Translations\\{file.Name}", false); + + if (translation == null) + { + DebugLog.ToConsole($"Error - could not load translation at {Path.Combine(QSBCore.Helper.Manifest.ModFolderPath, $"Translations\\{file.Name}")}", MessageType.Error); + } + _translations.Add(translation); DebugLog.DebugWrite($"- Added translation for language {translation.Language}"); } if (_translations.Count == 0) { - DebugLog.ToConsole($"FATAL - No translation files found!", OWML.Common.MessageType.Fatal); + DebugLog.ToConsole($"FATAL - No translation files found!", MessageType.Fatal); return; }