Skip to content

Commit 8342726

Browse files
committed
Fix provider setter
1 parent 145c41b commit 8342726

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/dotnetCampus.Localizations.Analyzer/Assets/Templates/ImmutableLocalization.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private static ILocalizedStringProvider GetOrCreateLocalizedStringProvider(strin
118118
return provider;
119119
}
120120
var fallbackTag = global::dotnetCampus.Localizations.Helpers.LocalizationHelper.MatchWithFallback(languageTag, SupportedLanguageTags);
121+
provider = fallbackTag is null ? null : CreateLocalizedStringProviderCore(fallbackTag);
121122
if (provider is not null)
122123
{
123124
return provider;

src/dotnetCampus.Localizations.Analyzer/Assets/Templates/NotifiableLocalization.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ private static ILocalizedStringProvider CreateLocalizedStringProvider(string lan
9191
return provider;
9292
}
9393
var fallbackTag = global::dotnetCampus.Localizations.Helpers.LocalizationHelper.MatchWithFallback(languageTag, SupportedLanguageTags);
94+
provider = fallbackTag is null ? null : CreateLocalizedStringProviderCore(fallbackTag);
9495
if (provider is not null)
9596
{
9697
return provider;

0 commit comments

Comments
 (0)