File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Flow.Launcher.Localization.Shared
Flow.Launcher.Localization.SourceGenerators/Localize Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ public static class Constants
28
28
public const string PublicApiClassName = "PublicApi" ;
29
29
public const string PublicApiPrivatePropertyName = "instance" ;
30
30
public const string PublicApiInternalPropertyName = "Instance" ;
31
+ public const string SuppressWarning = "#pragma warning disable FLAN0001 // Old localization API used" ;
31
32
32
33
public static readonly Regex LanguagesXamlRegex = new Regex ( @"\\Languages\\[^\\]+\.xaml$" , RegexOptions . IgnoreCase ) ;
33
34
public static readonly string [ ] OldLocalizationClasses = { "IPublicAPI" , "Internationalization" } ;
Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ private void GenerateSource(
193
193
sourceBuilder . AppendLine ( $ "namespace { enumNamespace } ;") ;
194
194
sourceBuilder . AppendLine ( ) ;
195
195
196
+ // Suppress warning for old localization API usage
197
+ sourceBuilder . AppendLine ( Constants . SuppressWarning ) ;
198
+ sourceBuilder . AppendLine ( ) ;
199
+
196
200
// Generate class
197
201
sourceBuilder . AppendLine ( $ "/// <summary>") ;
198
202
sourceBuilder . AppendLine ( $ "/// Data class for <see cref=\" { enumFullName } \" />") ;
Original file line number Diff line number Diff line change @@ -473,6 +473,10 @@ private static void GenerateSource(
473
473
sourceBuilder . AppendLine ( $ "namespace { assemblyNamespace } ;") ;
474
474
sourceBuilder . AppendLine ( ) ;
475
475
476
+ // Suppress warning for old localization API usage
477
+ sourceBuilder . AppendLine ( Constants . SuppressWarning ) ;
478
+ sourceBuilder . AppendLine ( ) ;
479
+
476
480
// Uncomment them for debugging
477
481
//sourceBuilder.AppendLine("/*");
478
482
/*// Generate all localization strings
You can’t perform that action at this time.
0 commit comments