Skip to content
Open
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
7 changes: 4 additions & 3 deletions CFixer/AppManagerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using CFixer.Helpers;
using Windows.Foundation;
using Windows.Management.Deployment;

Expand Down Expand Up @@ -57,15 +58,15 @@ public async Task<List<AppAnalysisResult>> AnalyzeAndLogAppsAsync(

if (apps.Count > 0)
{
Logger.Log("Bloatware apps detected:", LogLevel.Info);
Logger.Log(Localization.T("Bloatware apps detected:"), LogLevel.Info);
foreach (var app in apps)
{
Logger.Log($"❌ [ Bloatware ] {app.AppName} ({app.FullName})", LogLevel.Warning);
}
}
else
{
Logger.Log("✅ No Microsoft Store bloatware apps found.", LogLevel.Info);
Logger.Log(Localization.T("✅ No Microsoft Store bloatware apps found."), LogLevel.Info);
}

Logger.Log(""); // Add a blank line for spacing
Expand Down Expand Up @@ -189,7 +190,7 @@ public async Task<List<string>> UninstallSelectedAppsAsync(List<string> selected
Logger.Log($"⚠️ Failed to remove Store App: {app}", LogLevel.Warning);
}

Logger.Log("App cleanup complete.");
Logger.Log(Localization.T("App cleanup complete."));

return removedApps; // Return removed apps to update the UI
}
Expand Down
1 change: 1 addition & 0 deletions CFixer/CFixer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<Compile Include="Features\UI\Transparency.cs" />
<Compile Include="Helpers\LogActions.cs" />
<Compile Include="Helpers\LogActionsController.cs" />
<Compile Include="Helpers\Localization.cs" />
<Compile Include="Helpers\OSHelper.cs" />
<Compile Include="Helpers\Utils.cs" />
<Compile Include="Helpers\Logger.cs" />
Expand Down
26 changes: 13 additions & 13 deletions CFixer/Features/FeatureManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
using CFixer.Helpers;

namespace CrapFixer
{
Expand Down Expand Up @@ -97,7 +98,7 @@ public static async Task AnalyzeAll(TreeNodeCollection nodes)
Logger.Log(new string('=', 50), LogLevel.Info);

int ok = totalChecked - issuesFound;
Logger.Log($"Summary: {ok} of {totalChecked} checked settings are OK; {issuesFound} require attention.",
Logger.Log($"요약: 선택한 설정 {totalChecked}개 중 {ok}개는 정상이며, {issuesFound}개는 점검이 필요합니다.",
issuesFound > 0 ? LogLevel.Warning : LogLevel.Info);
}

Expand All @@ -118,9 +119,9 @@ private static async Task AnalyzeCheckedRecursive(TreeNode node)
{
issuesFound++;
node.ForeColor = Color.Red; // Mark as misconfigured
string category = node.Parent?.Text ?? "General";
string category = Localization.TreeText(node.Parent?.Text ?? "General");
Logger.Log($"❌ [{category}] {fn.Name} - Not configured as recommended.");
Logger.Log($" ➤ {fn.Feature.GetFeatureDetails()}");
Logger.Log($" ➤ {Localization.Detail(fn.Feature.GetFeatureDetails())}");
// Log a separator when an issue was found
Logger.Log(new string('-', 50), LogLevel.Info);
}
Expand Down Expand Up @@ -169,7 +170,7 @@ public static void RestoreChecked(TreeNode node)
if (!fn.IsCategory && node.Checked && fn.Feature != null)
{
bool ok = fn.Feature.UndoFeature();
string category = node.Parent?.Text ?? "General";
string category = Localization.TreeText(node.Parent?.Text ?? "General");
Logger.Log(ok
? $"↩️ [{category}] {fn.Name} - Restored"
: $"❌ [{category}] {fn.Name} - Restore failed",
Expand Down Expand Up @@ -197,9 +198,8 @@ public static async void AnalyzeFeature(TreeNode node)
}
else
{
string category = node.Parent?.Text ?? "General";
Logger.Log($"❌ Feature: {fn.Name} requires attention.", LogLevel.Warning);
Logger.Log($" ➤ {fn.Feature.GetFeatureDetails()}");
Logger.Log($" ➤ {Localization.Detail(fn.Feature.GetFeatureDetails())}");
Logger.Log(new string('-', 50), LogLevel.Info);
}
}
Expand Down Expand Up @@ -280,15 +280,15 @@ public static void ShowHelp(TreeNode node)
{
string info = fn.Feature.Info();
MessageBox.Show(
!string.IsNullOrEmpty(info) ? info : "No additional information available.",
$"Help: {fn.Name}",
!string.IsNullOrEmpty(info) ? Localization.T(info) : Localization.T("No additional information available."),
$"{Localization.T("Help")}: {fn.Name}",
MessageBoxButtons.OK,
MessageBoxIcon.Information);

// Optional online help
var result = MessageBox.Show(
"Would you like to search online for more information about this feature?",
"Online Help",
Localization.T("Would you like to search online for more information about this feature?"),
Localization.T("Online Help"),
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);

Expand All @@ -309,11 +309,11 @@ public static void ShowHelp(TreeNode node)
// Show help for plugins
if (!PluginManager.ShowHelp(node))
{
MessageBox.Show("⚠️ No feature or plugin selected, or help info unavailable.",
"Help",
MessageBox.Show(Localization.T("⚠️ No feature or plugin selected, or help info unavailable."),
Localization.T("Help"),
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
}
}
}
}
}
13 changes: 5 additions & 8 deletions CFixer/Features/FeatureNode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Collections.Generic;
using CFixer.Helpers;
using CrapFixer;

public class FeatureNode
Expand All @@ -8,20 +9,16 @@ public class FeatureNode
public FeatureBase Feature { get; }
public List<FeatureNode> Children { get; set; } = new List<FeatureNode>();

public bool DefaultChecked { get; set; } = true;

// Property to control default checked state
public bool DefaultChecked { get; set; } = true;

// Constructor for categories
public FeatureNode(string name)
{
Name = name;
Name = Localization.T(name);
}

// Constructor for actual features
public FeatureNode(FeatureBase feature)
{
Feature = feature;
Name = feature.ID(); // Use the ID as the name
Name = Localization.T(feature.ID());
}
}
Loading