Format & Improve string resources & Rename enums

This commit is contained in:
Jack251970 2025-09-14 12:20:00 +08:00
parent d4a757be49
commit 2ae57ae34c
3 changed files with 15 additions and 17 deletions

View file

@ -16,7 +16,7 @@ namespace Flow.Launcher.Infrastructure.Logger
public static string CurrentLogDirectory { get; }
static Log()
static Log()
{
CurrentLogDirectory = DataLocation.VersionLogDirectory;
if (!Directory.Exists(CurrentLogDirectory))
@ -45,8 +45,6 @@ static Log()
Layout = layout
};
configuration.AddTarget("file", fileTargetASyncWrapper);
configuration.AddTarget("debug", debugTarget);
@ -71,9 +69,9 @@ static Log()
var nlogLevel = level switch
{
LOGLEVEL.None => LogLevel.Off,
LOGLEVEL.Error => LogLevel.Error,
LOGLEVEL.Debug => LogLevel.Debug,
LOGLEVEL.NONE => LogLevel.Off,
LOGLEVEL.ERROR => LogLevel.Error,
LOGLEVEL.DEBUG => LogLevel.Debug,
_ => LogLevel.Info
};
@ -167,9 +165,9 @@ static Log()
public enum LOGLEVEL
{
None,
Error,
Info,
Debug
NONE,
ERROR,
INFO,
DEBUG
}
}

View file

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
using System.Windows;
@ -340,7 +340,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public DialogJumpFileResultBehaviours DialogJumpFileResultBehaviour { get; set; } = DialogJumpFileResultBehaviours.FullPath;
[JsonConverter(typeof(JsonStringEnumConverter))]
public LOGLEVEL LogLevel { get; set; } = LOGLEVEL.Info;
public LOGLEVEL LogLevel { get; set; } = LOGLEVEL.INFO;
/// <summary>
/// when false Alphabet static service will always return empty results

View file

@ -459,13 +459,13 @@
<system:String x:Key="welcomewindow">Wizard</system:String>
<system:String x:Key="userdatapath">User Data Location</system:String>
<system:String x:Key="userdatapathToolTip">User settings and installed plugins are saved in the user data folder. This location may vary depending on whether it's in portable mode or not.</system:String>
<system:String x:Key="userdatapathButton">Open Folder</system:String>
<system:String x:Key="userdatapathButton">Open Folder</system:String>
<system:String x:Key="advanced">Advanced</system:String>
<system:String x:Key="logLevel">Log Level</system:String>
<system:String x:Key="LogLevelNone">None</system:String>
<system:String x:Key="LogLevelError">Error</system:String>
<system:String x:Key="LogLevelInfo">Info</system:String>
<system:String x:Key="LogLevelDebug">Debug</system:String>
<system:String x:Key="LogLevelNONE">Silent</system:String>
<system:String x:Key="LogLevelERROR">Error</system:String>
<system:String x:Key="LogLevelINFO">Info</system:String>
<system:String x:Key="LogLevelDEBUG">Debug</system:String>
<system:String x:Key="settingWindowFontTitle">Setting Window Font</system:String>
<!-- Release Notes Window -->