From c3c52b66822d94c92e0f66603e868ba8f98df4b0 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Fri, 8 Feb 2019 10:03:38 +0100 Subject: [PATCH] Default to en-US for missing core translations --- .../Localization/LocalizationManager.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 8651a7dad4..7cf42a50a7 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -460,11 +460,15 @@ namespace Emby.Server.Implementations.Localization { using (var stream = _assembly.GetManifestResourceStream(resourcePath)) { - var dict = await _jsonSerializer.DeserializeFromStreamAsync>(stream); - - foreach (var key in dict.Keys) + // If a Culture doesn't have a translation the stream will be null and it defaults to en-us further up the chain + if (stream != null) { - dictionary[key] = dict[key]; + var dict = await _jsonSerializer.DeserializeFromStreamAsync>(stream); + + foreach (var key in dict.Keys) + { + dictionary[key] = dict[key]; + } } } }