mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-28 10:30:57 +01:00
Fix localization lookup
This commit is contained in:
@@ -344,6 +344,20 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
|
||||
Assert.NotEqual("Default", translated);
|
||||
}
|
||||
|
||||
[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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user