Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Flow.Launcher.Localization.Shared/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static class Constants
public const string PublicApiClassName = "PublicApi";
public const string PublicApiPrivatePropertyName = "instance";
public const string PublicApiInternalPropertyName = "Instance";
public const string SuppressWarning = "#pragma warning disable FLAN0001 // Old localization API used";

public static readonly Regex LanguagesXamlRegex = new Regex(@"\\Languages\\[^\\]+\.xaml$", RegexOptions.IgnoreCase);
public static readonly string[] OldLocalizationClasses = { "IPublicAPI", "Internationalization" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ private void GenerateSource(
sourceBuilder.AppendLine($"namespace {enumNamespace};");
sourceBuilder.AppendLine();

// Suppress warning for old localization API usage
sourceBuilder.AppendLine(Constants.SuppressWarning);
sourceBuilder.AppendLine();

// Generate class
sourceBuilder.AppendLine($"/// <summary>");
sourceBuilder.AppendLine($"/// Data class for <see cref=\"{enumFullName}\"/>");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ private static void GenerateSource(
sourceBuilder.AppendLine($"namespace {assemblyNamespace};");
sourceBuilder.AppendLine();

// Suppress warning for old localization API usage
sourceBuilder.AppendLine(Constants.SuppressWarning);
sourceBuilder.AppendLine();

// Uncomment them for debugging
//sourceBuilder.AppendLine("/*");
/*// Generate all localization strings
Expand Down
Loading