aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2026-06-27 10:02:33 -0400
committerGitHub <noreply@github.com>2026-06-27 10:02:33 -0400
commit75d71cb73cb0b1e64b893b72afec1d59963e7e56 (patch)
tree8e8f4d02276e8ff863a02ca4331ad875d93d2b27 /tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs
parent310a47c1d4f241346cc4cda4e025758bf1e6247c (diff)
parentc158418e0b6e2449c91e022c7cc23981658b5449 (diff)
Merge branch 'master' into clean-orphaned-people
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs
index 3b8fe5ca60..bdb726f06d 100644
--- a/tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs
+++ b/tests/Jellyfin.Server.Implementations.Tests/Localization/LocalizationManagerTests.cs
@@ -345,6 +345,20 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
}
[Fact]
+ public void GetLocalizedString_WithBcp47NormalizationToUppercaseRegion_ReturnsTranslation()
+ {
+ var localizationManager = Setup(new ServerConfiguration
+ {
+ UICulture = "en-US"
+ });
+
+ // he-IL normalizes to the underscore resource he_IL. The resource lookup is case-sensitive,
+ // so the region casing has to be preserved or the file is not found and we fall back to en-US.
+ var translated = localizationManager.GetLocalizedString("Books", "he-IL");
+ Assert.Equal("ספרים", translated);
+ }
+
+ [Fact]
public void GetServerLocalizedString_UsesServerCulture()
{
var localizationManager = Setup(new ServerConfiguration