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
2828 public const string PublicApiClassName = "PublicApi" ;
2929 public const string PublicApiPrivatePropertyName = "instance" ;
3030 public const string PublicApiInternalPropertyName = "Instance" ;
31+ public const string SuppressWarning = "#pragma warning disable FLAN0001 // Old localization API used" ;
3132
3233 public static readonly Regex LanguagesXamlRegex = new Regex ( @"\\Languages\\[^\\]+\.xaml$" , RegexOptions . IgnoreCase ) ;
3334 public static readonly string [ ] OldLocalizationClasses = { "IPublicAPI" , "Internationalization" } ;
Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ private void GenerateSource(
193193 sourceBuilder . AppendLine ( $ "namespace { enumNamespace } ;") ;
194194 sourceBuilder . AppendLine ( ) ;
195195
196+ // Suppress warning for old localization API usage
197+ sourceBuilder . AppendLine ( Constants . SuppressWarning ) ;
198+ sourceBuilder . AppendLine ( ) ;
199+
196200 // Generate class
197201 sourceBuilder . AppendLine ( $ "/// <summary>") ;
198202 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(
473473 sourceBuilder . AppendLine ( $ "namespace { assemblyNamespace } ;") ;
474474 sourceBuilder . AppendLine ( ) ;
475475
476+ // Suppress warning for old localization API usage
477+ sourceBuilder . AppendLine ( Constants . SuppressWarning ) ;
478+ sourceBuilder . AppendLine ( ) ;
479+
476480 // Uncomment them for debugging
477481 //sourceBuilder.AppendLine("/*");
478482 /*// Generate all localization strings
You can’t perform that action at this time.
0 commit comments