Skip to content

Commit 4c163fa

Browse files
Remove UseUidWhenLocalizedStringNotFound from Options
1 parent 52f19dc commit 4c163fa

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
namespace WinUI3Localizer;
1+
namespace WinUI3Localizer;
22

33
public partial class Localizer
44
{
55
public class Options
66
{
77
public string DefaultLanguage { get; set; } = "en-US";
88

9-
public bool UseUidWhenLocalizedStringNotFound { get; set; } = false;
10-
119
public bool DisableDefaultLocalizationActions { get; set; } = false;
1210
}
1311
}

WinUI3Localizer/Localizer.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ public string GetLocalizedString(string uid)
117117
throw localizerException;
118118
}
119119

120-
return this.options.UseUidWhenLocalizedStringNotFound is true
121-
? uid
122-
: string.Empty;
120+
return string.Empty;
123121
}
124122

125123
public IEnumerable<string> GetLocalizedStrings(string uid)
@@ -147,9 +145,7 @@ public IEnumerable<string> GetLocalizedStrings(string uid)
147145
throw localizerException;
148146
}
149147

150-
return this.options.UseUidWhenLocalizedStringNotFound is true
151-
? new string[] { uid }
152-
: Array.Empty<string>();
148+
return Array.Empty<string>();
153149
}
154150

155151
public LanguageDictionary GetCurrentLanguageDictionary() => CurrentDictionary;

0 commit comments

Comments
 (0)