File tree Expand file tree Collapse file tree 4 files changed +3
-13
lines changed
WinUI3Localizer.SampleApp Expand file tree Collapse file tree 4 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ Add this ItemGroup in the project file (\*.csproj) of your app.
5858 .SetOptions (options =>
5959 {
6060 options .DefaultLanguage = " en-US" ;
61- options .UseUidWhenLocalizedStringNotFound = true ;
6261 })
6362 .Build ();
6463 }
@@ -89,7 +88,6 @@ Add this ItemGroup in the project file (\*.csproj) of your app.
8988 .SetOptions (options =>
9089 {
9190 options .DefaultLanguage = " en-US" ;
92- options .UseUidWhenLocalizedStringNotFound = true ;
9391 })
9492 .Build ();
9593 }
Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ private static IHost BuildHost()
9898 // .SetOptions(options =>
9999 // {
100100 // options.DefaultLanguage = "ja";
101- // options.UseUidWhenLocalizedStringNotFound = true;
102101 // })
103102 // .Build()
104103 // .GetAwaiter()
@@ -141,7 +140,6 @@ private async Task InitializeLocalizer()
141140 . SetOptions ( options =>
142141 {
143142 options . DefaultLanguage = "en-US" ;
144- options . UseUidWhenLocalizedStringNotFound = true ;
145143 } )
146144 //.AddLocalizationAction(new LocalizationActionItem(typeof(Hyperlink), arguments =>
147145 //{
Original file line number Diff line number Diff line change 1- namespace WinUI3Localizer ;
1+ namespace WinUI3Localizer ;
22
33public 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}
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments