mirror of
https://github.com/Radarr/Radarr.git
synced 2024-10-27 06:02:33 +01:00
Use await using
in LocalizationService
This commit is contained in:
parent
abddce1cfa
commit
401edeabba
@ -146,21 +146,12 @@ private async Task CopyInto(IDictionary<string, string> dictionary, string resou
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var fs = File.OpenRead(resourcePath))
|
await using var fs = File.OpenRead(resourcePath);
|
||||||
{
|
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(fs);
|
||||||
if (fs != null)
|
|
||||||
{
|
|
||||||
var dict = await JsonSerializer.DeserializeAsync<Dictionary<string, string>>(fs);
|
|
||||||
|
|
||||||
foreach (var key in dict.Keys)
|
foreach (var key in dict.Keys)
|
||||||
{
|
{
|
||||||
dictionary[key] = dict[key];
|
dictionary[key] = dict[key];
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_logger.Error("Missing translation/culture resource: {0}", resourcePath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user