From 8ab8bbd8b30e7b5d4225665a7ab4f5547f53819a Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Thu, 11 Jun 2026 18:41:47 +0200 Subject: [PATCH] feat(storage): XDG-compliant paths and default language English MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AppPaths: use Environment.SpecialFolder.ApplicationData for all platforms - Windows → %APPDATA%\PalladiumWallet (unchanged) - Linux → ~/.config/PalladiumWallet (XDG standard, was ~/.palladium-wallet) - macOS → ~/Library/Application Support/PalladiumWallet AppConfig: change default language from "it" to "en" for new installs. Co-Authored-By: Claude Sonnet 4.6 --- src/Core/Storage/AppConfig.cs | 4 ++-- src/Core/Storage/AppPaths.cs | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Core/Storage/AppConfig.cs b/src/Core/Storage/AppConfig.cs index 1c10025..aaddc0f 100644 --- a/src/Core/Storage/AppConfig.cs +++ b/src/Core/Storage/AppConfig.cs @@ -9,8 +9,8 @@ namespace PalladiumWallet.Core.Storage; /// public sealed class AppConfig { - /// Codice lingua UI ("it", "en"). - public string Language { get; set; } = "it"; + /// Codice lingua UI. + public string Language { get; set; } = "en"; /// Unità di visualizzazione degli importi (vedi ). public string Unit { get; set; } = "PLM"; diff --git a/src/Core/Storage/AppPaths.cs b/src/Core/Storage/AppPaths.cs index 1087f78..39f7d93 100644 --- a/src/Core/Storage/AppPaths.cs +++ b/src/Core/Storage/AppPaths.cs @@ -18,9 +18,12 @@ public static class AppPaths if (Directory.Exists(portable)) return portable; - return OperatingSystem.IsWindows() - ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "PalladiumWallet") - : Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".palladium-wallet"); + // Windows → %APPDATA%\PalladiumWallet + // Linux → $XDG_CONFIG_HOME/PalladiumWallet (default ~/.config/PalladiumWallet) + // macOS → ~/Library/Application Support/PalladiumWallet + return Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "PalladiumWallet"); } /// Cartella dati della rete (config, wallet, header, certificati).